Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Add to cart button missing?

Posted on 2011-09-04
13
Medium Priority
?
501 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

Question has a verified solution.

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

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
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

636 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