Jump to content

Customer Group Price Increase?


hsmonline

Recommended Posts

I need to find a way to add a negative price discount (price increase) for customer groups. I want to mark up prices for some groups and discount for others. I must also keep the original prices on the store front so having increased prices across the board and adding different discounts per group will not work.

 

Didn't think it would be so hard to put a little "-" in front of the discount amount (as you can in other programs).

 

There must be a way to do this with minimal effort, can anyone help?

 

Thanks in advance.

 

P.S. A catalog price rule increase would also do the trick but cannot add negative number there as well.

Link to comment
Share on other sites

  • 2 months later...
  • 7 months later...

Hi Vekia & Sajmir

 

I think the original post was referring to being able to add a group price increment instead of a discount for a whole group.

 

This is mostly useful in wholesale situations where the product price is the cost price and you want the wholesale group to have a  profit margin of 10% or 20%... so instead of discount it would increase the price.

 

Not per product but rather for all products.

 

this cannot be done unless the tpl files is edited i believe, but i am not sure which files need to be changed.

 

RICKY
 

Link to comment
Share on other sites

ahhh now i see what you expect, you want to increase price.

prices tab on product page, where you can define specific price allows to decrease it only.

unfortunately, at the moment, i have no idea (i don't know any feature for that)

Link to comment
Share on other sites

I have tried to narrow down the code, and think i may have found where the math is done 

This is in classes/product.php

 

but anyone smart enough to find a clean solution to reverse the discount to increase by %?

 

Also i am not sure if this will need to be done anywhere else.

 

// Group reduction
if ($use_group_reduction)
{
$reduction_from_category = GroupReduction::getValueForProduct($id_product, $id_group);
if ($reduction_from_category !== false)
$price -= $price * (float)$reduction_from_category;
else // apply group reduction if there is no group reduction for this category
$price *= ((100 - Group::getReductionByIdGroup($id_group)) / 100);
}
Link to comment
Share on other sites

  • 1 month later...

Hi,

 

I was looking for something like this, would it not be easier to allow the text box to accept negative percent values so that you could both increase or decrease the price by applying + or - percent values.

 

Is this possible and would it have a big impact on any future upgrades??

 

Thanks

 

Jason

Link to comment
Share on other sites

Any 

 

Hi,

 

I was looking for something like this, would it not be easier to allow the text box to accept negative percent values so that you could both increase or decrease the price by applying + or - percent values.

 

Is this possible and would it have a big impact on any future upgrades??

 

Thanks

 

Jason

 

Any comments??

 

Thanks

 

Jason

Link to comment
Share on other sites

  • 5 months later...
  • 4 months later...
  • 7 months later...

bump... with solution

go to controllers/admin/admingroupscontroller.php

locate "protected function validateDiscount($reduction)" and change the if statement to

 

if ((!Validate::isPrice($reduction) && $reduction > 100) || (!Validate::isNegativePrice($reduction) && $reduction > -100)) {

...

}

What it does:

isPrice checks the input for a positive number, isNegativePrice checks if it's negative number. This if statement checks if it's positive number less than 100 or if it's negative number higher than -100.

If you want to increase the price for specific group simply enter negative discount which will then be added, not subtracted from the price.

  • Like 3
Link to comment
Share on other sites

  • 4 weeks later...

bump... with solution

go to controllers/admin/admingroupscontroller.php

locate "protected function validateDiscount($reduction)" and change the if statement to

 

if ((!Validate::isPrice($reduction) && $reduction > 100) || (!Validate::isNegativePrice($reduction) && $reduction > -100)) {

...

}

What it does:

isPrice checks the input for a positive number, isNegativePrice checks if it's negative number. This if statement checks if it's positive number less than 100 or if it's negative number higher than -100.

If you want to increase the price for specific group simply enter negative discount which will then be added, not subtracted from the price.

 

 

Great!!

Link to comment
Share on other sites

  • 2 months later...

bump... with solution

go to controllers/admin/admingroupscontroller.php

locate "protected function validateDiscount($reduction)" and change the if statement to

 

if ((!Validate::isPrice($reduction) && $reduction > 100) || (!Validate::isNegativePrice($reduction) && $reduction > -100)) {

...

}

What it does:

isPrice checks the input for a positive number, isNegativePrice checks if it's negative number. This if statement checks if it's positive number less than 100 or if it's negative number higher than -100.

If you want to increase the price for specific group simply enter negative discount which will then be added, not subtracted from the price.

 

I try this solution but not working on PS. 1.6.0.9.

 

Can somebody help me. PLEASE.

 

THX in advance.

Link to comment
Share on other sites

  • 1 year later...

bump... with solution

go to controllers/admin/admingroupscontroller.php

locate "protected function validateDiscount($reduction)" and change the if statement to

 

if ((!Validate::isPrice($reduction) && $reduction > 100) || (!Validate::isNegativePrice($reduction) && $reduction > -100)) {

...

}

What it does:

isPrice checks the input for a positive number, isNegativePrice checks if it's negative number. This if statement checks if it's positive number less than 100 or if it's negative number higher than -100.

If you want to increase the price for specific group simply enter negative discount which will then be added, not subtracted from the price.

Thank you. It works in 1.6.1.10 with client groups, but not with categories within client groups.

Any suggestions, please ???

Link to comment
Share on other sites

  • 8 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...