Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    May 2014
    Location
    UK
    Posts
    317
    Plugin Contributions
    0

    Default Upcoming Products

    Hi all.

    Just wondered if anyone has managed to get Upcoming Products working in a sidebox. The only one available is for v1.3 so doesn't work with 1.5.4

    Thank you :)

  2. #2
    Join Date
    May 2014
    Location
    UK
    Posts
    317
    Plugin Contributions
    0

    Default Re: Upcoming Products

    Sorry this title should have read 1.5.4 and not 1.5.5 :/

  3. #3
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: Upcoming Products

    And where did you find the 1.3 mod? Chances are it will still work in 1.5.x

  4. #4
    Join Date
    Feb 2010
    Location
    Syracuse, NY
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Upcoming Products

    There really isn't much of any difference in any product side-box except the product query.

    Copy the /includes/modules/sideboxes/whats_new.php
    Rename it to /includes/modules/sideboxes/whats_expected.php

    Copy the /includes/templates/template_default/sideboxes/tpl_whats_new.php
    Rename it to /includes/templates/template_default/sideboxes/tpl_whats_expected.php

    In /includes/modules/sideboxes/whats_expected.php

    find:
    PHP Code:
      $display_limit zen_get_new_date_range(); 
    replace with
    PHP Code:
    $display_limit zen_get_upcoming_date_range();

    $limit_clause "  order by " . (EXPECTED_PRODUCTS_FIELD == 'date_expected' 'date_expected' 'products_name') . " " . (EXPECTED_PRODUCTS_SORT == 'asc' 'asc' 'desc') . "
                       limit " 
    . (int)MAX_DISPLAY_UPCOMING_PRODUCTS
    in the query, find:
    PHP Code:
    pd.products_name
    add after:
    PHP Code:
    products_date_available as date_expected
    same query, find:
    PHP Code:
    $display_limit 
    add after:
    PHP Code:
     $limit_clause 
    find:
    PHP Code:
        require($template->get_template_dir('tpl_whats_new.php',DIR_WS_TEMPLATE$current_page_base,'sideboxes'). '/tpl_whats_new.php'); 
    change to:
    PHP Code:
        require($template->get_template_dir('tpl_whats_expected.php',DIR_WS_TEMPLATE$current_page_base,'sideboxes'). '/tpl_whats_expected.php'); 
    find:
    PHP Code:
        $title =  BOX_HEADING_WHATS_NEW;
        
    $title_link FILENAME_PRODUCTS_NEW
    change to:
    PHP Code:
        $title =  'Upcoming Products';
        
    $title_link ''
    Now in /includes/templates/template_default/sideboxes/tpl_whats_expected.php
    find:
    PHP Code:
        $content .= '<div>' $whats_new_price '</div>'
    add after:
    PHP Code:
        $content .= '<div>' zen_date_short($random_whats_new_sidebox_product->fields['date_expected']) . '</div>'
    Go to admin and activate new box

    This will work as is!

    However I would consider changing every instance of $random_whats_new_sidebox_product and $whats_new to $random_whats_expected_sidebox_product and $whats_expected

  5. #5
    Join Date
    May 2014
    Location
    UK
    Posts
    317
    Plugin Contributions
    0

    Default Re: Upcoming Products

    Hi I found the v1.3 on here in Sidebox Plugins .... uploaded 4 files which do not change any existing files .. Admin acknowledged the new plugin .. activated it and NOTHING!!!! I know we have 4 upcoming products if I switch that on in the centre bar ... these are not activating the sidebox ..

  6. #6
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: Upcoming Products

    I was kind of hoping you gave a link, so I would not have to guess. So now i geuss you used this mod. If that's the case, it is expecting the product has a dat in the future and the status has to be green, or in stock.

    Code:
    $expected_query = "select p.products_id, p.products_image, pd.products_name, products_date_available as date_expected, p.master_categories_id
                         from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                         where p.products_id = pd.products_id
                         and p.products_status = 1
                         and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'" .

  7. #7
    Join Date
    May 2014
    Location
    UK
    Posts
    317
    Plugin Contributions
    0

    Default Re: Upcoming Products

    Sorry yes I should have given you a link .. my bad. OK so now I have both the scrolling and the static upcoming products working but in order to do that I have to switch Upcoming Products to more than zero in the Maximum Values definitions in Admin .. which switches back on the list at the bottom centre of the page ... that's the bit I want to dispense with .. no sense in having it in a sidebox and at the bottom of every page .... Now just need to know how to deactivate this centre box

  8. #8
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: Upcoming Products



    In includes/modules/sideboxes/upcoming.php find:
    PHP Code:
      $limit_clause "  order by " EXPECTED_PRODUCTS_FIELD " " EXPECTED_PRODUCTS_SORT "
                       limit " 
    MAX_DISPLAY_UPCOMING_PRODUCTS
    and change
    PHP Code:
    " . MAX_DISPLAY_UPCOMING_PRODUCTS 
    to a (hard coded) number like:
    PHP Code:
      $limit_clause "  order by " EXPECTED_PRODUCTS_FIELD " " EXPECTED_PRODUCTS_SORT "
                       limit 9"


  9. #9
    Join Date
    May 2014
    Location
    UK
    Posts
    317
    Plugin Contributions
    0

    Default Re: Upcoming Products

    Sorry .. I think I may be confusing the issue. There is no upcoming.php in includes/modules/sideboxes.

    Sideboxes are not the problem .. I see that the includes/templates/template_default/templates/tpl_index_default calls the centre box at line 74 on mine .. I have tried to comment these lines out with /** (doesn't work) and <!-- down to --> and it still produces the centre-box with --> after it. I'm using EditPlus 3 and this is a really strange new one on me!

  10. #10
    Join Date
    May 2014
    Location
    UK
    Posts
    317
    Plugin Contributions
    0

    Default Re: Upcoming Products

    Ok I have got it sorted .. thanks guys you were pointing me in the right direction .. just took a few trials to make it work.

    You're right the v1.3 scrolling plugin does work as long as you have the number of expected products more than zero but that then also displays the expected books at the bottom of the index page TWICE! I have finally found the right combination of comment out lines in includes/templates/template_default/templates/tpl_index_default by putting line returns after every <?php and before every ?> so that I casn see where the IF statement starts and finishes .. thank you for your time

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. How to disable boxes 'New Products For', 'upcoming products' etc.'?
    By yalus in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 3 Feb 2011, 03:49 PM
  2. Upcoming Products
    By audiografix in forum General Questions
    Replies: 1
    Last Post: 31 Oct 2008, 01:50 PM
  3. Upcoming Products
    By elbes in forum General Questions
    Replies: 2
    Last Post: 3 Jul 2007, 02:52 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR