Developer forum

Forum » Development » How to loop through the orderline products ?

How to loop through the orderline products ?

Vilius Janulis
Reply
 I need to know what is the amount of particular product in the order line.

The loop that would loop through the orderline products ?

For example if i have two products (2 order lines), but i changed one product amount to 3 (3 items of one product, and 1 item of other product), how to get that (3 and 1) in customer information template (cart v2) ?  I dont need total amount i need amount of every product :) loop of products in the orderline.

Thank you

Replies

 
Nicolai Høeg Pedersen
 
Vilius Janulis
Reply
 It returns total amount of products, I need amount of products in each orderline.
So what i need is loop of products in orderline.

I do not need number of all products in order, just number of each product in all products.

So if i have 3 products :(prod_1 x 2, prod_2 x 1), i need to get 2 and 1 , not 3 :)

Is there a way to accomplish that ?
 
Vilius Janulis

 

You must be logged in to post in the forum