Skip to main content

when Quantity = 0 show image Not aviliable

More
10 years 8 months ago #226212 by aminweb
-- HikaShop version -- : 2.4

hi
When the administrator, Quantity of product to zero(0).
Instead of writing (Not Aviliable), I would like to image icon display
please guide me.

Joomla Developer | am.ebrahimzadeh[at]gmail.com

Please Log in or Create an account to join the conversation.

More
10 years 8 months ago #226214 by Xavier
Hi,

You can do a translation override on the key "NO_STOCK" and insert html to display the desired button.
hikashop.com/support/faq.html#tran

Please Log in or Create an account to join the conversation.

More
10 years 8 months ago - 10 years 8 months ago #226274 by aminweb
hi xavier,
no, I want ,when set quantity=0 ,instead of price -->show image (not avilable image)
in defult mode hikashop ==> when quantity=0 ==> add to cart hidden and displaye not avilable....
but I want add to car always show but price when quantity=0 hidden and instead of price display not avilable
please thanks
and becuase my language persian so difficult write and speak english.excuseme
thanks

Joomla Developer | am.ebrahimzadeh[at]gmail.com
Last edit: 10 years 8 months ago by aminweb.

Please Log in or Create an account to join the conversation.

More
10 years 8 months ago #226277 by Xavier
Hi,

So if it is instead of price, you have to edit the view "product / listing_price" and add a PHP check on the product quantity.
If quantity is 0 so display the image, else let the default code been executed.

It require some PHP knowledges.
Code:
if($this->row->product_quantity == '0'){ echo '<img src="/thesrc/of/theimage.ext" alt="No Stock" />'; return; }
The following user(s) said Thank You: aminweb

Please Log in or Create an account to join the conversation.

More
10 years 8 months ago #226508 by aminweb
thanks Xavier,
worked perfect,
now, was a problem:
when quantity=0 addtocart button hidden ... but i want always displaye add to cart button but when quantity=0 deactive.

Joomla Developer | am.ebrahimzadeh[at]gmail.com

Please Log in or Create an account to join the conversation.

More
10 years 8 months ago #226509 by Xavier
Hi,

So in the given code, you can add HTML to display the add to cart button with no actions on it.
That way it will be displayed but disabled.

ps: this is customization, we generally don't support these requests ;)

Please Log in or Create an account to join the conversation.

Time to create page: 0.174 seconds
Powered by Kunena Forum