Forums / Setting Up Categories, Products, Attributes / how to copy one product's attribute to all other products?

how to copy one product's attribute to all other products?

Started by andy2012 on 4 Oct 2012, 5:09 AM · Views: 1,456

Results 1 to 14 of 14
4 Oct 2012, 5:09 AM
#1
andy2012 avatar

andy2012

New Zenner

Join Date:
Aug 2012
Posts:
14
Plugin Contributions:
0

how to copy one product's attribute to all other products?

got too many categories and sub-categories,

so wanna know is there any way to copy one product's attribute to all other products?

modify database seems possible, but how to?

using zencart 1.39h,

thank you in advance!

4 Oct 2012, 7:16 AM
#2
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: how to copy one product's attribute to all other products?

If you go to your attributes controller, select the product you want to use for the copy, and press display.
Now the product and the attributes show
At the top of the page is a row of buttons, that say copy to.
Press the most right (copy to categories).
Next select your category to copy to in the selection box, and select one of the three options on the right.
press copy
All the products in the selected category have the new attribute - DONE !! next category

4 Oct 2012, 1:48 PM
#3
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

Re: how to copy one product's attribute to all other products?

Question about this -- I did this and the attributes copied, but not the images associated with the attributes. How do I get those to copy as well?

I also have 1.3.9h

4 Oct 2012, 7:10 PM
#5
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

Re: how to copy one product's attribute to all other products?

Hmmm, well, that's what I thought. But it isn't working. I've tried copying the product along with its attributes (no luck) and also copying the attributes from one product to another using the attributes controller (no luck).

In both cases, the attributes copied (the drop down menu), but the associated images do not appear.

John

4 Oct 2012, 7:42 PM
#6
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: how to copy one product's attribute to all other products?

strange...
Just to be sure I tried on a clean install and it works.
Did you install any mods regarding attributes? like image swap, or something

4 Oct 2012, 7:47 PM
#7
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

Re: how to copy one product's attribute to all other products?

Hmmmm, that's interesting.

We do have imagehandler2 installed.

John

4 Oct 2012, 8:56 PM
#8
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: how to copy one product's attribute to all other products?

IH2 should not be related to this problem. Did you check the code of the attributes_controller.php with a fresh one, using Winmerge or something alike

By the way, it is wise to upgrade IH2 to IH3 (not IH4, which is for ZC 1.5)

4 Oct 2012, 8:59 PM
#9
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

Re: how to copy one product's attribute to all other products?

Thank you very much -- I'll try that.

John

4 Oct 2012, 9:15 PM
#10
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

Re: how to copy one product's attribute to all other products?

Hmmm, when I compare attributes_controller.php from the stock 1.3.9h and the one I have in my install, I can see there is extra code in mine.

This is an install I inherited, so I don't know the answer to this and maybe you do: In my install, there are two images for each attribute: a swatch and a larger image that replaces the product image when the swatch is selected.

Is this function standard with ZC, or is it the work of an addon of some sort? Any idea which addon it might be?

John

4 Oct 2012, 9:42 PM
#11
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: how to copy one product's attribute to all other products?

There are three mods i can think of that could use that extra code. Does the site still use the image swap for attributes on the customer/shop side of zen cart?
If not you could try after making a backup of the attribute_controller.php file, replace it with a fresh one and see what happens.

4 Oct 2012, 10:29 PM
#12
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

Re: how to copy one product's attribute to all other products?

Yes, it does swap the larger version of the attribute image when you click on the related attribute swatch. Is that a specific mod?

I recently upgraded the site from 1.3.9a and I now recall moving the code from the 1.3.9a attributes controller to the 1.3.9h page. I assumed it was something custom that the previous developer had done. It's been working fine, until this particular issue arose.

You can see an example at:

http://quinceandco.com/store/index.php?main_page=product_info&cPath=1&products_id=1&zenid=9406f3040d2dbeb17709a2cb0c0e3ccd

4 Oct 2012, 10:39 PM
#13
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: how to copy one product's attribute to all other products?

If you can find out what mod it is, then you could check the support thread for that mod to see if there is a solution.
The mods I now are all old the newest is for 1.3.8a

Attribute image replaces main product image on sel

PopUp on Attribute Images[

Attribute Rollovers](http://www.zen-cart.com/downloads.php?do=file&id=1166)[/SIZE]

5 Oct 2012, 12:39 AM
#14
andy2012 avatar

andy2012

New Zenner

Join Date:
Aug 2012
Posts:
14
Plugin Contributions:
0

Re: how to copy one product's attribute to all other products?

Design75:

If you go to your attributes controller, select the product you want to use for the copy, and press display.
Now the product and the attributes show
At the top of the page is a row of buttons, that say copy to.
Press the most right (copy to categories).
Next select your category to copy to in the selection box, and select one of the three options on the right.
press copy
All the products in the selected category have the new attribute - DONE !! next category

Thank you, but if for copy to categories, i won't be here for your help.
what i want is copy all attributes of a single product to all the other products,

who knows to do this by modifying the database?