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 :)
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 :)
Sorry this title should have read 1.5.4 and not 1.5.5 :/
And where did you find the 1.3 mod? Chances are it will still work in 1.5.x
Zen cart installation / maintenance / customisation / hosting
Supported Modules: Dutch language pack, Multi site, Dynamic Price Updater and more.
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:
replace withPHP Code:
$display_limit = zen_get_new_date_range();
in the query, find: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;
add after:PHP Code:
pd.products_name,
same query, find:PHP Code:
products_date_available as date_expected,
add after:PHP Code:
$display_limit
find:PHP Code:
. $limit_clause
change to:PHP Code:
require($template->get_template_dir('tpl_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_whats_new.php');
find:PHP Code:
require($template->get_template_dir('tpl_whats_expected.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_whats_expected.php');
change to:PHP Code:
$title = BOX_HEADING_WHATS_NEW;
$title_link = FILENAME_PRODUCTS_NEW;
Now in /includes/templates/template_default/sideboxes/tpl_whats_expected.phpPHP Code:
$title = 'Upcoming Products';
$title_link = '';
find:
add after:PHP Code:
$content .= '<div>' . $whats_new_price . '</div>';
Go to admin and activate new boxPHP Code:
$content .= '<div>' . zen_date_short($random_whats_new_sidebox_product->fields['date_expected']) . '</div>';
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
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 ..
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'] . "'" .
Zen cart installation / maintenance / customisation / hosting
Supported Modules: Dutch language pack, Multi site, Dynamic Price Updater and more.
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
In includes/modules/sideboxes/upcoming.php find:
and changePHP Code:
$limit_clause = " order by " . EXPECTED_PRODUCTS_FIELD . " " . EXPECTED_PRODUCTS_SORT . "
limit " . MAX_DISPLAY_UPCOMING_PRODUCTS;
to a (hard coded) number like:PHP Code:
" . MAX_DISPLAY_UPCOMING_PRODUCTS
PHP Code:
$limit_clause = " order by " . EXPECTED_PRODUCTS_FIELD . " " . EXPECTED_PRODUCTS_SORT . "
limit 9";
Zen cart installation / maintenance / customisation / hosting
Supported Modules: Dutch language pack, Multi site, Dynamic Price Updater and more.
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!
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
Bookmarks