Graveyard666 Posted February 3, 2004 Share Posted February 3, 2004 I just installed the preorder contribution but can't get it to appear in my column_left.php how do i get it to work? it didnt come with a readme.txt file Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted March 10, 2004 Share Posted March 10, 2004 Hi Jeff I just installed yesterday the preoorder contrieb. The reason why the box don't show up is the contrieb is not complete yet there is no order in the left or right column to show up a preorder box and even you put some order in column left or right it won't show up, only a big error message. I looked all over for any solution but looks like there is nobody using this kind of funktion in his store. So we have to wait until somebody comes up with a solution to this contriebution. :( Greets Tsimi Quote Link to comment Share on other sites More sharing options...
Ziggy Posted May 27, 2005 Share Posted May 27, 2005 I have a solution that gets you 50% of the way there... Firstly, three simple things... add - define('BOX_HEADING_PREORDER', 'Pre-Order'); to the catalog/includes/languages/english.php file add - include(DIR_WS_BOXES . 'preorder.php'); to the catalog/includes/column_right.php (or left) file and add - define('FILENAME_PREORDER', 'products_new.php?sql_add=pre'); to the catalog/includes/filenames.php file. Also, in catalog/products_new.php you may have to change the word Preordini to the English, or another language: echo HEADING_TITLE; } if ($sql_add == 'pre') { echo Preordini; This gets the infoBox working, but products_new.php is screwy. If you use the original catalog/products_new.php file and find the following section: $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name"; $products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW); and replace it with: // added for Preorder contribution if ($sql_add == 'pre') { $sql_add_code ='and p.products_date_available > curdate()'; } if (empty($sql_add)) { $sql_add_code ='and p.products_date_available <= curdate() OR p. products_date_available IS NULL'; } // end of Preorder code $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id " . $sql_add_code . " and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name"; $products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW); The link from the top of the preorder box now links to a list of all preorders. Unfortunately, now the listing for new products latches onto one product and displays the price for that alone (at least on my build anyway). See how it goes, I think we're getting closer. Quote Link to comment Share on other sites More sharing options...
Ziggy Posted May 27, 2005 Share Posted May 27, 2005 Update: removing a bit from the query seems to solve the problem. The bit above the query in products_new.php should be: // added for Preorder contribution if ($sql_add == 'pre') { $sql_add_code ='and p.products_date_available > curdate()'; } if (empty($sql_add)) { $sql_add_code ='and p.products_date_available < curdate()'; } // end of Preorder code I've uploaded the full contribution: Preorder Box Quote Link to comment Share on other sites More sharing options...
Zaxx Posted August 16, 2005 Share Posted August 16, 2005 (edited) echo HEADING_TITLE; } if ($sql_add == 'pre') { echo Preordini; Did not get that to work, so I changed it, and got it to work.... even though I'm a total biginner in php ;) <?php if ($sql_add == 'pre') { echo Preorder; } else { echo HEADING_TITLE; } ?> instead of the <?php echo HEADING_TITLE;?> line // Zaxx Edited August 16, 2005 by Zaxx Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.