Jump to content

Assign Products Screen - Price Updates


bsmither

Recommended Posts

An administrator can bulk assign products to categories (Products, Assign to Category). On this screen, the administrator is given the opportunity to bulk adjust the prices by a fixed amount or by a percentage, adding or subtracting by that amount.

The problem is that the equation used to subtract a given percentage amount from the price is wrong. The equation actually sets that price to that percentage. So, when you want to subtract 10% from the price, you actually get a new price that is 10% the original price.

In the file admin/sources/products.assign.inc.php, near line 44, find:

$price = $product[0]['price'] * (($value/100)+(int)$shift);




Change this to:


$price = $product[0]['price'] * (1 + (((int)$shift * 2 - 1) * ($value/100)));

I'm sure it could be optimized, but I'm not worried about that.

After the edit, try it on one selected product.

At some point in the future, I'll add to this conversation with a discussion on what to do if the admin wants to bulk adjust the sales price. And also to bulk assign to a product's regular price that product's original sale price while reducing the sale price.

For the person who said "[it - percent price subtract] didn't work", you will need to better explain the steps you took to use this feature, what you expected to get, and what you actually got.

I'll post this on the bug reporting system when the system gets repaired.

Link to comment
Share on other sites

I would also point out that as of CC515, this is a simple price adjustment. Only the price as found in the product's inventory table record - that is, this has no effect on any quantity discount price breaks, or specified prices for customer groups. (When you make a customer group, a new drop-down selector will appear on the Price tab of the Add/Edit Product screen.)

Also, the Bulk Price Update feature on the Assign to Category administrative screen has had a bug fix and feature enhancement since CC511.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...