Add when in stock or not to category pages.

ThemeBurn SupportForumsOpenCart ThemesShoppica 2 OpenCart ThemeAdd when in stock or not to category pages.

This topic has been marked as not a support question.

I really like to show my customers whenever a product is in stock or not on the category pages so they don’t need to click through any time.

I’ve made a mock-up of a solution that would do the job for me. Hopefully you can help me with it.

See attached pictures for the mock-up.

 Rovara
October 20, 2013 at 1:58 pm #28302

Guys,

Can someone help me fix this?

Thanks!

 Rovara
October 28, 2013 at 11:53 am #28440

Hi,

Here is a topic, where we’ve already discussed, how to access the stock status in the category page and use it to show/hide add to cart button, or any other elements:

http://support.themeburn.com/topic/how-do-i-remove-the-add-to-cart/page/2

Best,
ThemeBurn team

October 30, 2013 at 4:09 pm #28513

Okay thanks to that topic i’ve managed to get the stock status on the category page, but there is one thing:

I have different out-of-stock statuses. Is it possible to have the different statuses on the category page instead of one standard text. Because some products it’s possible to pre-order and with other it’s not possible and i want the status sold-out shown.

Hopefully this is possible!

Kind regards,

Kevin

 Rovara
October 30, 2013 at 9:47 pm #28531
You will need to register in order to post topics and read replies in the ThemeBurn.com support forums!
November 7, 2013 at 9:38 am #28749

According to your post which you can find here (http://support.themeburn.com/topic/how-do-i-remove-the-add-to-cart/page/2) i’ve did the underneath instruction. In the beginning it was working, but now i’m looking at my website and can’t see anything.

Can you tell me what’s wrong?


You can try this:

In catalog/controller/product/category.php find:


'rating'      => $result['rating'],

and add below:


'quantity'    => $result['quantity'],

Then in catalog/view/theme/shoppica/template/product/category.tpl find:


<a class="s_button_add_to_cart" href="javascript:;" onclick="addToCart('<?php echo $product['product_id']; ?>');">
  <span class="s_icon_16"><span class="s_icon"></span><?php echo $button_cart; ?></span>
</a>

and replace it with:


<?php if ($product['quantity'] > 0): ?>
<a class="s_button_add_to_cart" href="javascript:;" onclick="addToCart('<?php echo $product['product_id']; ?>');">
  <span class="s_icon_16"><span class="s_icon"></span><?php echo $button_cart; ?></span>
</a>
<?php else: ?>
  Out of stock
<?php endif; ?>

  • This reply was modified 3820 days ago by  Rovara.
 Rovara
November 12, 2013 at 10:11 pm #28867

Excuse me, i want to add something to my comment.

It is working on the category page, but it isn’t working in the modules like New Products, Sale Products and Featured for example.

 Rovara
November 12, 2013 at 10:58 pm #28870

Hi,

You will have to modify the controllers of all product modules (featured, specials, bestsellers, latest).

The modification should be the same.

Best,
ThemeBurn team

November 21, 2013 at 3:06 pm #29046
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.