Hello
I try to write code for a loop on checkout complete. My code at the moment is:
Hello
I try to write code for a loop on checkout complete. My code at the moment is:
What do you mean by "ok" and "not ok"? Can you please post here raw output of your code?
ok means that is ok and i dont need to change anything.
Here is output:
Consider dumping the contents of $product variable in the foreach cycle: {$product|fn_print_r}, so you'll be able to view its internal structure.
Already did this but hasnt info that i need:
Update:
Price is ok with this smarty:
price: {math equation="x / y" x=$product.price y=1.24 format="%.2f"}
Try to use:
{$_pdata = $product.product_id|fn_get_product_data:$auth} .... category: "{$_pdata.main_category|fn_get_category_name}"
Not sure what do you mean by payout
ecom thanks
i can see now category name but not id.
Category ID is in $_pdata.main_category
i tried this:
category: "{$_pdata.main_category.category_id}"
but doesnt work
Please try
... ,category:"{$_pdata.main_category}" ...
The final code should be:
{$_pdata = $product.product_id|fn_get_product_data:$auth} .... category: "{$_pdata.main_category}"