osCmax v2.5 User Manual
Results 1 to 3 of 3

Preorder Mod

This is a discussion on Preorder Mod within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; Ok i posted a question yesterday in the features forum requesting help in setting up the ability to place preorders ...

      
  1. #1
    New Member
    Join Date
    Oct 2005
    Posts
    20
    Rep Power
    0


    Default Preorder Mod

    Ok i posted a question yesterday in the features forum requesting help in setting up the ability to place preorders in osCMax with no luck as far as a response goes.

    However I have continued to look and came across this contribution on the osCommerce site.

    http://www.oscommerce.com/community/...earch,preorder

    I am not sure if this is going to help me or not but i want to install it on my test system to check it out.

    This is what i ahce done so far.

    1. I've added the preorder info box via the infobox admin panel as opposed to modifying the files as sugested in the Readme.txt. I began to modify manually until i noticed that due to modification on osCMax this didn't make sense.

    2. I added the preorder.php file to catalog/includes/boxes/

    3. This is where i am stumped. this is what the Readme.txt tells me to do

    In catalog/products_new.php

    first, find the following:

    Code:
    echo HEADING_TITLE;
    }
    if ($sql_add == 'pre')
    {
    echo Preordini;
    The word 'Preordini' there is the title of your Preorder page, so change it to suit your language.


    In the same file, find:

    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 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:

    Code:
    // 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
    $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);
    Well because of BTS i have to go to the \catalog\templates\fallback\content ditectory and i find products_new.tpl.php. When I open this file i cannot find the code mentioned in the first part of step 3. I did find echo HEADING_TITLE; on line 5 but it does not match the direction. Can anyone help me with this my coding skills are limited to find, cut and paste.

    I did find the line mentioned in the seconed part on line 16 and i think all i need to do here is cut and paste.

    So i still don't know if this is going to help me out but i'd like to check and see since there doesn't seem to be much activity on my original post and i really would like to have this feature on my site.

  2. #2
    New Member
    Join Date
    Oct 2005
    Posts
    20
    Rep Power
    0


    Default RE: Preorder Mod

    Can anyone help me with this. I am assuming it is a bts issue but the Readme is written for stock oScommerce.

  3. #3
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,699
    Rep Power
    22


    Default

    Take code:
    Code:
                <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
    Change to:

    Code:
                <td class="pageHeading"><?php echo HEADING_TITLE;
    }
    if ($sql_add == 'pre')
    {
    echo Preordini; ?></td>
    And change the rest as needed... Make 100% sure your replacing code as specified - if there is OSCMAX added code then check and see if you can still keep that part....

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
  •