Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Master Products - MS2


Guest

Recommended Posts

Advanced search fix for Buy now button. Code cleaning and change slave_id with master_id.

 

catalog/includes/modules/product_listing.php

 

find in line 142:

 

        	} elseif ($listing['products_master'] != '0') {
         	$prod_list_contents .= '    	<td align="center">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . (($listing['products_master']) != "0" ? ((strpos(trim(str_replace('_', '', $listing['products_master'])), ' ') !== false) ? ($listing['products_id']) : (trim(str_replace('_', '', $listing['products_master'])))) : $listing['products_id']))) . '</td>';

 

change to:

 

        	} elseif ($listing['products_master'] != '0') {
         	$prod_list_contents .= '    	<td align="center">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . ((strpos(trim(str_replace('_', '', $listing['products_master'])), ' ') !== false) ? (trim(str_replace('_', '', $listing['products_master']))) : ($listing['products_id'])))) . '</td>';

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

Thanks for that. Seemed to fix it, its now led onto a loads of errors!!

 

See

 

euroshack.com/shop

 

Warning: include(includes/classes/action_recorder.php) [function.include]: failed to open stream: No such file or directory in /home/euro/public_html/shop/includes/application_top.php on line 300

 

Warning: include(includes/classes/action_recorder.php) [function.include]: failed to open stream: No such file or directory in /home/euro/public_html/shop/includes/application_top.php on line 300

 

Warning: include() [function.include]: Failed opening 'includes/classes/action_recorder.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/euro/public_html/shop/includes/application_top.php on line 300

 

Warning: require(includes/classes/osc_template.php) [function.require]: failed to open stream: No such file or directory in /home/euro/public_html/shop/includes/application_top.php on line 454

 

Warning: require(includes/classes/osc_template.php) [function.require]: failed to open stream: No such file or directory in /home/euro/public_html/shop/includes/application_top.php on line 454

 

Fatal error: require() [function.require]: Failed opening required 'includes/classes/osc_template.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/euro/public_html/shop/includes/application_top.php on line 454

 

Its not going well isnt this install!

Link to comment
Share on other sites

Thanks for that. Seemed to fix it, its now led onto a loads of errors!!

 

See

 

euroshack.com/shop

 

Warning: include(includes/classes/action_recorder.php) [function.include]: failed to open stream: No such file or directory in /home/euro/public_html/shop/includes/application_top.php on line 300

 

Warning: include(includes/classes/action_recorder.php) [function.include]: failed to open stream: No such file or directory in /home/euro/public_html/shop/includes/application_top.php on line 300

 

Warning: include() [function.include]: Failed opening 'includes/classes/action_recorder.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/euro/public_html/shop/includes/application_top.php on line 300

 

Warning: require(includes/classes/osc_template.php) [function.require]: failed to open stream: No such file or directory in /home/euro/public_html/shop/includes/application_top.php on line 454

 

Warning: require(includes/classes/osc_template.php) [function.require]: failed to open stream: No such file or directory in /home/euro/public_html/shop/includes/application_top.php on line 454

 

Fatal error: require() [function.require]: Failed opening required 'includes/classes/osc_template.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/euro/public_html/shop/includes/application_top.php on line 454

 

Its not going well isnt this install!

 

Do you use V2.31?

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

I did yes. I overwrit all my original files with the /newshop files, updated the sql and boom. Got hit with a page full of errors. I had the STS templates mod installed but that was it. Do you think this has effected it?

 

Note: the STS system is not compatible with oscommerce v2.31.

 

Just moment! Did you installed oscommerce V2.31?

 

Firstly I suggest you to do one new shop installation.

Secondly before the next step backup store and database.

 

Thirdly run SQL modification.

And finaly copy all new files from latest contribution Master Products V2.3x V2.0a.

 

If you will get some problem write here. I try to help.

Edited by Gergely

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

Finished Easy Populate Support for Master Products V2.3x

 

http://addons.oscommerce.com/info/7725/v,23

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

Hello,

 

i installed the above contri but when i need the large image it is not in the .csv?

Can someone help me out whit this.

 

I have 1 small image and 2 large but in the .csv is only the small one.

 

Regards,

 

Jasper

Link to comment
Share on other sites

Hello,

 

i installed the above contri but when i need the large image it is not in the .csv?

Can someone help me out whit this.

 

I have 1 small image and 2 large but in the .csv is only the small one.

 

Regards,

 

Jasper

 

Hi Jasper,

 

at this moment TABLE_PRODUCTS_IMAGES support not included. Later this will be access.

If you like, but this is very complicated, you can do it by yourself. Similar to EP_MVS_SUPPORT but there are some differencies.

I'm doing only MASTER_PRODUCTS_SUPPORT. Maybe better you post your question into esypopulate forum.

 

Best regards,

Gergely

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

  • 2 weeks later...

Hi Guys,

 

I am in the process of installing Master Products into 2.3.1 but I receive this error on admin/categories.php

 

Warning: mysql_query() expects parameter 1 to be string, resource given in C:\wamp\www\catalog\admin\includes\functions\database.php on line 45

0 -

 

Resource id #73

 

[TEP STOP]

 

Any clues as to why this error is happening?

 

Thanks

 

Mark

Link to comment
Share on other sites

Hi Guys,

 

I am in the process of installing Master Products into 2.3.1 but I receive this error on admin/categories.php

 

 

 

Any clues as to why this error is happening?

 

Thanks

 

Mark

 

ok I have it working now (I think). I went back to basics and used the contribs admin/categories.php and compared and merged my categories.php

 

Mark

Link to comment
Share on other sites

ok I have it working now (I think). I went back to basics and used the contribs admin/categories.php and compared and merged my categories.php

 

Mark

 

Hi Mark,

 

there are some problems. The fixes are not included in contribution. Test it and I will help you. My store enhanced more then original, so I have to look after.

 

Known and my fixed bugs:

 

* If product has attributes not correct to put cart. (FIXED with slave action)

* Fix Add Master products to cart when not have price (Main product)

* Fix Master products listing (enabled/disabled)

* Fix listing if has more manufacturers (drop-down list)

* Fix catalog/includes/function/general.php (minor only for new shop)

* Advanced search fix for Buy now button. Code cleaning and change

slave_id with master_id.

catalog/includes/modules/product_listing.php

* Fix bm_shopping_cart link

* Quantity drop down fix when master has no quantity

 

Maybe I found others, but I dont remember to all.

 

The best way if you dont use price for masters but in this case you don't give quantity too.

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

Hi Toth,

 

One major problem I have come across is that when I try and disable say the products description in the module by changing the config value to 0 I get this error on the product info page.

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'limit 0, 12' at line 1

 

select p.products_image, p.products_model,pd.products_description, pd.products_name, p.products_id, p.manufacturers_id, p.products_tax_class_id, s.specials_new_products_price, s.status, p.products_price from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join specials s on p.products_id = s.products_id where p.products_id = pd.products_id and p.products_master like '% 1 %' and p.products_status = '1' and pd.language_id = '1' order by limit 0, 12

 

[TEP STOP]

 

Any ideas

 

Mark

Link to comment
Share on other sites

Hi Toth,

 

One major problem I have come across is that when I try and disable say the products description in the module by changing the config value to 0 I get this error on the product info page.

 

 

 

Any ideas

 

Mark

 

This is not a general problem only very special.

 

catalog\includes\modules\master_products.php

 

change:

    	case 'MASTER_LIST_PRICE':
     	$master_sql .= "p.products_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
     	break;
 	}

 

