I have created one module in which we can directly add products to cart using SKUs with different configuration options
but when i added it shows one product in cart with last option i selected and 2 qty.
I want to add same product with different options and quantities.
Proocess which generate an Array like this which i pass to store in cart :
Array(
[0] => Array(
[WT09] => Array(
[product] => 1817
[sku] => WT09
[qty] => 1
[super_attribute] => Array
(
[141] => 167
)
)
)
[1] => Array(
[WT09] => Array(
[product] => 1817
[sku] => WT09
[qty] => 1
[super_attribute] => Array
(
[141] => 171
)
)
))
any idea on how to solve this issue?
Best Answer
Magento core module retrive Product object using
as it checks in cart session and retrive previous Item Id if matched so all need to do is remove that function from out module and retrive product using :
with this each time I'll get new Item Id and store it in session but if we already has same product with same configuration it will keep with same product and just append its quantity.