Display "Available in 24/48h" for some products ot

  • Posts: 28
  • Thank you received: 1
11 years 5 months ago #147697

-- url of the page with the problem -- : www.airsoft-romania.com
-- HikaShop version -- : 2.2.3
-- Joomla version -- : 2.5.19
-- PHP version -- : 5.3

Hi,
How can I display the message "Available in 24h/48h" for some products that are out of stock?

Regards,
Raul

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

  • Posts: 13201
  • Thank you received: 2322
11 years 5 months ago #147734

Hi,

I think that the best way is to create a custom field on the product table.
For example, "availability", for the desired products set the value 24/48h for this custom field in the product edition page.

Then edit the view "product / quantity" and replace the line:

echo JText::_('NO_STOCK').'<br/>';
By:
if(!empty($this->row->availability)){
    echo JText::sprintf('AVAILABLE_IN',$this->row->availability).'<br/>';
}else{
    echo JText::_('NO_STOCK').'<br/>';
}
And add the following line in the translation file:

AVAILABLE_IN="Available in %s"


By this way you will have the desired result, and you can set different periods of times for different products.

The following user(s) said Thank You: raulpiscoi

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

  • Posts: 28
  • Thank you received: 1
11 years 5 months ago #147843

It works like a charm :)

Regards,
Raul

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

Time to create page: 0.061 seconds
Powered by Kunena Forum