I have a scenario that when the customer adds products to the cart I will free 1 qty of minimum item (almost like salesrule "buy x get y"). So, I need to change the quote total after the products have been added to the cart.
I tried several events: checkout_cart_product_add_after, checkout_cart_add_product_complete, sales_quote_collect_totals_after... and when I change the quotes total and log right that time, the total has changed, but when I go to shopping cart page, it is unchanged.
I tried getting the quote by: $observer->getEvent()->getQuote(), or $session->getQuote() and also collected quote total again, but nothing happened.
Is there any way to change the quote/cart's total right after adding products to the cart (or cartView action)???
Related
As the title I would like to disable prioritization of certain items from being added to the cart In Magento 1.
For example, I want to treat a product with a price of 0 as not being able to put it in the cart, and put the product with a non-zero price first, followed by the product with a price of 0.
Is there any way?
In the Volusion shopping carts "soft add to cart" feature, which is turned on in product options with "Enable Add To Cart Popup", the popup shows the "Subtotal" of products currently in the cart.
The issue is this Subtotal does not include quantity discounts and therefore shows customers a higher price than the actual Subtotal after discounts are applied.
For that reason, we would like to display the cart Total, which includes any quantity discounts applied.
The problem is, I cannot find a place where this can be done in the HTML we have access to and if I were to find it, I'm not sure of the proper Volusion syntax to use to call up the Total instead of the Subtotal.
Thanks!
I had a different issue, but the same problem (soft add to cart did not display the proper info).
In my case, we allow engraving on our products, for an additional charge, and when selected this option was not displayed in the popup cart. As a result, customers were not sure if they chose it or not.
My solution was to add a Shopping Cart block to the page, as part of the template, using jQuery.
If you call http://yourUrl/AjaxCart.asp you'll see the discount info you need in the JSON data, as well as the line items in the order.
When I apply a Catalog Price Rule with a percentage discount (e.g. 20%) across all products, the old price and special price show on my product list and product view pages e.g.
Old Price: £10
Special Price: £8
However on the basket page it only shows the special price, so it is not immediately obvious that there is any discount, or what that discount is.
I would like to show the original grand total and the special grand total on the basket, as well as the discount percentage.
Is this possible?
I appreciate any help!
Thanks
Listing is dependent on flat tables.
You need to run indexing so that flat tables have the effect of rules applied.
So do run indexing follow it by cleaning cache and then check.
Our company sells pharmaceuticals online and by law we are limited to how much of a particular drug a customer can purchase.
For singular products with one brand this is easily controllable through default Magento functionality, my problem arises when we have different brands of a particular drug.
In a nutshell I can currently limit a customer to 1 pack of paracetamol from brand A but there is nothing to stop them getting another pack from brand B at the same time.
I would like to be able to check the cart for products with a particular attribute and limit them to 1 per cart. Ideally this would be when the customer clicks add to cart and the message would be displayed via the default Magento alerts that we currently have.
EDIT: I think the easiest way to solve this would be to check the SKU codes currently in the basket when adding a product to the cart. If there is a match, Throw up an error else add the item to the cart.
I think this link will help you but you need to modify as per your requirement. http://ceckoslab.com/magento/magento-check-if-product-is-in-cart/..
This link is to check the cart whether the same product is added or not? So modify this as per you requirement
You can set maximum allowed quantity in cart from admin panel. System->configuration. From left tab see catalog->inventory. Set Maximum qty allowed in shopping cart to 1.
If you want to add check on whole cart. see this paid extension
So our store basically sells 6month and annual subscriptions to our businesses website. I was wondering if there was a way to make it so that they can only add one subscription (product) to the cart, not multiples, so customers dont make the mistake of buying double subscriptions?
To limit only one item per order
Create a custom module with a observer to disallow adding items if the cart already has quantity (see getItemsQty()). You should also be aware of updateItem() which could be used to change the quantity of items in one's cart
checkout_cart_update_items_after
checkout_cart_product_add_after
checkout_cart_add_product_complete
checkout_cart_update_item_complete
checkout_cart_save_before
checkout_cart_save_after
See
- Magento - Adding multiple products to cart programatically
To limit one of each product per order
You can limit the maximum quantity of a product that can be added to your shopping cart by editing the value on the Inventory tab when in product admin.
See Magento: limit product max quantity to 1 per order. quantity 2 = 2 orders