How do I remove the Add to Cart

ThemeBurn SupportForumsOpenCart ThemesShoppica OpenCart ThemeHow do I remove the Add to Cart

This topic has been marked as resolved.

I am running a store that has one of items, and once an item is sold I want it to become unavailable, but the ad to cart is still there when the quantity is 1. How do I get rid of this?

 Shopfy
September 6, 2011 at 3:45 am #1515

Hi,

In order to hide the buy button, after the quantity goes under 1 you will need to:

1) Go to System -> Settings -> Option (tab) and enable the Display Stock feature

You will need to register in order to post topics and read replies in the ThemeBurn.com support forums!

Best regards,
ThemeBurn team

  • This reply was modified 4600 days ago by  TB Support.
September 8, 2011 at 12:05 pm #1576

Hello,

I tried this and it works on the product description page, but when its in the category list with all the products the add to cart button still comes up and you can still add the sold items to the cart. How would I remove the add to cart option from the category list?

 Shopfy
September 14, 2011 at 9:22 pm #1721

Hi,

I actually checked and noticed that when I add this tag, it removes the add to cart option for all items including those that have stock.

Can you please help?

Thanks

 Shopfy
September 14, 2011 at 9:34 pm #1722

Hi,

The example, we gave you works on product page, only when you have done this:

Go to System -> Settings -> Option (tab) and enable the Display Stock feature

About hiding the “add to cart” button, you could check this topic from the official OpenCart forums:

http://forum.opencart.com/viewtopic.php?f=20&t=35622&p=177418

Best regards,
ThemeBurn team

September 15, 2011 at 4:27 pm #1745

Hello,

I have installed the code in the product.tpl file and have clicked the enable the Display Stock feature under the options tab, but it still removes the add to cart from all my items. I have put up a picture of the settings I have done.

What should I try to fix this option.

  • This reply was modified 4605 days ago by  Shopfy.
  • This reply was modified 4605 days ago by  Shopfy.
  • This reply was modified 4605 days ago by  Shopfy.
  • This reply was modified 4605 days ago by  Shopfy.
 Shopfy
September 21, 2011 at 1:27 am #1901

Hi,

We are sorry, but we have given the wrong code. Check again the corrected post.

Best regards,
ThemeBurn team

September 25, 2011 at 12:29 pm #1979
You will need to register in order to post topics and read replies in the ThemeBurn.com support forums!
October 20, 2011 at 4:07 pm #2760

I can’t change it, looks like my file product.tpl doesn’t contain this code from you first post.

I have latest version of Shoppica, could you please help me?

  • This reply was modified 4523 days ago by  dkk.
 dkk
December 11, 2011 at 4:26 pm #4401

@dkk

Should have it. Are you sure you have the latest version of Shoppica?

If yes, could we take your website address?

Best,
ThemeBurn team

December 13, 2011 at 12:25 pm #4467

hi, sorry to be reviving an old thread but somehow I am still unable to get this to work.
I’ve made the changes to the following and on my categories page, I can see an error next to the wishlist button pointing to category.tpl on line 216 ?

<div class="s_actions">
   <?php if ($products[$j]['price']): ?>
   <?php if ($product['stock']): ?>
   <a class="s_button_add_to_cart" href="javascript:;" onclick="addToCart('<?php echo $products[$j]['product_id']; ?>');">
      <span class="s_icon_16"><span class="s_icon"></span><?php echo $button_cart; ?></span>
   </a>
   <?php endif; ?>
   <?php endif; ?>
   ....
</div>

 3antz
January 1, 2012 at 5:21 pm #4780

@3antz

We updated the code. It seemed, there was a missing check. Now everything should work well.

Best,
ThemeBurn team

January 13, 2012 at 3:39 pm #5203

Finally! Thanks

 3antz
January 13, 2012 at 6:44 pm #5212

now ad this codes and out of stock product not showing add to cart button but how to show like “sold out” instead of this empty space

April 28, 2012 at 12:51 pm #8415

I agree, I also wish there was a way of not having to display the number in stock as we will only be holding around 10 of each item which doesn’t look all that great! Is there really no other way to remove the add to cart button when stock reaches 0 that this?

April 29, 2012 at 2:54 pm #8424
Viewing 15 posts - 1 through 15 (of 28 total)
  • You must be logged in to reply to this topic.