to:

 

    	case 'MASTER_LIST_PRICE':
     	$master_sql .= "p.products_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
     	break;
   	default:  // when admin disable one column prevent only sql error
     	$master_sql .= "p.products_id";
     	break;
 	}

 

I found only non visible errors if set product name to 0. So I fix then use sorted slave list by name and set admin 0 name for disable display.

 

catalog\includes\modules\master_listing.php

 

Change:

  	$lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text);

 

To:

  	$lc_text = (isset($HTTP_GET_VARS['sort']) ?  tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text) :  '');  // if not set sort gets erorrs

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

Hi all,

 

I just did an update on my shop recently, took me some days to get everything back to work.

 

The new version of the master contrib works fine so far, except one thing:

 

If a customer is putting a slave into the shopping cart, the concerning master is automatically added, too.

All my master's are just placeholders which have price 0.00

 

What can I do to prevent the masters from being added to the shopping cart?

 

Help on this would be great, I couldn't find anything yet.

 

Thanks for this great contribution so far :)

 

Ronald

Link to comment
Share on other sites

Hi all,

 

I just did an update on my shop recently, took me some days to get everything back to work.

 

The new version of the master contrib works fine so far, except one thing:

 

If a customer is putting a slave into the shopping cart, the concerning master is automatically added, too.

All my master's are just placeholders which have price 0.00

 

What can I do to prevent the masters from being added to the shopping cart?

 

