?
Solved

Add to cart button missing?

Posted on 2011-09-04
13
Medium Priority
?
498 Views
Last Modified: 2012-05-12
If you go to a product that has ONE item in the category there is no add to cart button at all.

Please see the live site here for an example

In categories "Surge Protectors" and "Test Meters" the add to cart button has dissapeared.

http://www.maxtemp.com.au/index.php?option=com_virtuemart&page=shop.browse&category_id=56&Itemid=1

and
http://www.maxtemp.com.au/index.php?option=com_virtuemart&page=shop.browse&category_id=6&Itemid=1

Please can you tell me how to FIX it please?
[7:08:34 AM] Amanda Watson:  
please use this as login for the site to see the products


aaabbb
password: aaabbb
0
Comment
Question by:Amanda Watson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 4
13 Comments
 
LVL 11

Author Comment

by:Amanda Watson
ID: 36482604
By the way there has been some customisation here so I am pretty sure there would be a conditional statement saying when the add to cart button is to show and somehow it isn't showing when there is only one product, but where should I look for this..can anyone help?
0
 
LVL 12

Expert Comment

by:Panagiotis S
ID: 36482607
where do you want to add the add to cart button? to browse or flypage ?
0
 
LVL 11

Author Comment

by:Amanda Watson
ID: 36482617
browse page
0
Video: Liquid Web Managed WordPress Comparisons

If you run run a WordPress, you understand the potential headaches you may face when updating your plugins and themes. Do you choose to update on the fly and risk taking down your site; or do you set up a staging, keep it in sync with your live site and use that to test updates?

 
LVL 12

Expert Comment

by:Panagiotis S
ID: 36482638
put this
<?php echo $form_addtocart ?>
0
 
LVL 11

Author Comment

by:Amanda Watson
ID: 36482694
Thank you, yes the add to cart button is present on all the pages, EXCEPT for pages with only one item in their category

These are the files that have been edited...something is wrong with them so that the button isn't showing when there is only ONE item on the page...can you see where the problem is? addtocart-form.tpl.txt
browse-orderbyform.tpl.txt
browse-pagenav.tpl.txt
0
 
LVL 12

Expert Comment

by:Panagiotis S
ID: 36482702
no you have to put it in the browse page that you use in components\com_virtuemart\themes\centiva\templates\browse
0
 
LVL 11

Author Comment

by:Amanda Watson
ID: 36482724
IT is already in the browse page I am using.
That is not the problem
0
 
LVL 11

Author Comment

by:Amanda Watson
ID: 36482728
The add to cart button works on all pages as it is supposed to EXCEPT for pages with only one product, so because this site has been customised, I have attached the affected pages to see if you can figure out why the add to cart button shows on pages with more that one product to browse, but not on pages with only one product
0
 
LVL 12

Expert Comment

by:Panagiotis S
ID: 36482732
why did you put add to cart to the browse-orderbyform.tpl.txt ?
0
 
LVL 11

Author Comment

by:Amanda Watson
ID: 36482759
because that form has been amended when the the add to cart function was changed.
What changed was that the add to cart was moved to the top of the browse page, rather than being there for each product..(which is the norm for virtuemart)
0
 
LVL 11

Author Comment

by:Amanda Watson
ID: 36482762
the ps_cart and ps_attribute files were also amended but I don't think they are implicated in this error
0
 
LVL 11

Accepted Solution

by:
Amanda Watson earned 0 total points
ID: 36485930
<!--Modifications for one add to cart button-->
<div id="output2"></div>
<!--Modifications for one add to cart button end here-->
<form action="<?php echo $mm_action_url ?>index.php" method="post" name="addtocart" id="addtocart<?php echo $i ?>" class="addtocart_form" <?php if( $this->get_cfg( 'useAjaxCartActions', 1 ) && !$notify ) { echo 'onsubmit="handleAddToCart( this.id );return false;"'; } ?>>
<div style="width: 100%; text-align: right">

<input id="submitFirstToLast" type="submit" class="addtocart_button" value="Add to Cart" />
</div>

This needed to be added to browse_notables.tpl.php

instead of  browse_orderbyform.tpl.php
that fixed it
0
 
LVL 11

Author Closing Comment

by:Amanda Watson
ID: 36515706
I found the solution
0

Featured Post

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question