cancel
Showing results for 
Search instead for 
Did you mean: 

get item cart quantity

SOLVED

get item cart quantity

Hi,

 

How do I extract the item quantity from cart? I have tried $item->getOrigData('qty'). This result with var_dump in: string(8) "250.0000" string(6) "1.0000" The item quantity is 250 and correct. $itemQuantity = $item->getOrigData('qty') result in 1. How do I get 250 in my variable?

 

In forward thank you.

 

Regards, Jeroen

1 ACCEPTED SOLUTION

Accepted Solutions

Re: get item cart quantity

Hi,

 

To know cart quantity, use below code:

 

$total = $this->helper('checkout/cart')->getQuote()->getGrandTotal();


echo $this->__('', $this->helper('core')->formatPrice($total, false));

or

echo $total;

 

If problem solved then mark as accept.

 

Regards,

Dibyajyoti

 

View solution in original post

2 REPLIES 2

Re: get item cart quantity

Hi,

 

To know cart quantity, use below code:

 

$total = $this->helper('checkout/cart')->getQuote()->getGrandTotal();


echo $this->__('', $this->helper('core')->formatPrice($total, false));

or

echo $total;

 

If problem solved then mark as accept.

 

Regards,

Dibyajyoti

 

Re: get item cart quantity

Hi,

 

Thanks for your reply. I have solved this issue by leaving the cart by a button and get the information from the page elements.

 

Regards, Jeroen