Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

50% off on all items quickly?


mmier

Recommended Posts

quickprice update contribution

 

here

Forum search

Contributions search

Documentation search (note: docs being adapted for MS3, may be different for MS2)

3 tips for better forum searching

 

Want to post? Read this first:

osCommerce for dummies

Topic name etiquette

 

Basics:

Basics for design

Right syntax to use near '-20, 20'

Cannot re-assign $this

Parse error

Link to comment
Share on other sites

ok let me rephrase that, how about an SQL statement that could be entered in my phpmyadmin utility?? :blink:

 

I?m looking into the contribution, but I would think it could be done via SQL.

 

 

update `products` set products_price = products_price / 2

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

You can also use MySQL's built-in ROUND() function as well.

 

-------------------------------------------------------------------------------------------------------------------------

UPDATE `products`

SET `products_price` = ROUND(`products_price` + ((`products_price` / 100) * percentage), 2);

-------------------------------------------------------------------------------------------------------------------------

 

Replace percentage with the desired percentage value. Then execute it against your database using phpMyAdmin.

 

 

Example:

 

Hey, the sales season is on! 50% off all products.

----------------------------------------------------------------------------------------------------------------

UPDATE `products`

SET `products_price` = ROUND(`products_price` + ((`products_price` / 100) * -50), 2);

----------------------------------------------------------------------------------------------------------------

Link to comment
Share on other sites

Install the sale maker contribution...however, be warned it is server intensive. Other than that it works nicely...

 

Bobby

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...