I have two attributes for a product,first one is the unit price and second is the case price.
The unit price is the default price of the magento,for the case price i create a new attribute named case pirce.
My question is i display the prices in the product description,but it is not allowing me to add the case price to the shopping cart
Am i doing some thing wrong here,if so let me know the solution.
One way to achieve this is using the new "Qty Increments" feature in conjunction with Tier Pricing. If you look in the Inventory tab on the Product Edit screen, you can enable Qty Increments and set a value, which will enforce that the customer add products to the cart in batches equal to a multiple of the Qty Increment value.
Products are added in quantities of 1, so a "case" isn't really a logical unit to the system. Some options:
You could use javascript to add the product to the cart in the right quantity (for a case), but the user will be able to adjust this quantity.
You could create a second, related product as "Case of X", but the inventory will not match up.
You could create a product option for single/case quantities with a price, but this seems somewhat unintuitive and also has the quantity problem as above.*
You could create a grouped product with a fixed quantity. This is a bit contrived, but makes the most sense from a bookkeeping perspective.
Let me know if you have any questions. Hope that helps!
Thanks,
Joseph Mastey
magento calls it "tier pricing" you should try and configure your "cases" by quantity and assign a discount for it
Related
Is it possible to add second price to each product and use that price if user in specific usergroup?
I was thinking doing that by adding another column to the product price table and then take advantage of the promotion function to somehow use that price instead of the usual discount you can set from admin.
Any pointers or ideas would be great, thank you.
Yes, it is possible to define price for product that is valid/shown only for users in specific usergroup.
To achieve this you need to use Quantity discounts tab on Editing product page.
Name of this tab implies as there must be some large amount of items bought (like volume discounts...), but quantity can also be just 1 item.
For this you first need to define usergroup (Customers->User groups).
Example is shown also on CS-Cart Knowledge base: Wholesale Prices
Best regards,
Bostjan
It is default CS-Cart feature. Please check the following article in the database:
http://kb.cs-cart.com/wholesale-prices
I trying to allow users to get the first product sample they add to their cart for free, but any samples they add after (including the one they already added) should be normal price. Right now I using setOriginalCustomPrice in a module, but the customer can change the quantity, and the price stays at zero instead of going up. Anyone know how to go about this?
You can achieve this by a simple calculation where you are using setOriginalCustomPrice.Currently I think you are setting price 0.Instead of doing this,use following logic to set custom price.
$customPrice=$qtyincart*$productPrice-$productPrice.
So if user add 1 qty then $customPrice will be 0 else will equal to sum of qty-1.
I hope this solve your purpose.
hey i'm implementing a custom discount system since magento discount system does not feet my requirements so i'm trying to apply a discount on an Mage_Sales_Model_Quote_Item I've read some and I've found the following function setOriginalCustomPrice the thing is that it applies on the item, and if the user changes the quantity he will get the discount on the item with the new quantity, so i'm trying to use a different method addOption on the item and only on the cart page show the calculations based on the quantity in the option value
$item->addOption(array('code'=>'promo','value' => serialize(['amount'=>10,'qty'=>1])));
and in the cart page
$promo = $item->getOptionByCode('promo');
echo '<div class="orig-price">'.$item->getOriginalPrice().'</div>';
echo '<div class="new-price">'.$item->getOriginalPrice() - ($promo['amount'] * $promo['qty']).'</div>';
the problem is that it does'nt actually apply the new price on the product,
so i want to customize Mage_Sales_Model_Quote->collectTotals() to show my discounts
and send it to the admin back-end when order is completed
how can i achieve that?
thanks in advance
I think there is a fundamental flaw in your approach. I'm not sure what you don't like in standard discounts, and what you can't achieve with catalog or shopping cart rules, but what you're trying to do definitely breaks these features (along with my heart).
However, if you're sure about what you're trying to do, then don't customize Mage_Sales_Model_Quote->collectTotals().
This function just... well, it collects all totals: subtotal, shipping, discount, etc. And it looks like you're changing only price output, but Magento itself doesn't know anything about it.
So if you want to let Magento know that you're changing the item price, you have to either add your own total, or change one of the existing totals. After that Magento will do everything else. Since after your changes Magento outputs already calculated price instead of original one, it may be strange for customer to see the original price in the cart and the additional discount total. So it looks like you will have to change subtotal total.
To do that you have to rewrite Mage_Sales_Model_Quote_Address_Total_Subtotal class in your extension and insert your calculation in _initItem() method. Around line 111 in the original file you will see the code:
$item->setPrice($finalPrice)
->setBaseOriginalPrice($finalPrice);
And this is where Magento sets price for the item, so you can insert your calculations and change $finalPrice before that. If you have virtual products, you will have to change collect() method too.
In Sylius I can create variant of of a product, for instance 3 sizes of a t-shit, each size have different price. This is a nice solution if I have a product with one thing that has an impact on a price.
What about situation, where I have a Tshirt which have many options that have an impact on price, like:
Size
Material
Color
and few more
I cannot create product with variants, of each configuration. It should be for example in a way, that this particular option has an impact on price by adding to it some amount of money or %. This is like Adjustment, I think. But how to use it for products?
----MORE DETAILS--------
I need to define a product with some options that have impact on price, like Adjustments. Then when User adds product to cart, he/she chooses some options. Each of these options changes the product price. So base product has price $20. But when user adds it to cart, change 3 parameters, then the price should be $35. And this product with $35 price should be added to a cart, and then to an order.
You can consider listening to product or variant post create event, then in your listener check what options are set and adjust price according to options.
Maybe You can use custom PriceCalculator which must use CalculatorInterface.
In this class could be implemented all custom logic which depend of product.
I'm working on a Magento site that has a number of simple products. There's also a "holiday package" which combines several simple products into one, at a discounted price:
6 of Item A
2 of Item B
2 of Item C
2 of Item D
The "grouped" product type is pretty close to what I need - it allows each item to keep track of it's own stock, and when it comes time to ship and estimate packages, it tries to pack the containers using the weight/volume of each individual item. (This shipping aspect is very important, as we need to pack the boxes as efficiently as possible - using a simple product with an estimated size for all items may not work).
However, we do not want the customer to be able to choose the quantity of each item. The customer should instead be asked to choose how many holiday packages they would like.
Is a grouped product the best approach? Is there a better way to handle this?
In Magento 1.5.1, the best solution should be the bundle product. There, you can define a price, a quantity for each item in the backend. You can block the user to change the quantity for these items, not for the bundle product (you could too if you want but it's not your need here).
We do like that for some of our product. Check the screenshot to see an example of configuration