Skip to main content

Product Not Available Page

More
15 years 2 months ago #21602 by jacorr27
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.

More
15 years 2 months ago #21606 by nicolas
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.

More
15 years 2 months ago #21617 by jacorr27
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.

More
15 years 2 months ago #21630 by nicolas
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.

More
14 years 6 months ago #43949 by jacorr27
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.

More
14 years 6 months ago #43954 by nicolas

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

Time to create page: 0.181 seconds
Powered by Kunena Forum