Post by powerwebgr » Thu Jan 15, 2015 10:45 pm

I had this problem with a store of clothes
that had 2-3 size options for each product.

By default when the stock of one size is 0 then the stock become "out of stock"
else if QTY is 1 or more it becomes "Available"
In general
if a size still has pcs - that would be ok "availble"
if a size ends stock i wanted to show "out of stock"
and finally for some sizes that was out of stock but i am producing some
i would like to show "in 3-4 days"


1) file name = catalog/controller/product/product.php
after 'name' => $option_value['name'],
you add 'quantity' => $option_value['quantity'],

2) file name = catalog/view/theme/YOUR THEME/template/product/product.tpl
after <?php echo $option_value['name']; ?>
<?php if ($option_value['price']) { ?>
(<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
<?php } ?>
Its near line 80 for dropdown menus and in general you need to find the right place
regarding the $option['type'] == 'radio' or 'date' or 'text' etc

you add <?php echo '&nbsp; -&nbsp; QTY'; ?>
<?php
if ($option_value['quantity'] <= 0) { echo ' :&nbsp; Out Of Stock';}
else if ($option_value['quantity'] >= 1001) {echo ' :&nbsp; in 3-4 days'; }
else {echo ' :&nbsp; Available'; }
?>

3) After all, you need to change the QTY of the option for the specific product to 1001+ for example 2000

For each option you put QTY over 1001 it will show the "in 3-4 days"

These are in Greek but you understand
1a.jpg

1a.jpg (1.77 MiB) Viewed 2100 times

2a.jpg

2a.jpg (1.79 MiB) Viewed 2100 times



.

User avatar
Newbie

Posts

Joined
Tue May 22, 2012 7:24 pm


Post by Bastinet » Fri Sep 02, 2016 8:01 pm

Hi powerwebgr!

I try to use this method, but it seems that it is not working, could you please help me?

Newbie

Posts

Joined
Fri Sep 02, 2016 7:57 pm

Post by Bastinet » Fri Sep 02, 2016 8:16 pm

Hello, i tested your method but for some reason it wont work?
Could you please help me!?

Newbie

Posts

Joined
Fri Sep 02, 2016 7:57 pm
Who is online

Users browsing this forum: No registered users and 11 guests