PDA

View Full Version : Product Attributes Sort Order v1.0



michael_s
02-05-2009, 05:01 PM
FULL PACKAGE

Same as below; however, I forgot to apply my fix on the forum that you can find here: http://forums.oscommerce.com/index.php?s=&showtopic=327276&view=findpost&p=1363928

If you have the below package:

Find this:

tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values (null, '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . (float)tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "')");

REPLACE with this:

// BOE: Attribute Sort with Clone Tool
tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values (null, '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . (float)tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "', '" . (int)$attributes_sort . "')");
// EOE: Attribute Sort with Clone Tool

Scott

More... (http://addons.oscommerce.com/info/1822)

netviper
02-19-2009, 12:56 PM
I got this working BUT... see below.

Thanks,

netviper
02-19-2009, 01:27 PM
well, i got it working, but now it cant find any of my products

Warning:mysql_fetch_array(): supplied argument is not a valid MySQL results resource in /home/mysite/public_html/includes/functions/database.php on line 101

FYI, line 101 is " return $result;"

Please help. I don't know what I did wrong.

netviper
02-20-2009, 05:52 AM
Does this NOT work with OSCMAX??

jpf
03-01-2009, 10:43 AM
Please note the Forum.

osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > New osCommerce Contributions > Product Attributes Sort Order v1.0

This is a osCommerce contribution - not a osCMax. It will have to be manually and carefully added into osCMax - as might conflict with existing contributions.

pgmarshall
03-05-2009, 06:54 AM
This does work on OSCMAX - but you need to look into pad_base.php to find the line of code for STEP 1.

Where you add

. "' order by pa.attribute_sort");
to the end of the query called within the QT Pro MOD.

Everything else is straight forward.

Unfortunately, I have run into a new problem after sucessfully getting this MOD to work - when you easypopulate your data out, modify it and reupload this "extra" field "attribute_sort" is not included ... therefore I need a fix. Looking at adding the extra field to EasyPopluate download - anyone got any pointers on where to start - EZ Fields looks as good a place as any but this says you can only have fields in the products table.

Help anyone ...:rolleyes:

pgmarshall