News:

Looking for documentation? Take a look on our wiki

Main Menu

Discount for single product

Started by maegras, February 16, 2012, 23:56:53 PM

Previous topic - Next topic

maegras

Hi everyone. I'd like to assign a discount % to some of my products.
In order to achieve this I've created a calculation rule (-%, 10.0000) but it affects all af my products.

How should I configure virtuemart?

John2400

#1
When you are in pproducts>>taxesand calculations>>do you have the product category set to a Category?

Like  in the default examples-

You might like to put up an image of that page. To show us the settings.

simbus82

Quote from: John2400 on February 17, 2012, 23:03:06 PM
When you are in pproducts>>taxesand calculations>>do you have the product category set to a Category?

Like  in the default examples-

You might like to put up an image of that page. To show us the settings.

Same problem here
http://forum.virtuemart.net/index.php?topic=101136.0

Without selecting categories, a rule like Discout After Tax is applied to all categories... now i think is it a bug.
Joomla! 2.5.16 & VM 2.0.24b

John2400

#3
simbus82

I am confirming I have the same issue - I tried several time like you all did .

I added a tax of 10 % - firstly to a category and they all changed , I took away the category and every item on my site added 10% tax.

I set the tax "to apply no rule" - and it still added the tax ?

I posted it here : http://forum.virtuemart.net/index.php?topic=101143.0

Milbo

I am really sorry, but I dont have this error. Maybe a skype session could help, to see what is different in your case.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

simbus82

Quote from: Milbo on April 12, 2012, 17:25:35 PM
I am really sorry, but I dont have this error. Maybe a skype session could help, to see what is different in your case.

Don't confuse tax with discount!!!

My problem is about discount rule that is applied to all with the category/nation/ecc selection empty.

Tax works well (i have 3 rules for taxes, one for each type of products).

Maybe the problem occours only in some combinations. Assign a tax to one product, then create a discount rule "discount after tax" and publish it without assigning to any product.

I see the discount applied everywhere!
Joomla! 2.5.16 & VM 2.0.24b

rafipl

i have the same... please help :(
when i create new rule, it affects automatically to all products. when i try to assidn "no rule" in product description, rule is still there... ;/


(sorry for polish language)

please help :(

rafipl


jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

LAMF

#9
I got this set up ok but what if I want to add a special discount for just a few products in a special category?
This way all products in the choosen category gets the discount.
Can I create a Category that is invisible in the shop but ar still active in the background and that way add the discount to just th eproducts that are added to this category?
That would be a smooth way to solve this...
But if there's another way I'd be more than happy to know.

This works! Excellent.
I just added a new category called 10% rebate and set it as unpublished and in the discount -10% rule I added this category and voila it works and don't display on the startpage among other categories!
BR
LAMF - R.I.P. Johnny Thunders

simbus82

Quote from: jenkinhill on April 16, 2012, 21:33:33 PM
There is a bug in VM2.0.4 - update to 2.0.6  http://dev.virtuemart.net/projects/virtuemart/files

The bug is not resolved.

If i simply create and PUBLISH a DATax (modificator of price with tax), and i NOT ADD THIS RULES TO ANY PRODUCT..... all products are influenced by this rule!
Joomla! 2.5.16 & VM 2.0.24b

Setko


Arky527

Fix for those on 2.0.4:

In administrator/components/com_virtuemart/helpers/calculationh.php on line 732

Replace
Quote
if(!empty($id) && $rule['virtuemart_calc_id']!==$id){
//    vmdebug('Price override set '.$id);
   continue;
}

With
Quote
if(!empty($id) && $rule['virtuemart_calc_id']!==$id){
//    vmdebug('Price override set '.$id);
   continue;
}
elseif(empty($id))
{
   continue;
}

Will reverse current system of apply discount (when no category set) to all products with no discount set - to apply no discounts when none are set in the product, regardless of the discounts properties

Briefly tested and works

Setko

Thank you for that, i solved it. But i'm using 2.0.8 version and it seems like it's a different code as in 2.0.4, so i had to replace this one:

Quote
if(!empty($id)){
   if($rule['virtuemart_calc_id']==$id){
      $testedRules[] = $rule;
   }
   continue;
}

simbus82

One year, versione 2.0.24c.

The problem is still here.

i have 300 correctly setted products, today i go to create a single DBTax Rule, and... voilĂ ! All of my products now have this Rule without my decision...  :-X
Joomla! 2.5.16 & VM 2.0.24b