Posted - November 03 2009 : 22:49:02
| another way to do it would be to use the retailprice value and do a mass-update via sql, and then reset it again after the sale.
NOTE: before doing any kind of mass-update like this, you should backup/export your products table so you've got a record of what the values originally were and so you can re-import the relevant price columns again if anything goes wrong.
NOTE2: remember that if you decrease your cprice by 10%, then increasing cprice 10% aftwards when the sale ends will *NOT* set them back to the original price, you'd need to use a different formula/pct for the reset-afterwards bit, or store the original value as a backup/copy and then copy it back again.
ie don't do this:
because as you can see in that example it'll reset it to a lower value even though you're using the same percentage.
The "retailprice" column holds the rrp (ie what the price would normally be without a sale) and is optional; if retailprice is blank then you just see the cprice like normal. if retailprice isn't blank then it'll display the cprice as the "for sale now" (ie sale) price, and the retailprice as the "normally for sale at" (ie non-sale price) and it'll also show the saving (ie "save this much: $blah" which is the difference between retailprice and cprice)
This has the advantage that you'd be able to see the sale-price and the savings on the product pages, as well as it using those sale-prices in the mini-cart/ordering-pages etc. too.
eg if no sale is on your data would look like:
if a sale is on your data would look like:
eg run a sql something like:
first set the "rrp" (ie pre-sale price) to be a copy of what your current for-sale prices are:
update products set retailprice=cprice
then set the discounted price to be 90% of that:
update products set cprice=Round(cprice*.9,2)
(this assumes you're not already using retailprice)
after the sale's done, you'd then need to reverse it with sqls like:
update products set cprice=retailprice
update products set retailprice=null
That's just a rough example and there are caveats to exactly how/when you'd apply those kind of changes, but it's just another thing to think about when doing this kind of global discounting.
1. A freebie download/addon which lets you run those kind of update statements from vpasp admin:
BYZ097 - Advanced SQL Execution Tool for VP-ASP:
2. A paid addon which allows you to run mass-updates with parameters and which also shows you the results in "test" mode (ie see what it'd do but without actually performing the update) -
BYZ089 - Bulk Product Updater for VPASP:
(vpasp does have a bulk-update facility for products, but it's a different kind of bulk-update; it's a multi-record format where you enter the details for more than one product in a single screen, whereas the byz089 addon and update statements above do the updates in one-shot without manually entering the values for each record)
Web Design, Online Marketing and VPASP addons
Edited by - devshb on November 03 2009 23:30:54