Post by fgrace » Mon Feb 14, 2011 3:33 am

Hi

On the product description page, i wish to display the quantity per individual options.
E.g. If the product eg. dress has a stock level of 6 - this is broken down into sizes eg. 2 Large, 2 Medium & 2 Small

On the front-end the Size option dropdown should display the [option name] and [option quantity in stock] in the dropdown menu as outlined here:

[Options: Size]
||Large - In Stock(2)||
||Medium - In Stock(2)||
||Small - In Stock(2)||

I think the file I need to changes is:
catalog/view/theme/default/template/product/product.tpl

I would be really grateful for some help on this.
thanks
FG :)

New member

Posts

Joined
Sat May 01, 2010 6:22 am

Post by Qphoria » Mon Feb 14, 2011 3:58 am

1. EDIT: catalog/controller/product/product.php

2. FIND:

Code: Select all

'name'            => $option_value['name'],
3. AFTER, ADD:

Code: Select all

'quantity'        => $option_value['quantity'],
4. EDIT: catalog/view/theme/YOURTHEME/product/product.tpl

5. FIND:

Code: Select all

<?php echo $option_value['name']; ?>
6. AFTER ADD:

Code: Select all

<?php echo $option_value['quantity']; ?>

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by fgrace » Thu Feb 17, 2011 6:30 am

Hi Qphoria

Sorry for the delay, many thanks for your help! :)

New member

Posts

Joined
Sat May 01, 2010 6:22 am

Post by jrofarrell » Mon May 09, 2011 6:16 pm

Hello,

I am trying to implement this in v1.4.9.3 but unfortunately I am receiving;

Undefined index: quantity in XX\catalog\controller\product\product.php on line 256 < the new line added was 'quantity' => $option_value['quantity']

Any help would be much appreciated.

Regards
James

Newbie

Posts

Joined
Mon May 09, 2011 6:07 pm

Post by Felias » Thu Sep 22, 2011 8:54 pm

I'm not getting an error, but the stock level is not displayed. Would surely like to get this working, as it is a real fuzz without it.

New member

Posts

Joined
Mon Sep 19, 2011 5:41 am
Who is online

Users browsing this forum: paulfeakins and 30 guests