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)
Related
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.
I have two types of products:
A product that is on sale all the time and uses the special price field with no scheduled dates.
A product that is scheduled to go on sale once or twice a year using special price field and scheduled to and from dates in the future.
I have a coupon that MUST not be applicable on products whose special price field is active, whether by virtue of today's date falling within the to and from date fields, or by simply having its special price field filled in.
I can easily solve for product 1 - add a condition excluding anything with a special price greater than .01.
BUT that doesn't solve for product 2 - I do not want to exclude product 2 when the dates of the special price on product 2 have not been reached yet or have expired.
I do not want a manual solution (i.e. manually add products to a sale category when on sale, remove when not on sale).
I'm thinking of creating a cron job to make changes on the fly in a semi-auto fashion, but that seems desperate. Is there nothing I can do here to automate this based on special price dates?
You can do that using the Magento Admin.
First in admin go to Catalog -> Attributes -> Manage Attribute -> Look for "special_from_date" and "special_to_date".
Click on it, look for the option "Use for promotion conditions" set "Yes"
Now your special_from and special_to date will show up on your cart promotion rules section.
I'm dealing with exactly the same need.
For now, I'm developing a cron job: it run every day at midnight andupdates the rule end_date with today(). It's hacky, but so far looks promising and it's way easier and more manteinable than messing with mage internals.
Edit: also see here https://magento.stackexchange.com/questions/210006/catalog-price-rules-with-date-as-conditions-cannot-possibly-work-due-to-strtotim
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.
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.
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