Hello
I try to write code for a loop on checkout complete. My code at the moment is:
Posted 07 June 2016 - 10:55 AM #1
Hello
I try to write code for a loop on checkout complete. My code at the moment is:
Posted 07 June 2016 - 11:03 AM #2
What do you mean by "ok" and "not ok"? Can you please post here raw output of your code?
Alexander Bolshakov
CS-Cart Architect Team
Posted 07 June 2016 - 11:14 AM #3
ok means that is ok and i dont need to change anything.
Here is output:
Posted 07 June 2016 - 11:18 AM #4
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.
Alexander Bolshakov
CS-Cart Architect Team
Posted 07 June 2016 - 11:29 AM #5
Already did this but hasnt info that i need:
Posted 07 June 2016 - 12:25 PM #6
Update:
Price is ok with this smarty:
price: {math equation="x / y" x=$product.price y=1.24 format="%.2f"}
Posted 07 June 2016 - 02:11 PM #7
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
GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart USD 1210 Multi-Vendor USD 1250 Multi-Vendor PLUS USD 3100 (2775)
CS-Cart Ultimate USD 4025 CS-Cart + YOUPI USD 1459 Multi-Vendor Ultimate USD 7500 (6000)
Posted 07 June 2016 - 02:34 PM #9
Category ID is in $_pdata.main_category
Alexander Bolshakov
CS-Cart Architect Team
Posted 07 June 2016 - 02:39 PM #10
i tried this:
category: "{$_pdata.main_category.category_id}"
but doesnt work
Posted 08 June 2016 - 05:09 AM #11
Please try
... ,category:"{$_pdata.main_category}" ...
Posted 08 June 2016 - 07:16 AM #12
The final code should be:
{$_pdata = $product.product_id|fn_get_product_data:$auth} .... category: "{$_pdata.main_category}"
GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart USD 1210 Multi-Vendor USD 1250 Multi-Vendor PLUS USD 3100 (2775)
CS-Cart Ultimate USD 4025 CS-Cart + YOUPI USD 1459 Multi-Vendor Ultimate USD 7500 (6000)