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
Solved

Add to cart button missing?

Posted on 2011-09-04
13
494 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
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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Head to not include on scroll 4 23
removing a class in javascript 4 47
Media Queries  not Firing 6 17
HTML Anchor Link Problem 3 35
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
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.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

840 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