Solved

Add to cart button missing?

Posted on 2011-09-04
13
489 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
  • 9
  • 4
13 Comments
 
LVL 11

Author Comment

by:Amanda Watson
Comment Utility
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:panagiotiss
Comment Utility
where do you want to add the add to cart button? to browse or flypage ?
0
 
LVL 11

Author Comment

by:Amanda Watson
Comment Utility
browse page
0
 
LVL 12

Expert Comment

by:panagiotiss
Comment Utility
put this
<?php echo $form_addtocart ?>
0
 
LVL 11

Author Comment

by:Amanda Watson
Comment Utility
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:panagiotiss
Comment Utility
no you have to put it in the browse page that you use in components\com_virtuemart\themes\centiva\templates\browse
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 11

Author Comment

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

Author Comment

by:Amanda Watson
Comment Utility
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:panagiotiss
Comment Utility
why did you put add to cart to the browse-orderbyform.tpl.txt ?
0
 
LVL 11

Author Comment

by:Amanda Watson
Comment Utility
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
Comment Utility
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
Comment Utility
<!--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
Comment Utility
I found the solution
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now