How can I get all data from cart
Is it possible to get check if cart has any product been added in. I want to check if a product been added to the cart in a phtml page.
If the user click the page I want to show how many product they added in just the quantity
If there is nothing show 0
Is this possible
Do you mean any logic to get cart contents. If so this should offer all the explanation you need.
In addition to this you need to add a count.
count($block->cart->getQuote()->getAllVisibleItems()) for example
If I have misunderstood can you add more detail.
Upgrade Magento while keeping all order data, sales data, ect
Is there a definitive way to upgrade Magento while keeping all order data, sales data, ect? After setting up a staging environment and ensuring all extensions, ect. are working properly there will inevitably be orders placed, orders processed, ect. Is there a proper way to sync the data with the production installation? An alternative way I've read...
Get sum of cart quantity of all options for a configurable product on cart page
I want to get sum of qty of all variations present in cart for a configurable product. For ex.- see below image-- 'WHEY PROTEIN ISOLATE-WPI' is a configuration product. In cart it has 2 different variations with qty 1 and 2. I want to get its total qty i.e 3 (1+2) on same page (cart page), how can I get it. Although I can do it by looping for each ...
How can I get post data when adding a product to cart?
Tested and searched on this.. believe me. I have created a form which when submitted adds a specific product to the cart. An input will look like this for example: I am now trying to get that form's data in my observer (in a custom module). The event I thought best to hook onto is checkout_cart_add_product_complete as it provides: I've tried lots o...