![]() |
How to replace quantity in stock with stock indicator
How we can displays quantity of product in stock with stock indicator and not the exact number, something like the following link??
http://www.magentocommerce.com/magento-connect/product-stock-quantity-indicator-3259.html |
Re: How to replace quantity in stock with stock indicator
You can do this with smarty
file: /skin/common_files/customer/main/product_details.tpl (or whatever template file you use for product_details.tpl for your skin) FIND this code: Code:
{if $config.Appearance.show_in_stock eq "Y" and $config.General.unlimited_products ne "Y" and $product.distribution eq ""} And replace: Code:
{if $product.avail gt 0} {if $product.avail gt 0 and $product.avail lt 4} <img src="RED_BAR.gif" /> {elseif $product.avail etc.... etc... {/if} use smarty to trap for number in stock and display the color bar. This shouldn't take you more than a few minutes to code it. Yes? |
Re: How to replace quantity in stock with stock indicator
A simple version is this:
PHP Code:
|
Re: How to replace quantity in stock with stock indicator
I was thinking for something more complex combining the Low limit in stock and the Minimum order amount of every product.
From that numbers I would like to produce the tree or more steps limits and to be different for every product. Let say that we have some product counted in pieces and some others in meters, some other have minimum quantity to order 10 pieces and some other have 100 meter. I am trying to find a solution to combining all this data. Any ideas?? |
Re: How to replace quantity in stock with stock indicator
Make the list of variable you want to manipulate. Then identify them as XC variables. Use them according to your needs. It is a job done with Smarty if statement.
|
Re: How to replace quantity in stock with stock indicator
there are a few solutions if you search the forum too.
|
Re: How to replace quantity in stock with stock indicator
I have try to search the forum and google as well but i have not find something.
Possibly i am searching wrong. Is it possible someone to help me complete this add on Personally believe that will be useful for many people. At the moment this "module is already created for zen car, magento, and others. |
Re: How to replace quantity in stock with stock indicator
Quote:
Just use my previous post and add a couple of extra steps and instead of the wording add image refs instead for the steps of the indicator. |
All times are GMT -8. The time now is 11:35 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.