Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / How to change product attribute for order placed?

How to change product attribute for order placed?

Locked

Views: 6,674

Results 21 to 28 of 28
This thread is locked. New replies are disabled.
22 Mar 2007, 3:55 AM
#21
webomat avatar

webomat

Zen Follower

Join Date:
Jan 2005
Location:
Minneapolis MN, USA
Posts:
128
Plugin Contributions:
0

How to change product attribute for order placed?

Ajeh:

I have not broken it yet ... but I have more testing for this for future releases to do ... :smile:

Hi Ajeh,

I haven't broken it yet either, but then I don't use every single possible option/combination for attributes. "-)

How about this: Could you please tell me the sql update statement to use instead? The attribute value is choice of "Yes" or "No" when they are ordering. Here's what I would normally use to update a text field...

update 'orders_products_attributes' set 'products_options_values'='No' where 'orders_products_attributes_id' =64

... but I'm getting a syntax error. Yes, a syntax error - imagine that - on all 7,000 versions I've tried! :blush: I even tried casting it, converting it, blah blah. Of course, I've only had 3 pots of coffee today, so that could be the problem. :shocking:

If I wasn't worried about changing it from Blob to Text breaking something now or down the road, I'd go ahead and do that just to get it over with. But this database is live and in use, and if something broke I wouldn't be able to go back and reconstruct the new orders and cc info, etc. if that makes sense.

Thanks!

Becky

22 Mar 2007, 4:42 AM
#22
ajeh avatar

ajeh

Oba-san

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

Re: How to change product attribute for order placed?

Where are you running that in phpMyAdmin?

Too many quote marks ...

update orders_products_attributes set products_options_values='No' where orders_products_attributes_id =64;

NOTE: this would also work from Tools ... Insert SQL Patches ...

22 Mar 2007, 6:35 AM
#23
webomat avatar

webomat

Zen Follower

Join Date:
Jan 2005
Location:
Minneapolis MN, USA
Posts:
128
Plugin Contributions:
0

Re: How to change product attribute for order placed?

Ajeh:

Where are you running that in phpMyAdmin?

Too many quote marks ...
[snip]
NOTE: this would also work from Tools ... Insert SQL Patches ...

Thank you Ajeh!! Worked like a charm!

Ayiyii... note to self: First thing tomorrow, slap forehead. Second thing, stop using phpMyAdmin you lazy girl! "-)

sheepish look.

I always forget about that sql patch tool, thanks for the reminder!

Cheers,

Becky

24 Mar 2007, 12:46 AM
#24
ajeh avatar

ajeh

Oba-san

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

Re: How to change product attribute for order placed?

The Insert SQL Patches is a handy tool for adding statements to the database tables where you may or may not have used prefixes on the tables ...

As this translates most everything it works well ...

Glad that you are back on track now ... :smile:

30 Jul 2007, 4:05 PM
#25
ktnaturals avatar

ktnaturals

Zen Follower

Join Date:
Dec 2006
Location:
Ohio
Posts:
196
Plugin Contributions:
0

Re: How to change product attribute for order placed?

Ajeh:

If you backup your database ...

Go to phpMyAdmin ...

Look at the structure of the orders_products_attributes table ...

Edit the field products_options_values and change from BLOB to TEXT ...

NOTE: I have not tested this 100% but at the moment I am not seeing any reason that this would not work for you so that you have a large field capable of holding anything that the products_options_values could hold before but this lets you view it in phpMyAdmin ...

I have to chew on this a bit and consider if there is any reason why this couldn't be changed this way ...

NOTE: you may wish to use a test site and test database and make the change on there and then conduct a lot of tests and examin your old data and see if you see anything obvious that might be moofed up ... :eek:

But, like I say, I don't think this will be an issue ... but again I have not tested it 100% ...
I'm running 1.3.7. Is it OK to do the above? I do have a test dB and shop, but I wanted to make sure I'm not affecting anything else by doing this. Do I need to change the field back to blob? Thanks!

30 Jul 2007, 4:58 PM
#26
ajeh avatar

ajeh

Oba-san

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

Re: How to change product attribute for order placed?

Do backups before you try this but you should not have a problem with it ...

30 Mar 2009, 11:26 PM
#27
10gallons avatar

10gallons

New Zenner

Join Date:
Dec 2008
Posts:
39
Plugin Contributions:
0

Re: How to change product attribute for order placed?

Just wondering now it's almost 2 years since the last post in this thread, is there any other way to change the customers selecetd attributes?

I sell products with heights and widths selectable by the customer. Sometimes customers email me back wanting to change the height or the width.

What is the easiest way to change these details in the customers order?

Many thanks.

1 Apr 2009, 11:31 PM
#28
10gallons avatar

10gallons

New Zenner

Join Date:
Dec 2008
Posts:
39
Plugin Contributions:
0

Re: How to change product attribute for order placed?

BUMP!
Still wondering if there is an updated way in which I can change selected product attributes for items purchased by our customers???

Thanks.