Page 4 of 4 FirstFirst ... 234
Results 31 to 34 of 34
  1. #31
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    9,027
    Plugin Contributions
    31

    Default Re: Redirect discontinued items

    Quote Originally Posted by Kevin205 View Post
    Nice DivaVocals. Perfect.
    Ha! Thanks.. it looks like this is a pretty old Zen Cart page that hasn't been updated in sometime.. Gonna report this one as a bug to the Zen Cart admins..
    Last edited by DivaVocals; 28 Dec 2013 at 07:13 PM.
    My Site
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  2. #32
    Join Date
    Dec 2012
    Posts
    584
    Plugin Contributions
    0

    Default Re: Redirect discontinued items

    Quote Originally Posted by DivaVocals View Post
    Ha! Thanks.. it looks like this is a pretty old Zen Cart page that hasn't been updated in sometime.. Gonna report this one as a bug to the Zen Cart admins..
    Thank you.
    Using Zen Cart 1.5.1

  3. #33
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    9,027
    Plugin Contributions
    31

    Default Re: Redirect discontinued items

    Quote Originally Posted by Kevin205 View Post
    Thank you.
    Bug report done..
    My Site
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  4. #34
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    9,027
    Plugin Contributions
    31

    Default Re: Redirect discontinued items

    It appears that the changes suggested by both Twitch and myself are not necessary. The issues with /includes/templates/template_default/templates/tpl_product_info_noproduct.php have already been reported as a bug and addressed in v1.5.2 (thanks lat9!)

    For folks following THIS discussion, you can refer to this thread for the proper corrections:
    http://www.zen-cart.com/showthread.p..._noproduct-php..

    This thread addresses the two issues with the /includes/templates/template_default/templates/tpl_product_info_noproduct.php file.


    1. Missing echo that causes the "Continue" button not to be displayed.
    2. For each of the new/featured/special products modules, it's calling the module instead of the template so that nothing is ever output to the screen


    =============================================


    Quote Originally Posted by twitchtoo View Post
    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:
    Attachment 13604
    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.
    Quote Originally Posted by twitchtoo View Post
    DivaVocals, many shops shut those features off globally... perhaps it's time to create a master admin table for page by page inclusion of the various marketing tools.
    Quote Originally Posted by DivaVocals View Post
    It looks like there are admin configuration settings which allows one to turn this on/off specifically on the tpl_product_info_noproduct.php page

    Index Listing > Show New Products on Main Page - Errors and Missing Product
    Index Listing > Show Featured Products on Main Page - Errors and Missing Product
    Index Listing > Show Featured Products on Main Page - Errors and Missing Product
    Index Listing > Show Special Products on Main Page - Errors and Missing Product
    Index Listing > Show Upcoming Products on Main Page - Errors and Missing Product
    It doesn't appear to be working though.. (just tried turning it on on my test site..) Hmmmmmmm....
    Quote Originally Posted by DivaVocals View Post
    Now it works.. replaced lines 27-61 of the tpl_product_info_noproduct.php file with this code:


    Code:
    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MISSING_FEATURED_PRODUCTS') { ?>
    <?php
    /**
     * display the Featured Products Center Box
     */
    ?>
    <?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
    <?php } ?>
    
    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MISSING_SPECIALS_PRODUCTS') { ?>
    <?php
    /**
     * display the Special Products Center Box
     */
    ?>
    <?php require($template->get_template_dir('tpl_modules_specials_default.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_specials_default.php'); ?>
    <?php } ?>
    
    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MISSING_NEW_PRODUCTS') { ?>
    <?php
    /**
     * display the New Products Center Box
     */
    ?>
    <?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_whats_new.php'); ?>
    <?php } ?>
    
    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MISSING_UPCOMING') { ?>
    <?php
    /**
     * display the Upcoming Products Center Box
     */
    ?>
    <?php include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)); ?><?php } ?>
    Last edited by DivaVocals; 28 Dec 2013 at 10:57 PM.
    My Site
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

 

 
Page 4 of 4 FirstFirst ... 234

Similar Threads

  1. Redirect deleted, moved and discontinued products to the home page.
    By Podgeminster in forum General Questions
    Replies: 1
    Last Post: 15 Mar 2011, 02:11 AM
  2. Replies: 0
    Last Post: 8 Oct 2008, 03:58 PM
  3. Deleting discontinued products
    By thelatinbarbie in forum General Questions
    Replies: 5
    Last Post: 2 Jun 2008, 11:12 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •