Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Attribute copying - Again.....

Attribute copying - Again.....

Views: 1,104

Results 1 to 7 of 7
27 Nov 2012, 1:04 PM
#1
zan_dude avatar

zan_dude

New Zenner

Join Date:
Sep 2012
Posts:
27
Plugin Contributions:
0

Attribute copying - Again.....

Hi again.

I have 1000's of sub categories in my setup and have managed to get away with the Apsona for most of my current attribute importing which took a bit of time but worked.

My new dilemma is that I've had to create a new drop down Attribute which hosts 74 different choices. I've set this attribute up and applied it to several products already by using the Copy to Category in the Attibutes although this is fairly painful due to the following:-

  • There is only 5 categories displayed at a time in the window (although i know i can make this list bigger by changing the attributes_controller.php it didn't really help me much)

  • There seems to be no logical order in which it lists the categories so i can't sort it and pick out the category id i need and have to look thru them one by one fairly slowly.

Is there an option that will let me just say : Take the attributes from productID ###### and then copy them to all products in category #3600

I tried to look in the :

Copy Option Name/Value to Products with existing Option Name ...

but this didn't really do anything useful for me.

Surely there will be better way to do it than the copy to category option? Perhaps an SQL function or a mod that someone has wrote (although I can't really see one by looking in the plugins?)

Any help would be greatly welcomed as I have a total product count of 212000 currently with about 3800 categories :s

29 Nov 2012, 2:19 PM
#2
zan_dude avatar

zan_dude

New Zenner

Join Date:
Sep 2012
Posts:
27
Plugin Contributions:
0

Re: Attribute copying - Again.....

As it seems this is the golden question a lot of people ask one here I wonder if it's possible for someone to help with the following???

Is it possible to insert some code into the attributes_controller.php file which will allow you to still copy the attributes of a product to a category but by being able to specify the actual category ID as a numerical value rather than having to try and find it in a text list box with 1000's of categories already in it?

This would be a midway solution until it's possible to have greater flexibility with attributes....

Anyone out there know the code to insert into the attributes_controller.php to make this happen???

1 Dec 2012, 2:09 PM
#3
zan_dude avatar

zan_dude

New Zenner

Join Date:
Sep 2012
Posts:
27
Plugin Contributions:
0

Re: Attribute copying - Again.....

Surely after 70+ views someone must have some thoughts on this?

It must be possible to modify the attributes_controller.php file somehow so that you can copy attributes to a category ID via a text box input of the category ID number instead of having to select it in the text area table list?

Any thoughts?

1 Dec 2012, 7:31 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Attribute copying - Again.....

You will have to test this to be sure that there are no errors ... so make a good backup of your database ...

There is no safety on this, so if you goober up the categories_id you are going to be in a mess ...

Editing the file:
/your_secret_admin/attributes_controller.php

you can change the line around 907:

<!--  ORIGINAL DROPDOWN              <td class="alert" align="center"><?php echo TEXT_INFO_ATTRIBUTES_FEATURE_CATEGORIES_COPY_TO . '<br />' . zen_draw_products_pull_down_categories('categories_update_id', 'size="5"', '', true, true); ?></td> -->
                <td class="alert" align="center"> <?php echo TEXT_INFO_ATTRIBUTES_FEATURE_CATEGORIES_COPY_TO; ?><br /><input type="text" name="categories_update_id" value="<?php echo zen_output_string_protected($_POST['categories_update_id']); ?>" size="4"> </td>

NOTE: USE AT YOUR OWN RISK ... :lookaroun

1 Dec 2012, 9:25 PM
#5
zan_dude avatar

zan_dude

New Zenner

Join Date:
Sep 2012
Posts:
27
Plugin Contributions:
0

Re: Attribute copying - Again.....

Ajeh,

Many thanks for this... i'll give it a whirl now as a test and let you know shortly if it worked....

I think it would be a great feature if it did because it will help many people out for sure :)

1 Dec 2012, 9:42 PM
#6
zan_dude avatar

zan_dude

New Zenner

Join Date:
Sep 2012
Posts:
27
Plugin Contributions:
0

Re: Attribute copying - Again.....

OK,

Just tried this on a category and it seemed to work just fine for me :)

This will save me ( and a lot of others probably ) a considerable amount of time if they have 100's of categories like me with lots of attributes...

Are there any plans to develop the attribute management / update system for future versions of zen cart?

I'm still using 1.5 at the moment and reluctant to upgrade to 1.51 just yet in case i can't get a smooth transition and mess something up after i've spent ages setting it all up in the first place.

Thanks Again.

Matt

2 Dec 2012, 1:30 AM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Attribute copying - Again.....

At some point we always are trying to develop things to be easier ... you might post that in the Features Wishlist ...