Moloko Posted July 28, 2006 Share Posted July 28, 2006 Hi there, first post :) I'm tryin' to add the Master Product contrib to my store that alreadyhas the TotalB2B contrib. I can easyly edit some files, but i think on some other the two contribs overlap. For example in /includes/modules/new_product.php this is the beginning of my code: <!-- new_products //--> <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B'))); new infoBoxHeading($info_box_contents, false, false, false, $column_location); ?> <?php //TotalB2B start if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price from " . TABLE_PRODUCTS . " p where products_status = '1' and vetrina = '1' order by rand() desc limit " . MAX_DISPLAY_NEW_PRODUCTS); // $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by rand() DESC limit " . MAX_DISPLAY_NEW_PRODUCTS); } else { $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, p.products_price as products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and vetrina = '1' order by rand() desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } //TotalB2B end $row = 0; $col = 0; $info_box_contents = array(); and for master products should be: <?php $info_box_contents = array(); $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B'))); //Master Products new infoBoxHeading($info_box_contents, false, true); if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_listing_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } else { $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and products_listing_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } //Master Products EOF $row = 0; $col = 0; $info_box_contents = array(); i'm new to php, so i don't know how to procede. Anyone has already done this? There are 3/4 files that are in conflict, and i'm stuck with them... thanks in advance for you help Moloko Quote Link to comment Share on other sites More sharing options...
Moloko Posted July 31, 2006 Author Share Posted July 31, 2006 Hi there. I've studied a little bit and i found that on 17 files there are three with potential conflict between Master product e B2B: admin/includes/categories.php /includes/new_products.php index.php Anybody has evere integrated this two contrib? Quote Link to comment Share on other sites More sharing options...
trogette Posted August 1, 2006 Share Posted August 1, 2006 not looked at the B2B one but do you have a file comparison program? I like Beyond Compare. 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.