linuxdave Posted August 4, 2005 Share Posted August 4, 2005 i also added the "AS Edit Bug Fix" by linuxdave so i removed the bug fix and the error went away. So now i dont know what to do as i need the bug fix tso i dont delete the other attributs when editing sets. here is the code of the fix in catalog/admin/products_attributes_sets.php that replaces jjg_db_attributeSets( $arr_ProductsAttributeSetsIDs, $products_ids['products_id'], "update_product" ); with this $arr_NewProductsAttributeSetsIDs = array(); $products_attributes_sets_query_sql = "select products_attributes_sets_id from ".TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS." where products_ id =".$products_ids['products_id']; $products_attributes_sets_query = tep_db_query($products_attributes_sets_query_sql); $newcount = 0; while($fixed_products_attributes = tep_db_fetch_array($products_attributes_sets_query)) { $arr_NewProductsAttributeSetsIDs[$newcount] = $fixed_products_attributes['products_attributes_sets_id']; $newcount++; } jjg_db_attributeSets( $arr_NewProductsAttributeSetsIDs, $products_ids['products_id'], "update_product" ); can any one solve this? cheers Craig <{POST_SNAPBACK}> Sorry... there was an extra line break in there messing things up... this line: $products_attributes_sets_query_sql = "select products_attributes_sets_id from ".TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS." where products_ id =".$products_ids['products_id']; should actually be this: $products_attributes_sets_query_sql = "select products_attributes_sets_id from ".TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS." where products_id =".$products_ids['products_id']; See the problem? with the space in products_id? Hope this helps. Quote LinuxDave Link to comment Share on other sites More sharing options...
pixelhub Posted August 4, 2005 Share Posted August 4, 2005 Sorry... there was an extra line break in there messing things up...this line: $products_attributes_sets_query_sql = "select products_attributes_sets_id from ".TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS." where products_ id =".$products_ids['products_id']; should actually be this: $products_attributes_sets_query_sql = "select products_attributes_sets_id from ".TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS." where products_id =".$products_ids['products_id']; See the problem? with the space in products_id? Hope this helps. <{POST_SNAPBACK}> :D Thanks, that worked a treat. :thumbsup: Quote Link to comment Share on other sites More sharing options...
seank123 Posted August 4, 2005 Share Posted August 4, 2005 Great contribution - installed OK and seemed to work perfectly but I just noticed one issue: If I add a product to the shopping card with attributes set and then, in the cart, click on the product name that links back to the product page I get the following error: 1064 - You have an error in your SQL syntax near '{1}1{3}17{4}14 ORDER BY products_extra_fields_order' at line 6 SELECT pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value FROM products_extra_fields pef LEFT JOIN products_to_products_extra_fields ptf ON ptf.products_extra_fields_id=pef.products_extra_fields_id WHERE ptf.products_id=1755{1}1{3}17{4}14 ORDER BY products_extra_fields_order The URL of the link is: http://mytestsite.com/product_info.php?pro...5{1}1{3}17{4}14 I think the numbers in brackets refer to the sort order of the attribute so I'm assuming it's trying to automatically re-select all the attributes in the product page. Anyone know how to fix?? Cheers Quote Link to comment Share on other sites More sharing options...
pixelhub Posted August 4, 2005 Share Posted August 4, 2005 how can you sort the Attribute Sets at the moment onmy site it displays the atributes in alphabetical order depending on the option name. Colour: Size: Type: I want it to display Colour: Size: Type: How is this done? Thanks Craig Quote Link to comment Share on other sites More sharing options...
pixelhub Posted August 4, 2005 Share Posted August 4, 2005 how can you sort the Attribute Sets at the moment onmy site it displays the atributes in alphabetical order depending on the option name. Colour: Size: Type: I want it to display Colour: Size: Type: How is this done? Thanks Craig <{POST_SNAPBACK}> :-" I mean, I want it to display Size: Colour: Type: Quote Link to comment Share on other sites More sharing options...
pixelhub Posted August 4, 2005 Share Posted August 4, 2005 (edited) I have tried Attributes Sort but i can not get it to work with attributes sets. Can any one help Cheers Craig Edited August 4, 2005 by pixelhub Quote Link to comment Share on other sites More sharing options...
Guest Posted August 4, 2005 Share Posted August 4, 2005 can you explain what you have done to try to get it to work? (detail please) Quote Link to comment Share on other sites More sharing options...
pixelhub Posted August 4, 2005 Share Posted August 4, 2005 can you explain what you have done to try to get it to work? (detail please) <{POST_SNAPBACK}> i installed "Product Attrib Sort v1.2" --/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"); but attributes sets uses order by pa.sort_order i tried adding it order by pa.attribute_sort, order by pa.sort_order"); but i that does not work. Thanks Craig Quote Link to comment Share on other sites More sharing options...
seank123 Posted August 5, 2005 Share Posted August 5, 2005 Craig - I'm trying to do the same thing - ie sort the option names - I did find the following solution, it's not ideal, but it does work: http://www.oscommerce.com/forums/index.php?sho...082entry67082 Quote Link to comment Share on other sites More sharing options...
pixelhub Posted August 5, 2005 Share Posted August 5, 2005 thanks for the reply Sean, i will give that a go. i have been ameing my option names with numbers in front of them like: 1. Size 2. Colour 3. Type which is easy, but your solution looks better :) Is it possible to have the options going horizontally for example: Size: ________ Colour: ________ Type: ________ Thanks Craig Quote Link to comment Share on other sites More sharing options...
ingz Posted August 6, 2005 Share Posted August 6, 2005 Hi there, i implemented this contribution a while ago and it works really great. I only have one question. I was also searching for a contrib for quantity/stock managing per product attribute, for example on sizes: the product has stock quantity 1, there is 1 size L left but there are still 12 sizes XL left, so the costumer wont be able to buy XL if stock became zero for the product not considering the quantity per size, but if size L became zero and the stock quantity would be still 1 than the customer can order the size L while i don't have it anymore.. (My english is not superb I apologize) So i found some contributions who seem to fix this problem, but what i dont know when i'm going to install them, if they will work flawlessly with this contrib. Has anyone already tried to use those contribs together? Maybe you have an advice for me wich contrib on quantity to use best? Thanks in advance! Inge <{POST_SNAPBACK}> anyone?????? Quote Link to comment Share on other sites More sharing options...
kahombur Posted August 6, 2005 Share Posted August 6, 2005 Does anyone have a plain categories.php file with the modifications already added to it? I have tried a few times to modify the file and when I try to load the page it shows nothing after the Product Manufacturer drop-down box. Quote Link to comment Share on other sites More sharing options...
volumax Posted August 8, 2005 Share Posted August 8, 2005 Hi kahombur You are not alone with your problem, I've been over my install and I have made no errors that I can see. It seems that the AS code we inserted after the manufacturers box ONLY appears when you re-edit you product after you have added it. To me this is a waste of time having to the following:- Enter the product, preview it then insert it and then have to re-edit the product to add the attribute set :angry: Has anyone got a fix for this bug? regards Andy Quote Literally, Laterally Thinking! If you cannot get through it, go round it. Link to comment Share on other sites More sharing options...
volumax Posted August 9, 2005 Share Posted August 9, 2005 Hi kahombur You are not alone with your problem, I've been over my install and I have made no errors that I can see. It seems that the AS code we inserted after the manufacturers box ONLY appears when you re-edit you product after you have added it. To me this is a waste of time having to the following:- Enter the product, preview it then insert it and then have to re-edit the product to add the attribute set :angry: Has anyone got a fix for this bug? regards Andy <{POST_SNAPBACK}> My apologies to Joey, after re-reading the docs, the inability to add an attribute set while adding a new products is not an error, but there by design. But this is a hinderance as I have already created the attribute sets needed for our store. I chose joey's contribution for our store because in the version I downloaded you were able to add attributes sets while adding a new product :thumbsup: . Do not get me wrong it's a great contribution because it handles the attributs the way I prefer but now has had the main reason for us using it removed :( . Any chance of it being put back in? Andy Quote Literally, Laterally Thinking! If you cannot get through it, go round it. Link to comment Share on other sites More sharing options...
Guest Posted August 9, 2005 Share Posted August 9, 2005 Hi, I have the Attribute Sets installed and working correctly. Works great actually. The only item that I see in a couple of posts here that has never been addressed is weight. Currently, we have to add an attribute set, add products (and then define which Set to use, which is fine), and then go back into the default Products and set extra weight on every attribute for every product (using the Add Weight to Product Attributes contrib Found HERE). That is where the biggest time-killer is. Having to go back to every product for all options just to add the weight. I've tried to play around with integrating the field that the product_options_weight is in the product-options table... I can pull that out just fine with the product query but run into trouble when trying to write the sql update function since it has to update the products-options-sets table, plus update the products_options_weight in the product-options table. I know I have been close to getting it a couple of times, but there always remains another error.... I'm just not that great with PHP (amonst others ;) ) Even if it won't work with the add weight contrib, any plans to integrate adding weight as a factor? Have a nice day Quote Link to comment Share on other sites More sharing options...
lauren4521 Posted August 14, 2005 Share Posted August 14, 2005 WHEW....just finished reading all 29 pages!! First of all, Joey...THANK YOU!! This is an amazing contribution not only because of what it does but because of the tireless support you kindly offer (even to those not using the search function). I installed your version 5.5 (not cip) and added the AS edit fix. I have had NO problems with it. BUT I wanted to share that I also added the ITNEtwork Designs fix. You are told to add the following to ;admin/includes/language/english.php // text for product_attributes_sets.php define('IMAGE_CREATE_ATTRIBUTE_SET', 'Create Set'); define('HEADING_TITLE', 'Attribute Sets'); define('TEXT_SELECT_OPTION', 'Select Atributes'); define('TEXT_CHOOSE_OPTION', 'Choose an Option'); define('TEXT_CHOOSE_SET_SIZE', 'Set Size'); and it changes all page headings in the catalog section of admin panel to "attribute sets". I suppose you could take out the HEADING_TITLE. But I just took the whole thing out..didn't see a reason for it or for bothering to play with the file. I am NOT a coder but can wing my way around. Thanks again!!! And not sure if this is appropriate but you should definately add a "donate" button to your site for all of the very grateful! I wish I could donate to all but the contribs with the choice support get my spare change!! Lauren Quote Link to comment Share on other sites More sharing options...
saubz Posted August 30, 2005 Share Posted August 30, 2005 Hello, I have a small but importand issue with the A.S. contrib. Some of the Attributes are sorted and displayed correctly and some are not. In this example both of these products are using the same A.S. One is displayed in the correct order, the other is not. Does anybody have any solutions for this problem. Thanks a lot. Here is the Attribute Set Here is a properly sorted item using the Attribute Set Here is a incorrectly sorted item using the SAME Attribute Set Quote Link to comment Share on other sites More sharing options...
purehaven Posted September 1, 2005 Share Posted September 1, 2005 Here is the link to the screenshots. http://www.goodnewsclothing.com/screenshots.htm Joey <{POST_SNAPBACK}> Hi Joey, I've just had the laterst attribute set contribution installed, I went it to create attribute sets that I needed, now, where do I go to match it up with a product? I went to Product Attributs which is above Attribute sets but the sets are nowhere to be found. Is there a code or something that needs to be implemented for this? Thanks in advance, Lana Quote Link to comment Share on other sites More sharing options...
vispa Posted September 1, 2005 Share Posted September 1, 2005 Simple question really, which of the files on http://www.oscommerce.com/community/contri...arch,Attributes is the actual one i need, complete with all latest patches? Thanks Martin Quote Link to comment Share on other sites More sharing options...
jeffy777 Posted September 1, 2005 Share Posted September 1, 2005 I suggest that you download "Attribute Sets version 5.5" and install it. Then once you have that finished, download and apply the "AS Edit Bug Fix" dated 8 Aug 2005. I wouldn't install the "Small mod to attribute sets" because it messed up the ordering for me and it fixes something I don't want it to fix any way :) Quote Link to comment Share on other sites More sharing options...
jeffy777 Posted September 2, 2005 Share Posted September 2, 2005 Is anyone else having problems deleting products after installing this contrib? I know atleast one other person is having this issue: http://www.oscommerce.com/forums/index.php?showtopic=164587 I can't delete any products, even those that don't have attribute sets assigned to them. When it says "Are you sure you want to permanently delete this product?" I click delete and it just takes me back to the category and the item is still there, and the URL contains "action=delete_product_confirm". Any solution? Quote Link to comment Share on other sites More sharing options...
Guest Posted September 2, 2005 Share Posted September 2, 2005 hey i have a huge error message that displays..... function jjg_db_attributeSets($arr_attributeSetID, $productID, $action, $arr_remove_sets = array(), $link = 'db_link'){ //remove all references to this product_id in these tables, and reinsert new ones if( $action == 'update_product' || 'delete_product_confirm' ){ $delete_query = "delete from products_attributes_sets_to_products where products_id=".$productID; tep_db_query($delete_query, $link); } //if you remove the product, then our work is done if( $action == 'delete_product_confirm' ){ return; } for($j=0; $j Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/chronix/public_html/shop/admin/includes/functions/database.php:153) in /home/chronix/public_html/shop/admin/includes/functions/sessions.php on line 67 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/chronix/public_html/shop/admin/includes/functions/database.php:153) in /home/chronix/public_html/shop/admin/includes/functions/sessions.php on line 67 Then if you click to go into any of the admin sections you get this error in the section as well as the error above; Parse error: parse error, unexpected '<' in /home/chronix/public_html/shop/admin/includes/boxes/catalog.php on line 28 How do i fix this problem? Quote Link to comment Share on other sites More sharing options...
Guest Posted September 2, 2005 Share Posted September 2, 2005 okay i fixed the parse error (second error) but i still have the first big error to figure out? any suggestions? Quote Link to comment Share on other sites More sharing options...
jeffy777 Posted September 2, 2005 Share Posted September 2, 2005 Sounds like a possible error in database.php, re-check the instructions and make sure you made the correct additions. I'm also having the same sorting problem that saubz described. In additon to the delete prodocts issue, this is kind of frustrating. Any support available? Quote Link to comment Share on other sites More sharing options...
jeffy777 Posted September 4, 2005 Share Posted September 4, 2005 I'm happy to report that the delete issue is no longer an issue for me :) I wne tto my backup files and re-installed the contrib and everything is fine now. I'm gussing I made a mistake in categories.php somewhere. So if anyone else runs into this, just try re-installing, which means you'll have to backup your files first (like you always should). Now, if we can just get this sort problem fixed.... 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.