osCmax v2.5 User Manual
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Master Products

This is a discussion on Master Products within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; I am attempting to install Master Products to osCmax 2.2 In catalog/index.php, I was supposed to look for a line, ...

      
  1. #1
    New Member
    Join Date
    Jan 2011
    Posts
    19
    Rep Power
    0


    Default Master Products

    I am attempting to install Master Products to osCmax 2.2

    In catalog/index.php, I was supposed to look for a line, and I found a lot of lines that were similar. I'm not sure if I should just change one, or change them all. I tried changing them all, like so:
    Code:
    // look for //     $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price,                                                   p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL)           as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price)                as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . "               p2c where p.products_status = '1'                                                                                                                                                                                        and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
    // replace with // $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_master, p.products_master_status,      p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL)           as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price)                as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . "               p2c where p.products_status = '1' and p.products_master = '0' and p.products_listing_status = '1'                                                                                                                        and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
    //found, altered// $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_master, p.products_master_status, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . "                                                                 p2c where p.products_status = '1' and p.products_master = '0' and p.products_listing_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";
    	           $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_master, p.products_master_status,      p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL)           as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price)                as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . "                                                     p2c where p.products_status = '1' and p.products_master = '0' and p.products_listing_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";
                       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_master, p.products_master_status, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m                                                                                                            where p.products_status = '1' and p.products_master = '0' and p.products_listing_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";
                       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_master, p.products_master_status,      p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL)           as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price)                as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m                                                                                                             where p.products_status = '1' and p.products_master = '0' and p.products_listing_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";
                       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_master, p.products_master_status, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . "                                                                  p2c where p.products_status = '1' and p.products_master = '0' and p.products_listing_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
                       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_master, p.products_master_status,      p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL)           as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price)                as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . "                                                                   p2c where p.products_status = '1' and p.products_master = '0' and p.products_listing_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
                       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_master, p.products_master_status, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . "              p2c where p.products_status = '1' and p.products_master = '0' and p.products_listing_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
                       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_master, p.products_master_status,      p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL)           as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price)                as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_master = '0' and p.products_listing_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
    Should I only be changing one line? Or did I do it correctly in all the changed lines above?
    Last edited by mraeryceos; 05-04-2011 at 06:31 AM.

  2. #2
    New Member
    Join Date
    Jan 2011
    Posts
    19
    Rep Power
    0


    Default Re: Master Products

    anyone out there?

  3. #3
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Default Re: Master Products

    Yes - Lots of us!

    But ... in order to promote a response you might want to make it a bit easier for us to help you ... how about providing a link to mod at oscommerce ... otherwise you are expecting people to have an in depth knowledge of all mods at oscommerce and be able to help you off the top of their heads ... we also don't know which version of the mod you are using ...

    Blog post about getting better responses: Getting "better" answers in the forums - Blogs - osCmax™ shopping cart software forums

    **Edit** - having had a quick look I can see a mod - but since the releases mix v2.2 and v2.3.1 you will need to be specific & I can not see the instruction you quote in the 20 odd page install document - so you are going to need to be much more specific!

    Regards,
    Last edited by pgmarshall; 05-04-2011 at 07:13 AM.
    pgmarshall
    _______________________________

  4. #4
    New Member
    Join Date
    Jan 2011
    Posts
    19
    Rep Power
    0


    Default Re: Master Products

    Sorry :-p I was trying to install
    Master Products RC2a - V 1.25
    osCommerce: Master Products - MS2

  5. #5
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Default Re: Master Products

    Sorry - but maybe I am missing something - I can not find the text you have posted anywhere in the install guide.

    Can you let me know where you got this from ...

    I can only see a select statement in file 19 ...

    Regards,
    pgmarshall
    _______________________________

  6. #6
    New Member
    Join Date
    Jan 2011
    Posts
    19
    Rep Power
    0


    Default Re: Master Products

    Code:
    File #19 - index.php  On or around line 191 replace
    
    $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
    
    with
    
    //Master Products
    $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_master, p.products_master_status, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_master = '0' and p.products_listing_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
    // Master Products EOF

  7. #7
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Default Re: Master Products

    Okay I get you ... Yes ... you will need to update all of the queries in the index page of osCmax as they control the different filter options ...

    Regards,
    pgmarshall
    _______________________________

  8. #8
    New Member
    Join Date
    Jan 2011
    Posts
    19
    Rep Power
    0


    Default Re: Master Products

    Thanks. I haven't tested the Master Product features yet, but the site appears to work fine with the edits I made above.

  9. #9
    New Member
    Join Date
    Jan 2011
    Posts
    19
    Rep Power
    0


    Default Re: Master Products

    Sorry I dropped this project for a while.

    I am having some problems. I created a master and assigned some slaves. However, when I browse products, I see the master and slaves listed together, when I should only see the master. When I click on any of these, I get the description that the master product has, but I don't get any option to select a slave for checkout. I just get the master in the cart.

    I don't even know where to start. What files need fixing?
    Last edited by mraeryceos; 08-08-2011 at 10:02 AM.

  10. #10
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Default Re: Master Products

    Met00 is probably the one to ask as I know he has this working on his stores.

    Regards,
    pgmarshall
    _______________________________

Page 1 of 2 12 LastLast

Similar Threads

  1. Master Products - MS2
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 01-05-2011, 02:00 PM
  2. Master Products - MS2
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 06-02-2009, 09:00 AM
  3. Master Products - MS2
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 04-01-2008, 12:13 PM
  4. Master Products - MS2
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 08-19-2007, 06:18 AM
  5. Master Products - MS2
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 06-12-2007, 05:30 AM

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
  •