Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

what is wrong with this snippet a code?


rubygirl

Recommended Posts

$products_ordered .= (' . $order->products[$i]['model'] . ') ."\n" . $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";

 

 

i am getting a parse error here and can't see what i did wrong...

Link to comment
Share on other sites

$products_ordered .= (' . $order->products[$i]['model'] . ') ."\n" . $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . '  = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'],  $order->products[$i]['qty']) . $products_ordered_attributes . "\n";

i am getting a parse error here and can't see what i did wrong...

 

Try:-

 

$products_ordered .= '(' . $order->products[$i]['model'] . ')' ."\n" . $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";

Link to comment
Share on other sites

Find my untested attempt to help below:

$products_ordered .= "('" . $order->products[$i]['model'] . "')\n" . $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . '  = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'],  $order->products[$i]['qty']) . $products_ordered_attributes . "\n";

 

Robert

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...