when Quantity = 0 show image Not aviliable

  • Posts: 138
  • Thank you received: 4
9 years 8 months ago #226212

-- 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
Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
9 years 8 months ago #226214

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.

  • Posts: 138
  • Thank you received: 4
9 years 8 months ago #226274

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: 9 years 8 months ago by aminweb.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 8 months ago #226277

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.

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.

  • Posts: 138
  • Thank you received: 4
9 years 8 months ago #226508

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.

  • Posts: 13201
  • Thank you received: 2322
9 years 8 months ago #226509

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.080 seconds
Powered by Kunena Forum