Here's what's happening...
Client:
Finds
product T, likes product T,
bookmarks product T
Admin:
No longer offers
product T.
Client:
Wants to buy
product T cause now they have the money!
If Admin '
disables' the product and has changed the noproduct.php to the index_categories.php...
It will revert back to the index or category landing page the product used to be in.
If Admin '
deletes' the product from the database...
Everything fails.
So, I put the noproduct.php back in and found that the message 'Sorry, the product was not found' will display properly. However the 'back' or 'continue' button does not display.
<div class="centerColumn" id="productInfoNoProduct">
<div id="productInfoNoProductMainContent" class="content"><?php echo TEXT_PRODUCT_NOT_FOUND; ?></div>
<div class="buttonRow back"><?php zen_back_link() . zen_image_button(BUTTON_IMAGE_CONTINUE, BUTTON_CONTINUE_ALT) . '</a>'; ?></div>
Meaning it's not coded correctly or it's not getting any data to 'go back' or 'continue' to which makes sense.
So, the alternate solution here would be to leave the message on the noproducts.php and add the code needed to go somewhere.
It would be clean, fast and prevent any future problems if any of the files involved were to be changed. It would also be consistent, regardless of a 'disabled' or 'deleted' product the redirect would return to a controlled location.
in includes/templates/YOUR_TEMPLATE/templates/
tpl_product_info_noproduct.php
replace line 18:
<div class="buttonRow back"><?php zen_back_link() . zen_image_button(BUTTON_IMAGE_CONTINUE, BUTTON_CONTINUE_ALT) . '</a>'; ?></div>
with this:
<?php // Twitch No Product Continue to Index ?>
<div class="buttonRow back"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo zen_image_button(BUTTON_IMAGE_CONTINUE);?></a></div>
<!-- <div class="buttonRow back"><?php //zen_back_link() . zen_image_button(BUTTON_IMAGE_CONTINUE, BUTTON_CONTINUE_ALT) . '</a>'; ?></div>-->
it will look like this:
and clicking the continue button will take you home. The customer can read the message, understand why they can't see what they want and decide to move on or perhaps select a new category in the category sidebox.
Bookmarks