kilngod Posted May 19, 2004 Share Posted May 19, 2004 If you are running the BTS template system mod (I'm using v1.3) and have the following problem: Admin works fine, attribute sort values are being stored in the table, but attribute values are not being sorted on the product pages You need to modify the code in the product_info.tpl.php file of your chosen template directory's "content" folder (i.e. /catalog/templates/YOURTEMPLATE/content/product_info.tpl.php) using the instructions you would normally use to alter the product_info.php file. Hope this helps someone. Here are the instructions from the attributes_sort_module.txt file: 2) modify files as follow: ----------------------------- --/catalog/product_info.php-- FIND: $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); REPLACE WITH: $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pa.attribute_sort"); Quote Link to comment Share on other sites More sharing options...
BrainZz Posted May 19, 2004 Share Posted May 19, 2004 Aight, i followed contribution installation everything went fine. I adjust a product option to sort it but if i look in my store i get this error: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\minixampp\htdocs\PrimaveraQuint\includes\functions\database.php on line 99 And the product isnt found anymore :( Im using a BTS template Quote Link to comment Share on other sites More sharing options...
battleaxe Posted May 24, 2004 Share Posted May 24, 2004 Hi, I installed this which looks like a great idea. When I entered a new product after install I got the followin in catalog: 1054 - Unknown column 'pa.attribute_sort' in 'order clause' select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from products_attributes pa, products_options_values pov where pa.products_id = '31' and pa.options_id = '6' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '1' order by pa.attribute_sort [TEP STOP] What have I done wrong kind regards KIM Quote Link to comment Share on other sites More sharing options...
Guest Posted May 29, 2004 Share Posted May 29, 2004 just about to try this to get my attributes in a selected order, but as im new what EXACTLY do i do regarding this: run included sql query thanks sorry im a newbie too.. what does this mean? run included sql query ??? how do i do this? Lame i know....... J Quote Link to comment Share on other sites More sharing options...
mijman2 Posted May 29, 2004 Share Posted May 29, 2004 You go to your PHP my admin, log in and then click on your database, then click on the tab that says SQL... Browse to the file in the folder that is an SQL file, set as autodetect, and then click run... Should do the rest itself! Quote Link to comment Share on other sites More sharing options...
Guest Posted May 30, 2004 Share Posted May 30, 2004 (edited) This would be a great mod if i could get it to work.. admin works fine, no errors.. it just will not sort the attributes into order.. any help here>>> thanks in advance.. Edited May 30, 2004 by guido1229 Quote Link to comment Share on other sites More sharing options...
mijman2 Posted May 30, 2004 Share Posted May 30, 2004 did you follow everything step by step? -you need to post a specific problem... Make sure you edited all the codes and files is my advice Quote Link to comment Share on other sites More sharing options...
Guest Posted May 30, 2004 Share Posted May 30, 2004 (edited) I get no errors .. only the new products are put into order.. the old product attributes do not Edited May 30, 2004 by guido1229 Quote Link to comment Share on other sites More sharing options...
mijman2 Posted May 30, 2004 Share Posted May 30, 2004 I am still a newb, but mine is working... Did you do the SQL entry and also the just make sure you redo everything i know it is a pain but same thing happened to me Quote Link to comment Share on other sites More sharing options...
Guest Posted May 30, 2004 Share Posted May 30, 2004 well my last posting was not correct either... it puts the attributes in but not in order... it did it once but not any more.. new or old product.....????? Quote Link to comment Share on other sites More sharing options...
Guest Posted May 30, 2004 Share Posted May 30, 2004 Well now Its working... edited the wrong general.php..lol at myself..thanks for great mod.. later Quote Link to comment Share on other sites More sharing options...
Guest Posted June 1, 2004 Share Posted June 1, 2004 Thanks guys!!! All works a treat now!!! I Love it!! Well Happy... lol Simple things eh.. Again thanx :D Quote Link to comment Share on other sites More sharing options...
martinmacca Posted June 8, 2004 Share Posted June 8, 2004 For those of you that were having problems getting this module to work with the options as images contribution installed...I got it to work by applying the changes outlined in the readme file to the catalog/options_images.php file. (around line 29) change $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pov.products_options_values_thumbnail, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' "); to $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pov.products_options_values_thumbnail, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pa.attribute_sort"); Applying the changes to product_info.php will only work if you have options as images disabled. Cheers - that the trick for me :D Quote Link to comment Share on other sites More sharing options...
martinmacca Posted June 8, 2004 Share Posted June 8, 2004 is there anyway of choosing the default option for each attribute. for when the product page loads ? E.G. if a customer clicks on the product LARGE Shirt, the product page loads with the option Large loaded by default , if a customer clicks on the product SMALL Shirt, the product page loads with the option Small loaded by default Alternate options are still sorted & available to choose from, but the default option is defaulted to what admin chooses Any Ideas Quote Link to comment Share on other sites More sharing options...
Starkness Posted June 16, 2004 Share Posted June 16, 2004 well, since that was so helpful, I had to say I also found this to fix the problem. Thanks!!!!!! For those of you that were having problems getting this module to work with the options as images contribution installed...I got it to work by applying the changes outlined in the readme file to the catalog/options_images.php file. (around line 29) change CODE $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pov.products_options_values_thumbnail, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' "); to CODE $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pov.products_options_values_thumbnail, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pa.attribute_sort"); Applying the changes to product_info.php will only work if you have options as images disabled. Now, who will tighten up this mod, and reflect this in a new version? Quote Thanks! Starkness Link to comment Share on other sites More sharing options...
Guest Posted June 16, 2004 Share Posted June 16, 2004 The mod works except that I need it to also add the attribute product weight, is there a way that this can happen??? This is the last problem I have with my site... Love to go live with this..... ie: attribute = 5lbs + $29.00 it adds the $29.00 but not the 5lbs Thanks Mike Quote Link to comment Share on other sites More sharing options...
d-lexy Posted June 17, 2004 Share Posted June 17, 2004 Hi guys, great contrib!!! however... has anyone successfully merged admin/categories.php file thats been modded for UltraPix with this contrib? I spent about 3 hours on this but I cant do it :( Quote Link to comment Share on other sites More sharing options...
rajbangar Posted June 23, 2004 Share Posted June 23, 2004 Great Contribution, is there any way of getting this to work with Easy Populate. Regards Raj Quote Raj Bangar SimplySpice the Site for People that are Passionate about Indian Cooking. Craftmango - European distributor of Scrapbook and Papercraft products Link to comment Share on other sites More sharing options...
martinmacca Posted June 23, 2004 Share Posted June 23, 2004 Great Contribution, is there any way of getting this to work with Easy Populate. Regards Raj Mine works with easy populate! Had that installed before i installed this contri Quote Link to comment Share on other sites More sharing options...
chnkiemnky Posted June 27, 2004 Share Posted June 27, 2004 I installed this mod and it is working perfectly. BUT, when I go to create a new product, all of my options are not listed under each attribute. (I am talking about the grid when adding a new product) Has anyone had this problem?? Thanks. Shanna Quote Link to comment Share on other sites More sharing options...
ValleyRoaster Posted July 4, 2004 Share Posted July 4, 2004 Hi I am installing the sort attributes order contrib and I saw that you had this same problem and you figured it out. Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/ourcoffe/public_html/estore/admin/includes/functions/general.php:1318) in /home/ourcoffe/public_html/estore/admin/includes/functions/sessions.php on line 67 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/ourcoffe/public_html/estore/admin/includes/functions/general.php:1318) in /home/ourcoffe/public_html/estore/admin/includes/functions/sessions.php on line 67 What did you do? I can change the order of my options but when I update I get this message Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/ourcoffe/public_html/estore/admin/includes/functions/general.php:1318) in /home/ourcoffe/public_html/estore/admin/includes/functions/sessions.php on line 67 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/ourcoffe/public_html/estore/admin/includes/functions/general.php:1318) in /home/ourcoffe/public_html/estore/admin/includes/functions/sessions.php on line 67 Warning: Cannot modify header information - headers already sent by (output started at /home/ourcoffe/public_html/estore/admin/includes/functions/general.php:1318) in /home/ourcoffe/public_html/estore/admin/includes/functions/general.php on line 18 It does update the item but I have to go back through the catalog to do the next item. Any help would be Greatly appreciated! Pete Our Coffee Barn Quote Life Is Too Short, Enjoy Your Coffee! Pete Link to comment Share on other sites More sharing options...
Guest Posted July 4, 2004 Share Posted July 4, 2004 it would seem that you modified a file and have some 'white space' at the top of the file, this error is listed in the knowledge base, if you open knowledge base and search on headers, you should find it Quote Link to comment Share on other sites More sharing options...
luca75 Posted July 22, 2004 Share Posted July 22, 2004 SOrry but I have no found where I can add o replace i file --/admin/products_attributes.php I have many contribution in this file and I dont can replace the entire file thank you Quote Link to comment Share on other sites More sharing options...
xspykex Posted August 1, 2004 Share Posted August 1, 2004 I downloaded the file to have a sort order for product attributes but I'm having difficulty understanding what to do with it. The readme.txt file says to run the included sql query...what sql query? i don't see anything... also the insert_attrib_sort.txt file says alter table ... (i'm sure anyone reading this knows what it says) and i'm not exactly sure what i'm supposed to do with that. any chance i could get a "first do this" "then do this" from someone? i'm new to php so this is all still somewhat greek to me. thanks Quote Link to comment Share on other sites More sharing options...
xspykex Posted August 2, 2004 Share Posted August 2, 2004 i tried to install this and figure it out and i've done something quite wrong. can someone please help? sidebysidecomptuing.com is where you can view my now messed up pages haha...thanks in advance for any help 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.