Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Master Product 1.1.5 & TotalB2B


Moloko

Recommended Posts

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...