Help on this would be great, I couldn't find anything yet.

 

Thanks for this great contribution so far :)

 

Ronald

 

 

Hi Ronald and everybody,

 

thanks for all posts.

 

I will give you steps for edit cart action but there were conflicts with quantity drop down fields and attributes too. I give the first step in catalog\includes\application_top.php

 

Change (or something like this. All case 'add_slave' have to change):

//Master Products
 	// customer adds multiple products from the master_listing page
 	case 'add_slave' :
 	// Master Products modification if attributes needed
/*                       		if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
                           	$attributes = isset($HTTP_POST_VARS['id']) ? $HTTP_POST_VARS['id'] : '';
                           	$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes))+1, $attributes);
                         	} */
	// Master Products modification
                    		reset($HTTP_POST_VARS);
                         	while ( list( $key, $val ) = each( $HTTP_POST_VARS ) ) {
                           	if (substr($key,0,11) == "Qty_ProdId_" && ($val != 0)) {
                             	$prodId = substr($key,11);
                             	$qty = $val;
                             	if(isset($HTTP_POST_VARS["id_$prodId"]) && is_array($HTTP_POST_VARS["id_$prodId"])) {
                               	// We have attributes
                               	$cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId,$HTTP_POST_VARS["id_$prodId"]))+$qty, $HTTP_POST_VARS["id_$prodId"]);
                             	} else {
                               	// No attributes
                               	$cart->add_cart($prodId, $cart->get_quantity($prodId)+$qty);
                             	}
                           	}
                         	}
                         	tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                         	break;
//Master Products EOF
 	// performed by the 'buy now' button in product listings and review page

 

 

To:

 

 	case 'add_slave' :
                         	while ( list( $key, $val ) = each( $HTTP_POST_VARS ) ) {
                           	if (substr($key,0,11) == "Qty_ProdId_" && ($val !== 0)) {
                             	$prodId = substr($key,11);
                             	$qty = $val;
                             	if(isset($HTTP_POST_VARS["id_$prodId"]) && is_array($HTTP_POST_VARS["id_$prodId"])) {
                               	// We have attributes
                               	$cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId, $HTTP_POST_VARS["id_$prodId"]))+$qty, $HTTP_POST_VARS["id_$prodId"]);
                             	} else {
                               	if (isset($HTTP_POST_VARS["products_id"]) && isset($HTTP_POST_VARS['id'])) {
                              		// We have attributes with normal product only
                                 	if ($prodId == $HTTP_POST_VARS['products_id']) {
                                   	$attributes = $HTTP_POST_VARS['id'];
                                 	} else {
                                   	$attributes = $HTTP_POST_VARS["id_$prodId"];
                                 	}
                                 	$cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId, $attributes))+$qty, $attributes);
                               	} else {
                               	// No attributes and normal products
                               	$cart->add_cart($prodId, $cart->get_quantity($prodId)+$qty);
                               	}
                             	}
                           	}
                         	}
                         	tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                         	break;
 	// performed by the 'buy now' button in product listings and review page

 

The next steps will be in catalog\product_info.php

 

