fnzb Posted February 27, 2012 Share Posted February 27, 2012 Child Attributes for Osc 2.3.1 Released under GNU GPL By FNZB This contribution will allow you to assign child attributes to product attribute values. For example, if you have 3 Shirt types and each one has different colour options: Shirt Type: (Option Name) - Shirt 1 (Option value) - Colour:(Option Name) - White (Option value) - Black (Option value) - Shirt 2 - Colour: - Red - White - Blue - Shirt 3 - Colour: -Green I have only taken this to one sub level as that is all I required it for. It could probably be modified to allow multiple sub levels if required. This contribution can be found here Quote Link to comment Share on other sites More sharing options...
Christopher Wright Posted March 26, 2012 Share Posted March 26, 2012 (edited) Hello, I installed this add-on using your installation guide (Beyond Compare is awesome!), however after I try and use it (example: selecting a product from a drop-down menu thats linked to another product) I'm generated this error: 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 'where oa.products_id='59' and oa.options_id = '2' and oa.options_value_id='9' an' at line 1 select pov.products_options_values_id, pov.products_options_values_name, oa.products_id, oa.options_values_price, oa.price_prefix from child_attributes oa, products_options_values pov where where oa.products_id='59' and oa.options_id = '2' and oa.options_value_id='9' and oa.child_options_id = '1' and oa.child_value_id = pov.products_options_values_id and pov.language_id = '1' [TEP STOP] Any idea how to fix this? This add-on would be amazing for my site! Chris Edited March 26, 2012 by Christopher Wright Quote Link to comment Share on other sites More sharing options...
Christopher Wright Posted March 26, 2012 Share Posted March 26, 2012 (edited) Ah, just found the problem myself in catalog/child_attributes.php, line 23 for me. $oa_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, oa.products_id, oa.options_values_price, oa.price_prefix from " . TABLE_CHILD_ATTRIBUTES . " oa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where where oa.products_id='" . (int)$prod_id . "' and oa.options_id = '" . (int)$poid . "' and oa.options_value_id='" . (int)$povid . "' and oa.child_options_id = '" . (int)$oa_options_name['products_options_id'] . "' and oa.child_value_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); Has 'where' declared twice, simple remove one of the 'where's. :) Edited March 26, 2012 by Christopher Wright Quote Link to comment Share on other sites More sharing options...
fnzb Posted March 30, 2012 Author Share Posted March 30, 2012 Hi Chris, I've had a look in my source files and I don't have a double 'where' on that line. Must have happened when you were editing the files :huh: Glad you found it :thumbsup: Quote Link to comment Share on other sites More sharing options...
cyberndj Posted April 14, 2012 Share Posted April 14, 2012 Hi, I just installed this and am getting something funny. I'm trying to add a child attribute, but I can't add any of the "Option Name" or "Option Value" fields. I can go in phpmyadmin and change it through that, but that is cumbersome. I attached a picture of what i'm seeing in the admin page. Can you give me a hint on what I should change? -Jake Quote Link to comment Share on other sites More sharing options...
fnzb Posted April 25, 2012 Author Share Posted April 25, 2012 Hi cyberndj, Sorry I am late with my reply. It looks as though you have added child attributes fine for that product and now it isnt working, is that right? I can't honestly see why that would be the case, maybe a conflict with another addon?? You could try adding this in /admin/child_attributes.php: echo $oa_action; above this: switch ($oa_action) This will output the action to the screen and you should see like the image attached. By doing this you can at least see if the actions are being called properly, by the look of your image the dropdown boxes arent even showing, they should be there but empty if no options were found for the product. Quote Link to comment Share on other sites More sharing options...
timlyuan Posted May 10, 2012 Share Posted May 10, 2012 Hi Hayden, Many thank for this contribution! I am install this add-on to a fresh installed 2.3.1, have a problem in shopping cart page, top price include both product and attribute price, but sub-total only show the product price, same in right colum shopping cart box too, only display the product price. check out show the price for both product and attribute with no problem. screenshot attached. Many thanks for your help. Tim Quote Link to comment Share on other sites More sharing options...
fnzb Posted May 14, 2012 Author Share Posted May 14, 2012 Hi Tim, I cant view the image sorry. Quote Link to comment Share on other sites More sharing options...
arkisaeo Posted May 14, 2012 Share Posted May 14, 2012 I am getting this error when I try to delete existing option names or option values: Warning: Cannot modify header information - headers already sent by (output started at *******/admin/products_attributes.php:18) in *******/admin/includes/functions/general.php on line 34 This is line 18 in products_attributes: <script type="text/javascript"> (it is part of the code from your mod that goes like ?> <script type="text/javascript"> function createRequest() { return window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); } etc...) This is line 34 in general.php: header('Location: ' . $url); Neither file has a blank space or line at the beginning or end of the file The options do delete, but I still get that error nonetheless. Quote Link to comment Share on other sites More sharing options...
timlyuan Posted May 16, 2012 Share Posted May 16, 2012 Hi Tim, I cant view the image sorry. Thankyou for your reply, I have deleted the 'sub total' from the products.php, as checkout was the right finger. Quote Link to comment Share on other sites More sharing options...
mikekorn Posted June 12, 2012 Share Posted June 12, 2012 Hello Hayden, Thanks for your contribution. Your addon looks like it might be what I need, but I am not sure. The products on my site have multiple attributes, and each attribute is dependent on the attribute that is selected before it. The best example I can give you is here: http://www.dartheads.com/products/cylinder-heads/small-block-chevy-iron-heads/iron-eagle-s-s-small-block-chevy-cylinder-head-34.html Would your addon be able to accomplish this similar effect? Thanks again for your hard work. Quote Link to comment Share on other sites More sharing options...
GLime Posted June 15, 2012 Share Posted June 15, 2012 Hi everyone, I am having the exact same issue as @@cyberndj. Did anyone find how to fix this issue? I tried displaying various echo before " switch ($oa_action) " but nothing display wich means this page is not even called by my products_attributes.php page. If anyone has found the cause of this issue please reply or PM me please. Quote Link to comment Share on other sites More sharing options...
GLime Posted June 15, 2012 Share Posted June 15, 2012 I'm curently investigating on my issue, i notice something quite funny but realy annoying, the option name dropdown list from the products attribute page is replaced by a miniature OSCom login page, if i login to it I am redirected to a new page where the actual functional (with the good options) is displayed. Quote Link to comment Share on other sites More sharing options...
cyberndj Posted June 18, 2012 Share Posted June 18, 2012 Hi, I had put my store on hold since I was moving and I had to move my home server. After I moved, OSC wasn't displaying right, so I wiped the entire program. I am now going to reinstall OSC and this addon and see if I have the same issue as before. I'll post back with my results (and it won't be as long as between my last post!) -Jake Quote Link to comment Share on other sites More sharing options...
GLime Posted June 19, 2012 Share Posted June 19, 2012 I'm glad to see this topic is not dead. I took screenshots to show you people what's happening to me. If anyone has a clue about what I could have done wrong please reply. Quote Link to comment Share on other sites More sharing options...
cyberndj Posted June 22, 2012 Share Posted June 22, 2012 Hi cyberndj, Sorry I am late with my reply. It looks as though you have added child attributes fine for that product and now it isnt working, is that right? I can't honestly see why that would be the case, maybe a conflict with another addon?? You could try adding this in /admin/child_attributes.php: echo $oa_action; above this: switch ($oa_action) This will output the action to the screen and you should see like the image attached. By doing this you can at least see if the actions are being called properly, by the look of your image the dropdown boxes arent even showing, they should be there but empty if no options were found for the product. Hi, I did a OSC fresh install, and installed only this addon. I followed your advice in your post and still the same thing is happening as my OP. -Jake Quote Link to comment Share on other sites More sharing options...
GLime Posted June 28, 2012 Share Posted June 28, 2012 Does anyone else have issue with the sub-total in the cart and the cart total in right column? Quote Link to comment Share on other sites More sharing options...
Guest Posted July 31, 2013 Share Posted July 31, 2013 Hi everyone, I am having the exact same issue as @@cyberndj. Did anyone find how to fix this issue? I tried displaying various echo before " switch ($oa_action) " but nothing display wich means this page is not even called by my products_attributes.php page. If anyone has found the cause of this issue please reply or PM me please. Anyone able to figure this problem out? I'm having the same issue. Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted February 10, 2016 Share Posted February 10, 2016 Hi, For some reason the child attributes I have set up are not showing, can anyone help? Quote Link to comment Share on other sites More sharing options...
MITCH70 Posted January 31, 2017 Share Posted January 31, 2017 Hi, Great contribution but little problem in showing tax in product info. We have set up all prices showing incl. tax in our shop but only the child attributes options drop down displays price without tax in product info. Shopping chart and checkout shows correct prices. Can someone point me where to look. Quote Link to comment Share on other sites More sharing options...
murugan5403 Posted November 10, 2017 Share Posted November 10, 2017 (edited) Any possibility to integrate 'Child Attributes' to 'Ajax Attribute Manager BS'. Edited November 10, 2017 by murugan5403 Added the link 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.