Jump to content
Sign in to follow this  
joeyjgarcia

Attribute Sets Contribution

Recommended Posts

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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

 

 

I am also getting this error. This is a fresh install no other mods and copied total replacement files over. Ne ideas?

Share this post


Link to post
Share on other sites
I am also getting this error. This is a fresh install no other mods and copied total replacement files over. Ne ideas?

 

 

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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 by Dacotah

Share this post


Link to post
Share on other sites

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']);

Share this post


Link to post
Share on other sites
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

 

 

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

Share this post


Link to post
Share on other sites
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

 

 

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?

Share this post


Link to post
Share on other sites
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?

 

 

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites
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?

 

 

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.

Share this post


Link to post
Share on other sites
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']);

 

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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.

 

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Edited by joeyjgarcia

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×