Jump to content

List products in cart in my way


Recommended Posts

Hi,

I want to make a variabel that is containg information in this way:

$products = "1:Testorder:1:1000,1:Exampleorder:4:1300";    



the first 1 is the nr on the row.
Testorder is the name om the product
the nex 1 is the quanity
1000 is the price per unit

after the [ , ] next row in the cart is begin

i am not sure if this is the function down i should manipulate to get to my result.

$products = $cart->getProducts();    
   foreach ($products as $key => $product)
   {
   $products[$key]['name'] = str_replace('"', '\'', $product['name']);
   $products[$key]['name'] = htmlentities(utf8_decode($product['name']));
   }        




All tips are welcome

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...