Change in line 27:

  if ($master_check['products_master_status'] > 0) {

 

To:

 

  if ($master_check['products_master_status'] > 0 || $master_check['products_master'] == 0) { // this modify!!

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

  • 3 weeks later...

Hello,

 

I am having some troubles becoming PCI compliant and I have two SQL injection errors that I believe are attributed to the Master Products contribution. Can anyone provide some assistance? I'm a bit clueless when it comes to this sort of thing, but the action that is triggering the SQL error seems to be associated with this contribution. Any thoughts on how this scan is causing this problem? I spent the weekend going through everything that I know and I cant seem to figure out a way to replicate this problem. Any help or advice here would be tremendous. Thank you.

 

Information From Target:

Regular expression "You have an error in your SQL syntax" matched contents of /product_info.php.

 

Query Parameters

 

* Qty_ProdId_14829 - 0

* Qty_ProdId_14828 - 0

* Qty_ProdId_14834 - 0

* Qty_ProdId_14832 - 0

* Qty_ProdId_14833 - 0

* Qty_ProdId_14830 - 0

* Qty_ProdId_14831 - 0

* Qty_ProdId_14827 - 0

* Qty_ProdId_14826 - 0

* cPath - 1350_506_1214

* products_id - 10286

* action - add_slave\'SQL

Link to comment
Share on other sites

Hello from me as well,

 

I have the following situation which i am not sure if it is some kind of bug or it is how Master supposed to work.

 

When i create items is a specific category, which work as "slave", i cannot see them in the catalog at the same category. (actually i cannot see them anywhere)

 

Is this the way Master Products supposed to work ?? or is something that i have missed ???

 

Thank you in advance.

 

Theodore Zikos

Link to comment
Share on other sites

Hello,

 

I am having some troubles becoming PCI compliant and I have two SQL injection errors that I believe are attributed to the Master Products contribution. Can anyone provide some assistance? I'm a bit clueless when it comes to this sort of thing, but the action that is triggering the SQL error seems to be associated with this contribution. Any thoughts on how this scan is causing this problem? I spent the weekend going through everything that I know and I cant seem to figure out a way to replicate this problem. Any help or advice here would be tremendous. Thank you.

 

Information From Target:

Regular expression "You have an error in your SQL syntax" matched contents of /product_info.php.

 

Query Parameters

 

* Qty_ProdId_14829 - 0

* Qty_ProdId_14828 - 0

* Qty_ProdId_14834 - 0

* Qty_ProdId_14832 - 0

* Qty_ProdId_14833 - 0

* Qty_ProdId_14830 - 0

* Qty_ProdId_14831 - 0

* Qty_ProdId_14827 - 0

* Qty_ProdId_14826 - 0

* cPath - 1350_506_1214

* products_id - 10286

* action - add_slave\'SQL

 

Hi,

 

Which version do you use? This looks like application_top add to cart action. Do you use dropdown or enter products number to add cart?

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

Hello from me as well,

 

I have the following situation which i am not sure if it is some kind of bug or it is how Master supposed to work.

 

When i create items is a specific category, which work as "slave", i cannot see them in the catalog at the same category. (actually i cannot see them anywhere)

 

Is this the way Master Products supposed to work ?? or is something that i have missed ???

 

Thank you in advance.

 

Theodore Zikos

 

Hi,

 

The best way if you choose slave in the same category as founded master product. The normal product listing works on category selection.

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

Hi,

 

Which version do you use? This looks like application_top add to cart action. Do you use dropdown or enter products number to add cart?

 

Hi Gergely,

 

Thank you for your reply. I am using Master Products MS2 version 1.2.5 for osCommerce 2.2.rc2a. We use entering products number to add to cart. This error only occurs during PCI Compliance scan, not during normal use. I cannot create the error they are giving me. My site works great otherwise.

 

You mentioned application_top and I should tell you I use Security Pro http://addons.oscommerce.com/info/5752 which modifies that file.

 

Thank you for your time,

 

Matt

Link to comment
Share on other sites

Hi Gergely,

 

Thank you for your reply. I am using Master Products MS2 version 1.2.5 for osCommerce 2.2.rc2a. We use entering products number to add to cart. This error only occurs during PCI Compliance scan, not during normal use. I cannot create the error they are giving me. My site works great otherwise.

 

You mentioned application_top and I should tell you I use Security Pro http://addons.oscommerce.com/info/5752 which modifies that file.

 

Thank you for your time,

 

Matt

 

I think the number inputs cause problem. I've never done SQL injection, but I think quantity number fields not the best effective to inject. This field use numbers only. Ask experts for it. The original versions V2.31 or RC2.2 dont use fields here, only add to cart buttons.

 

Sorry but I dont remember exactly, if you can do test again try this on application_top.php if you fund this code. (Some previous post before I posted V2.31 code for it, but we use droppdown quantity.

 

Find:

 
 	$qty = $val;

change to:

   	
$qty = (is_numeric($val) ? $val : 0);  // prevent SQL injection

 

or install from extras drop down field.

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

Sorry to bother you again.

 

As far as i can understand there is something going on with Product Listing Display On / Off Switch. It doesn't seem to work. Can you think of

something i can check ???

 

Thank you again.

 

Theodore Zikos

 

 

Maybe this solution. I didnt have time to finish yet.

 

******************************************************************************

* 4. step fix catalog/index.php

*

* Fix Master products listing (enabled/disabled)

* Fix listing if has more manufacturers (drop-down list)

*

******************************************************************************

 

 

Change:

// We show them all

$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

 

 

 

To:

 

// We show them all

$listing_sql = "select " . $select_column_list . " p.products_id, p.products_quantity as pqty, 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_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

 

 

 

Change:

 

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

$filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name";

} else {

$filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name";

}

 

 

To:

 

// Master Products BOF

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

$filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_listing_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name";

} else {

$filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.products_listing_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name";

}

// Master Products EOF

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

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