659 users online
Register
Log in
Shopping Cart
(0)
Home
Product
Overview
Features
Store demo
Screenshots
Showcase - live shops
Copyright Notice Removal
System Requirements
Roadmap
Contribute
Team Members
License
Downloads
Download nopCommerce
Extensions
Release Notes
Support
Documentation
Forums
Partners
Recommended Hosting
Solution Partners
Become a Partner
Community sponsorship program
My Account
Contacts
Tweet
Home
/
Forums
/
General
/
nopCommerce Upgrades
/
Quick Easy SQL Script Needed to Convert ProductVariant DisplayOrder to CatMapping DisplayOrder
Quick Easy SQL Script Needed to Convert ProductVariant DisplayOrder to CatMapping DisplayOrder
Reply
dellams
Total Posts:
23
Karma:
125
Joined:
9/18/2010
Location:
United Kingdom
PM
Posted:
3 months ago
Quote
I am presently in the process of upgrading our site from 1.6 to 2.3, previously we were using the ProductVariant DisplayOrder but now we want to use the CatMapping display order since it is easier to administer in the admin screens.
I don't really want to have to do this manually since we have 820+ products!
Any help would be greatly appreciated...
Thanks.
D.
0
Please
login or register
to vote for this post.
(click on this box to dismiss)
dellams
Total Posts:
23
Karma:
125
Joined:
9/18/2010
Location:
United Kingdom
PM
Posted:
3 months ago
Quote
Never mind, I have figgured it out, in case anyone was interested, here is the script:
update
Product_Category_Mapping
set Product_Category_Mapping.DisplayOrder = pv.DisplayOrder
from Product_Category_Mapping as pcm
inner join ProductVariant as pv
on pcm.ProductId = pv.ProductId
And here is how to verify it has done it (recommend you run it before the update and again after to check the difference)
select pcm.ProductId, pcm.CategoryId, pcm.DisplayOrder, pv.DisplayOrder
from Product_Category_Mapping as pcm
inner join ProductVariant as pv
on pcm.ProductId = pv.ProductId
where pcm.ProductId = pv.ProductId
0
Please
login or register
to vote for this post.
(click on this box to dismiss)