Post by winterinthesun » Sat Jan 20, 2018 8:01 pm

I am setting up my website on version 2.3.0.2 and want to display the the quantities of each colour I have setup in options / select.
Currently if a customer views a product on my website they can select the dropdown and choose a colour which is ok but I also want it to show the quantity of stock I have of that particular colour for my customers to be able to see.
I have inputted for a product already the amount of stock I have for each colour in admin but it does not show this on the website.

Is there a code I can add to the products.tpl file or maybe somewhere else to make this visible?

Many thanks for anyone that can help

New member

Posts

Joined
Fri Jan 13, 2017 3:05 am

Post by grgr » Sat Jan 20, 2018 11:12 pm

../catalog/controller/product/product.php

find on line 352:

Code: Select all

'name'                    => $option_value['name'],
change to:

Code: Select all

'name'                    => $option_value['name'] . ' (' . $option_value['quantity'] . ')',

-
Image Image Image Image
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS


User avatar
Active Member

Posts

Joined
Mon Mar 28, 2011 4:08 pm
Location - UK

Post by winterinthesun » Sun Jan 21, 2018 2:17 am

wow, thank you so much for the quick reply, i have applied this and it it works just as I wanted it to.
Your a star!

Thanks so much again

New member

Posts

Joined
Fri Jan 13, 2017 3:05 am

Post by winterinthesun » Sun Jan 21, 2018 7:33 pm

Hi grgr

Not related to this post but do you know a code that I can add to make the background fixed but the website scroll?

Many thanks

New member

Posts

Joined
Fri Jan 13, 2017 3:05 am
Who is online

Users browsing this forum: paulfeakins and 457 guests