Buy X Get Y and -default- group

Hello,I have a problem with the default groups and anonymous group.. I've also configured in your demo site, so you can see how I configured.

Objective: add a product to cart of new subscribers to the site, with 100% discount (free product).

I created a coupon "buy x getY" (00Andrea2 in your back end site) in which I have selected the product as a gift (“nice sow” with discount of 100%, only one per customer). The product is added when the customer purchases any product (I selected all categories). To exclude those who do not register I have only included -default- group. The coupon is also associated with an "automatic discount".

I tried it and I thought that without registration not add to his cart, but ... there is. I should not be in the anonymous group?

Thanks

Andrea

seyi

4 years ago

0+0 / -0

Hello,

In www/administrator/components/com_awocoupon/helpers/estore/virtuemart/couponhandler.php, around line 259 is this:

From the front end I put two products in your shopping cart and then I also find the "nice sow" discounted by 100%, even before enter billing information.

I don't understand when a user should belong to the Group -anonymous- and when to -default- ...

seyi

4 years ago

0+0 / -0

Hello,

Just to verify you are trying to create coupons that anonymous users cannot use right?

So, it is my belief that: -anonymous- group is for all users who are not logged in-default- group is for all logged in users who have not been put in a shopper group yet. For example if you register with joomla, you will not be added to a shopping group automatically, this is also the group that registered users who register through virtuemart will go to by default.

So previously, the code was putting all users without shopper group and not logged in users into -default- group, but the code I gave you fixes this.

Looking at the coupon you created in the demo site you have selected to

Also just added the fix to the demo.

Regards

andrea2

4 years ago

0+0 / -0

That's right, the coupon must not activate for anyone who is not registered.

In your site now works, in my not so .. I must have misspelled the correction. Excuse me, but i'm not practical whith php ..