Trimast Posted February 7, 2005 Share Posted February 7, 2005 Hi, First up, this contribution has saved (well will save) me a serious amount of time setting up a new shop so its really great work :D I do have one question related to this contribution, but am not sure whether i need to make the change within the contribution or within the products page itself, so any guidance would be great. Basically the shop has a series of designs which can be printed etc onto a range of items such as t-shirts, mugs, posters etc etc. What i'm trying to do is make the site easier to use, by doing this: When the customer visits the products page, the select from a drop down menu the item they wish to have the image printed onto, then for example if they choose T-Shirt they get the colour and size options associated with the the T-Shirt attribute. The only reason i'm posting this here is because i'm not sure if like i said it's something that can be worked within the contribution or something which needs to be worked outside of it. Thanks, Rob Quote Link to comment Share on other sites More sharing options...
Guest Posted February 16, 2005 Share Posted February 16, 2005 im back. im beginning a new site and naturally this is the first contribution i am installing since its the most immportant. no problems until i go to view a product that has attribute sets assigned to it. i get the following : Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/juggalos/public_html/includes/functions/database.php on line 99 Where Sizes and Colors would be. the drop down menu is there, but empty. now, that file wasnt touched by the install so im not really sure whats going on. and it hasnt been modified in any way. Quote Link to comment Share on other sites More sharing options...
montytx Posted February 16, 2005 Share Posted February 16, 2005 I have 2 errors: On the product option page: Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/downdogs/public_html/admin/products_attributes.php:1) in /home/downdogs/public_html/admin/includes/functions/sessions.php on line 67 On the attributes set page: when I click the insert button: The requested URL /admin/FILENAME_PRODUCTS_ATTRIBUTES_SETS was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Any ideas? Thanks montytx Quote Link to comment Share on other sites More sharing options...
montytx Posted February 17, 2005 Share Posted February 17, 2005 OKay, I went back through the install and instead of cutting and pasting I renamed files. The attributes set pages works fine. But in the attributes page at the bottom I have this error when you try to look at attributes applied to products: Fatal error: Call to undefined function: tep_get_products_model() in /home/downdogs/public_html/admin/products_attributes.php on line 703 Any ideas? Thanks montytx Quote Link to comment Share on other sites More sharing options...
Guest Posted February 18, 2005 Share Posted February 18, 2005 OKay, I went back through the install and instead of cutting and pasting I renamed files. The attributes set pages works fine. But in the attributes page at the bottom I have this error when you try to look at attributes applied to products: Fatal error: Call to undefined function: tep_get_products_model() in /home/downdogs/public_html/admin/products_attributes.php on line 703 Any ideas? Thanks montytx <{POST_SNAPBACK}> I am also getting this error. This is a fresh install no other mods and copied total replacement files over. Ne ideas? Quote Link to comment Share on other sites More sharing options...
montytx Posted February 20, 2005 Share Posted February 20, 2005 I am also getting this error. This is a fresh install no other mods and copied total replacement files over. Ne ideas? <{POST_SNAPBACK}> I think maybe this is just part of the coding problem. It appears to me that you can no longer use the single attributes to add to items. I can still create attributes but then I have to bundle them together in the sets area. Even if there is only one attribute. A bit of a pain but at least it works. I suppose once all the trouble of copying them over is done it will be a lot faster. Quote Link to comment Share on other sites More sharing options...
Dacotah Posted February 22, 2005 Share Posted February 22, 2005 I am also getting this error. This is a fresh install no other mods and copied total replacement files over. Ne ideas? Ditto on this error exactly. Probably the way it is supposed to be, but I'd rather see a "This portion disabled by the Attributes Sets contrib" note instead of an error. Quote Link to comment Share on other sites More sharing options...
Guest Posted February 22, 2005 Share Posted February 22, 2005 what version id u download? i dont see the call to that function anywhere Quote Link to comment Share on other sites More sharing options...
Dacotah Posted February 22, 2005 Share Posted February 22, 2005 I'm using version 4 - Dec 27, 2004 release which is the latest. Quote Link to comment Share on other sites More sharing options...
Dacotah Posted February 22, 2005 Share Posted February 22, 2005 (edited) Here's the full line on line# 703 : of /admin/products_attributes.php from the products_attributes.total_replacement.php file. $products_model_only = tep_get_products_model($attributes_values['products_id']); Edited February 22, 2005 by Dacotah Quote Link to comment Share on other sites More sharing options...
Guest Posted February 25, 2005 Share Posted February 25, 2005 I'm also using the same version. If its simply suppose to be disabled does anyone know how to make it say that rather than this ugly error? Or is there any news on this issue... Here's the full line on line# 703 : of /admin/products_attributes.php from the products_attributes.total_replacement.php file. $products_model_only = tep_get_products_model($attributes_values['products_id']); <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
mcbsolutions Posted February 26, 2005 Share Posted February 26, 2005 Sorry the long delay. moonlitsun: In your SELECT tag add the MULTIPLE attribute, like this. <select name="thename" multiple size=3> I added the "size" attribute also so it will display multiple rows, otherwise the multiple attribute doesn't make sense without it. I this "size" is the right attribute, if not try "rows=3". Joey <{POST_SNAPBACK}> Hi Joey and everyone else here, First off, nice contribution. Been looking for something like this. I need to add multiple sets to a product. I installed latest version and all seems fine, but it appears I can add only one set to a product. Where do i modify this code? hopefully this is an easy question. Thanks much! Steve Quote Link to comment Share on other sites More sharing options...
mcbsolutions Posted February 26, 2005 Share Posted February 26, 2005 Hi Joey and everyone else here, First off, nice contribution. Been looking for something like this. I need to add multiple sets to a product. I installed latest version and all seems fine, but it appears I can add only one set to a product. Where do i modify this code? hopefully this is an easy question. Thanks much! Steve <{POST_SNAPBACK}> I'm also having problems with 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 '0,'+',1)' at line 1 insert into products_attributes (products_id, options_id, options_values_id, options_values_price, price_prefix, sort_order) values (23,1,,0,'+',1) [TEP STOP] Anyone help out? Quote Link to comment Share on other sites More sharing options...
mcbsolutions Posted February 27, 2005 Share Posted February 27, 2005 I'm also having problems with 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 '0,'+',1)' at line 1 insert into products_attributes (products_id, options_id, options_values_id, options_values_price, price_prefix, sort_order) values (23,1,,0,'+',1) [TEP STOP] Anyone help out? <{POST_SNAPBACK}> Ignore my last two posts - got everything fixed after some tinkering. I realized my products options values to products id table was not populated so i fixed this manually, and all worked. Now my next question. On one of my attribute sets, I need to add 138 attributes. The maximum is set at 100. I'll do some checking, but can someone tell me where to change this? Thanks!! Steve Quote Link to comment Share on other sites More sharing options...
Dacotah Posted February 28, 2005 Share Posted February 28, 2005 I ran into an issue today. I had about 90 products that had 5 attribute sets each. Four of the attribute sets were common to all 90 products. I edited one of the sets, just changed the name of an option, and it deleted all the attribute sets from all 90 products except for the one I edited. I then had to go back through all those products and reenter the sets. So obviously unless there is a fix, I don't dare change anything unless I want to reenter them all. Is there anyway to fix this in an upcoming release? Quote Link to comment Share on other sites More sharing options...
mcbsolutions Posted February 28, 2005 Share Posted February 28, 2005 I ran into an issue today. I had about 90 products that had 5 attribute sets each. Four of the attribute sets were common to all 90 products. I edited one of the sets, just changed the name of an option, and it deleted all the attribute sets from all 90 products except for the one I edited. I then had to go back through all those products and reenter the sets. So obviously unless there is a fix, I don't dare change anything unless I want to reenter them all. Is there anyway to fix this in an upcoming release? <{POST_SNAPBACK}> Hi, Earlier back in the thread this problem is discussed by the author Joey. There is not a resolution that I can tell yet. I guess you can't really edit the sets once attached to a product. I have lots of products with lots of attributes, so until this problem is resolved, I think I'm going to go with another contribution, such as Attributes Copier and Sorter. I often update things, and can't deal with risk of losing data. Other than this small (but big problem for me), this contribution is very good. Quote Link to comment Share on other sites More sharing options...
sporkfu Posted February 28, 2005 Share Posted February 28, 2005 Here's the full line on line# 703 : of /admin/products_attributes.php from the products_attributes.total_replacement.php file. $products_model_only = tep_get_products_model($attributes_values['products_id']); <{POST_SNAPBACK}> Apparently the author forgot to include a function. I simply recreated it myself. In the file /admin/includes/functions/general.php Add the function : function tep_get_products_model($product_id) { $product_query = tep_db_query("select products_model from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'"); $product = tep_db_fetch_array($product_query); return $product['products_model']; } and that should solve the problem. Its just there to show the model # along with the name of the product. such as in the install instructions on step 8 Option 2: use the products_attributes.total_replacement.php file. Use the "total_replacement" file if you haven't ever changed your products_attributes.php file. My products_attributes.php file was only changed for this sort_order AND next to the product Name I also show the product model in brackets (this is a nice addition too with zero added risk). For example, if you have a Product called "Sony CD Player" with a product model number of 1234, it would display as "Sony CD Player [1234]" instead of "Sony CD Player". 1st) back up your original file!!!! 2nd) drop this file in the admin folder 3rd) rename it to just products_attributes.php Hope this helps. C.N. Quote Link to comment Share on other sites More sharing options...
DKarr Posted March 2, 2005 Share Posted March 2, 2005 I'm also having problems with 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 '0,'+',1)' at line 1 insert into products_attributes (products_id, options_id, options_values_id, options_values_price, price_prefix, sort_order) values (23,1,,0,'+',1) [TEP STOP] Anyone help out? I am also getting this error - and it is beyond my level of programming... I currently have this Contrib running smoothly on one site but am stuck with this error on sister site using different server. But, unlike Steve, my my products options values to products id table is populated. Can anyone Please! help me fix this? Quote At least 90% of my programming problems lie somewhere between my keyboard and my chair. Link to comment Share on other sites More sharing options...
scotch33 Posted March 11, 2005 Share Posted March 11, 2005 Hi Guys, Joey and Co thanks for this it is exactly what OS base install needs. I've just installed the contib onto a fresh test copy of OSC with the idea of getting a base folder on my system that contains all the appropriate files as a basic install so i can use to replace files immediately on any new instals of the software i do. I have hit a snag with the instal and would appreciate anyone who has experience with this contrib taking a quick look. The problem is the attributes page in the admin, which you can see here . The install has no security as it is just an experiment with the module. If anyone can tell me where I am going wrong I would appreciate it. I've looked at the file but am a bit outa my depth. Ta! John. Quote Link to comment Share on other sites More sharing options...
John Doswell Posted March 30, 2005 Share Posted March 30, 2005 Hi Guys,Joey and Co thanks for this it is exactly what OS base install needs. I've just installed the contib onto a fresh test copy of OSC with the idea of getting a base folder on my system that contains all the appropriate files as a basic install so i can use to replace files immediately on any new instals of the software i do. I have hit a snag with the instal and would appreciate anyone who has experience with this contrib taking a quick look. The problem is the attributes page in the admin, which you can see here . The install has no security as it is just an experiment with the module. If anyone can tell me where I am going wrong I would appreciate it. I've looked at the file but am a bit outa my depth. Ta! John. <{POST_SNAPBACK}> Fatal error: Call to undefined function: tep_get_products_model() in /home/hosting-0/public_html/os_shopdev/admin/products_attributes.php on line 703 In the file /admin/includes/functions/general.php Add the function : function tep_get_products_model($product_id) { $product_query = tep_db_query("select products_model from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'"); $product = tep_db_fetch_array($product_query); return $product['products_model']; greetz john Quote Link to comment Share on other sites More sharing options...
joeyjgarcia Posted April 13, 2005 Author Share Posted April 13, 2005 I'm back to help everyone. I see there have been a few problems. I will have to discern whether there was truely a bug in my code or an installation error. If different people are installing it from scratch and are getting the same problem then I feel the problem is in my code somewhere. Either way, I want to help but just not tonight - it's too late now. I'll be checking back very soon. Joey Quote Link to comment Share on other sites More sharing options...
joeyjgarcia Posted April 13, 2005 Author Share Posted April 13, 2005 I saw your error and it looks like you've adopted sporkfu function. I don't believe I forgot function as sporkfu has suggested (but I may be wrong), I think sporkfu's function may be causing this error, and there may still be another error over and above his. Let me fix Dacotah's problem then that would make sporkfu's fix obsolete. I appreciate sporkfu's help; I have to look into this problem and report the cause. Thanks for the patience. Joey Hi Guys,Joey and Co thanks for this it is exactly what OS base install needs. I've just installed the contib onto a fresh test copy of OSC with the idea of getting a base folder on my system that contains all the appropriate files as a basic install so i can use to replace files immediately on any new instals of the software i do. I have hit a snag with the instal and would appreciate anyone who has experience with this contrib taking a quick look. The problem is the attributes page in the admin, which you can see here . The install has no security as it is just an experiment with the module. If anyone can tell me where I am going wrong I would appreciate it. I've looked at the file but am a bit outa my depth. Ta! John. <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
joeyjgarcia Posted April 13, 2005 Author Share Posted April 13, 2005 (edited) Ooops!!! That line was not supposed to make it in this contribution! That was added to my own web store for convenience. I guess this error was all on me, sorry. You can either choose one of the two options to get rid of the error. 1) Get rid of that piece of code that displays the Product Model next to the name of the product in the Product Attributes area (note I didn't say Attribute Sets area). 2) Add in the missing function that displays the Product Model next to hte name. To do Option 1 do this: o) Remove line 703 and change the following line 800 from this: <td class="smallText"> <?php echo $products_name_only; ?> [<?php echo $products_model_only; ?>] </td> to this: <td class="smallText"> <?php echo $products_name_only; ?>;</td> This should remove the error. To do Option 2 do this: In admin\includes\functions\general.php(line 508) add this function. function tep_get_products_model($product_id) { $product_query = tep_db_query("select products_model from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "' "); $product = tep_db_fetch_array($product_query); return $product['products_model']; } This also should take care of this problem. OKay, I went back through the install and instead of cutting and pasting I renamed files. The attributes set pages works fine. But in the attributes page at the bottom I have this error when you try to look at attributes applied to products: Fatal error: Call to undefined function: tep_get_products_model() in /home/downdogs/public_html/admin/products_attributes.php on line 703 Any ideas? Thanks montytx <{POST_SNAPBACK}> Edited April 13, 2005 by joeyjgarcia Quote Link to comment Share on other sites More sharing options...
joeyjgarcia Posted April 13, 2005 Author Share Posted April 13, 2005 see previous post for a solution. Joey I'm also using the same version. If its simply suppose to be disabled does anyone know how to make it say that rather than this ugly error? Or is there any news on this issue... <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
joeyjgarcia Posted April 13, 2005 Author Share Posted April 13, 2005 See previous post for a solution. Joey Ditto on this error exactly. Probably the way it is supposed to be, but I'd rather see a "This portion disabled by the Attributes Sets contrib" note instead of an error. <{POST_SNAPBACK}> 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.