Stop promotion rules being applied in Magento - magento

In my magento installation I have a complex classification of the clients. On the one hand there are different groups defined. But there are also some clients «VIP», that is a specific attribute (Yes/No).
Now I have some product promotion rules that are being applied to the different groups. But I don't want these promotion rules being applied to the clients that have the VIP attribute set to yes.
For example:
Product A: Regular price - 200€
Promotion Rule: Product A discount of 50€
(note that this is a «Catalog price rule» promotion, not «shopping cart price rule»)
I tried working with the catalog_product_get_final_price, but I can't stop rules being applied with this. It's just a: if ($customer->getVip)... but I don't know where to do this.
Thanks!

i guess you have to edit the properties of the attribute "vip"
go to manage attributes and look for the "vip" attribute. set "Use for Promo Rule Conditions" to yes. Refresh Cache and Reindex. THen you will be able to see this "vip" attribute while making a coupon.

Related

How do I find a Magento products primary category

I am using Magento 1.6.2.
I need to find an easy way of checking which category is the "default" category for any given product, where multiple categories have been assigned to that product.
The reason for this is as follows:
I have different discount amounts available on different categories in my store.
Where a product falls into two categories with different discounts applied, the highest discount should be applied to that product, but if that product has been added to the system (created) with a default category that has a lower discount, and then afterwards added into the higher discount category as well, the higher discount level is not being applied when that product is purchased.
If, however, I add the product to the higher discount category first, and then to the lower discount category afterwards (so the product appears on my website in all the right places), the correct (higher) discount level applies to that product.
I can only assume, therefore, that the default (or primary, or first, however you want to label it) category is the one that determines the outcome of the discount level to be applied to it. If this is wrong, then I need a lesson in understanding the mechanics behind this to see where I have gone wrong in the overall setup of this system...
If my assumption is correct, then I need a way to determine which category any given product (using the SKU) has been assigned to first, to ensure that the correct discount can be applied to that product.
I hope I have explained that clearly enough!
Does anyone have any suggestions. I have been unable to find information on this regardless of guessing specific search terms. The only things I can find are related to general category retrieval, and not this very specific task I need.
Cheers!
Im afraid your assumption is incorrect. Magento has no concept of a 'primary' category for a product. It only knows the product is in category id(s);
1, 12, 234
etc. The id's are stored numercially with no idea of which category might be more important than another.
What you could do instead is create a custom attribute and enter the id of the category you want to treat as 'primary' and retreive this attribute value when working out whether to give more discount or not.

Change product special price only for current session

Is it possible to set product special price for current session? because i have to set product special price if my custom condition is satisfied?is it possible?
Thanks in advance
What is your objective?
Special price is not dependent on customer group.
If there is some specific custom condition that can be defined by catalog rules then use catalog rules.
Else you need to create your custom module and modify product price calculation under specific condition(bit complex)

How to apply "20% Discount" to specific Customers of a Customer Group in Magento 1.7.2?

I have products with a normal price(let's say product A costs 20e) and a group price(lets product A costs 15e) assigned to my customer group
that I call it "Resellers".
I want to apply an extra 20% discount to specific Resellers (not to the whole Reseller group)
in the group price(meaning the 15e)
I tried to solve it by creating a "Shoping Cart Price Rule" (I called it "20% Extra Discount") it applies to the whole Customer Group
How Can I apply 20% it only to specific Resellers and not to the whole Reseller Group for the group price only?
What you are asking is not possible with Magento out of the box.
You can overcome this by generating a coupon that you can send out by e-mail to your specific customers.
or you can try to use an extension like this.
It's not free, but from the looks of it it might get you what you need.
I'm in no way associated to the extension provider. I just found it on a simple search on the web.
You need to do some coding in order to achieve above said, following is the way it should happen.
You would need to hook into an event, ex :
Changing the price in quote while adding product to cart: magento
Also in the observer created above you need to do something like
Add custom discount order in total with button
Now whats above will do :
Let us suppose you create a general rule for 20% discount but do not relate it to any customer group.
What happen is once a product is added to a cart you can check into an Observer whether you want to provide discount to this particular customer.
If yes programmatically add coupon to the quote or order else not.
Please note : there are various other type of event for ex: after moving to checkout etc, in case you do not want to use on adding of product to cart.
hope above helps.

How to set Minimum Order Quantiy (MOQ) for a category in magento?

How to add Minimum Qty Allowed in Shopping Cart for a category.
In Magento (ver. 1.6.2.0) backend, System > Configuration > Inventory > Product Stock Options tab, you can set the 'Minimum Qty Allowed in Shopping Cart' but for Customer Group; not for Category.
We have lots of categories having absolutely different kinds of items and need different MOQs for specified category.
How would I force a minimum of 6 products from the jewellery category and 7 dozen from the bra category?
Thanks, Shaman
What you describe would not be natively possible with Magento. Magento natively provides a 1:many relationship with categories and products,
Ie. A product can be in many categories
What you propose would induce a race condition for a product whereby there could be 2 possible critera for a product's inventory controls if the product exists in more than one category.
Eg. If you set Category A to have a MOQ of 6, and Category B to have a MOQ of 10 and Product C exists in both - which rule does it inherit (highest/lowest)?
As a result, this isn't going to be natively possible, but you could build a custom module to achieve it.
Either ...
Via a category->save() observer
You could create a custom attribute for the category - MOQ, then have your module 'listen' to the category save, and iterate through all products accordingly to set the MOQ for said products.
Advantages - More granular control per product, no speed impact/overheads for frontend
Disadvantages - Slow to save category
Or
By modifying the isSaleable() function
You could rewrite the standard function which determines if a product is saleable. In your modified function, check categories of said product, obtain the MOQ (highest/lowest - whichever) then return true; or return false; accordingly.
Advantages - Less administration hanging around, stops having to continually update indexes at a product level needlessly
Disadvantages - Slower to check if product is saleable (frontend would seem slower)
Either way, you need to build a custom module, or seek a professional to make one for you.

Programmatically apply a discount price in product list

I would like to programmatically display a discounted price on the product list/page so that each customer as a personal price shown based on a customer attribute (like gender for instance, and of course let it be assigned as new price for the user session) but I can't see a viable option via the magento catalog price rules involving customer attributes other than the assigned group.
I'm using the group to do different kind of discounts and categorization of the customers, so the path of "split the customers on the gender" (or similar) is not an option unfortunately, since I can't assign more than 1 group per customer.
At the moment I was thinking about setting up a custom observer to check for calls to the price generation and then let it consider my customer attributes when calculating the price.
Is that possible? if so, any pointers about?
Would you suggest something different?
Thanks a lot to everyone for your time.
As I was thinking before, I solved my issue creating a custom module with an observer looking for catalog_product_get_final_price calls, getting the customer details from the current customer session.
It works great, I just need to let it display the correct price in the catalog product list, but is minimal, as the price seems to be calculated correctly inside the product page and the cart

Resources