VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Bel on June 14, 2014, 11:53:22 AM

Title: Is There an Easy Way to Edit "404: Product Does Not Exist" Page?
Post by: Bel on June 14, 2014, 11:53:22 AM
My stock on VM changes frequently, which means potential customers following links from Google often hit the 404: Product does not exist page as generated by VM. There's no way to get around this as my stock changes so often, but I'd like to display a more "friendly" message on the page so it's less off-putting for customers. Ideally I'd like it to look exactly as it does now (i.e. standard VM error message) but with some extra text inviting customers to phone or browse the rest of the site.
My question is, is there an easy way to do this from within Virtuemart?  Or if not, can I edit one of the VM files to change the message displayed without changing the way it looks?

Title: Re: Is There an Easy Way to Edit "404: Product Does Not Exist" Page?
Post by: GJC Web Design on June 14, 2014, 14:05:54 PM
you haven't mentioned your version!  This handling of 404's has changed in recent versions

but in components/com_virtuemart/views/productdetails/tmpl/default.php there is

if (empty($this->product)) {
   echo JText::_('COM_VIRTUEMART_PRODUCT_NOT_FOUND');
   echo '<br /><br />  ' . $this->continue_link_html;
   return;
}

is this what u want?