Product Not Available Page

  • Posts: 136
  • Thank you received: 1
13 years 6 months ago #21602

Hi Nicolas,

I regularly update my products - when I turn off the publish option, I would like the ability to customise the page that says "Product Not Found".

Am I able to completely change the look of this page to suit my website?

Thanks,
Jac

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

  • Posts: 83103
  • Thank you received: 13418
  • MODERATOR
13 years 6 months ago #21606

Hi,

Sure, you can do that in the file show of the view product via the menu Display->Views. It's at the beginning of the file:
<?php if(empty($this->element)){
$app =& JFactory::getApplication();
$app->enqueueMessage(JText::_('PRODUCT_NOT_FOUND'));
}else{

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

  • Posts: 136
  • Thank you received: 1
13 years 6 months ago #21617

Thanks Nicolas, using this method can I actually change the page that appears.

I'm wanting to change the look and feel of the page more so than just the text.

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

  • Posts: 83103
  • Thank you received: 13418
  • MODERATOR
13 years 6 months ago #21630

Yes. You can just add your code in the if block.
for example, you could have:
<?php if(empty($this->element)){
$app =& JFactory::getApplication();
$app->enqueueMessage(JText::_('PRODUCT_NOT_FOUND'));
echo 'test';
}else{

which will display the text "test" on the page.

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

  • Posts: 136
  • Thank you received: 1
12 years 10 months ago #43949

Hi Nicolas,

Instead of just inserting text here, can I create and reference a joomla article in this code - that way I can customise the look of the page that is displayed and add images when a product is not available anymore.

Thank you.

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

  • Posts: 83103
  • Thank you received: 13418
  • MODERATOR
12 years 10 months ago #43954

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

Time to create page: 0.063 seconds
Powered by Kunena Forum