| @@ 93-110 (lines=18) @@ | ||
| 90 | $xoopsTpl->assign('commande', $tblTmp); |
|
| 91 | ||
| 92 | // Boucle sur le caddy ************************************************************************************************ |
|
| 93 | foreach ($tblCaddy as $itemCaddy) { |
|
| 94 | $tblTmp = array(); |
|
| 95 | $item = $tblBooks[$itemCaddy->getVar('caddy_book_id')]; |
|
| 96 | $tblTmp = $item->toArray(); |
|
| 97 | $tblTmp2 = $tblTmpAuth[$itemCaddy->getVar('caddy_book_id')]; |
|
| 98 | $tblJoin = array(); |
|
| 99 | foreach ($tblTmp2 as $item2) { |
|
| 100 | $auteur = $tblAuthors[$item2->getVar('ba_auth_id')]; |
|
| 101 | $tblJoin[] = $auteur->getVar('auth_firstname') . ' ' . $auteur->getVar('auth_name'); |
|
| 102 | } |
|
| 103 | if (count($tblJoin) > 0) { |
|
| 104 | $tblTmp['book_joined_authors'] = implode(', ', $tblJoin); |
|
| 105 | } |
|
| 106 | $tblTmp['book_price_ttc'] = sprintf('%0.' . bookshop_getmoduleoption('decimals_count') . 'f', $itemCaddy->getVar('caddy_price')); |
|
| 107 | $tblTmp['book_shipping_amount'] = sprintf('%0.' . bookshop_getmoduleoption('decimals_count') . 'f', $itemCaddy->getVar('caddy_shipping')); |
|
| 108 | $tblTmp['book_qty'] = $itemCaddy->getVar('caddy_qte'); |
|
| 109 | $xoopsTpl->append('books', $tblTmp); |
|
| 110 | } |
|
| 111 | ||
| 112 | $xoopsTpl->assign('commandAmountTTC', sprintf('%0.' . $dec . 'f', $commande->getVar('cmd_total'))); // Taxes in the ordre |
|
| 113 | $xoopsTpl->assign('shippingAmount', sprintf('%0.' . $dec . 'f', $commande->getVar('cmd_shipping'))); // Taxes in Shipping cost |
|
| @@ 98-115 (lines=18) @@ | ||
| 95 | $xoopsTpl->assign('commande', $tblTmp); |
|
| 96 | ||
| 97 | // Loop through the caddy ************************************************************************************************ |
|
| 98 | foreach ($tblCaddy as $itemCaddy) { |
|
| 99 | $tblTmp = array(); |
|
| 100 | $item = $tblBooks[$itemCaddy->getVar('caddy_book_id')]; |
|
| 101 | $tblTmp = $item->toArray(); |
|
| 102 | $tblTmp2 = $tblTmpAuth[$itemCaddy->getVar('caddy_book_id')]; |
|
| 103 | $tblJoin = array(); |
|
| 104 | foreach ($tblTmp2 as $item2) { |
|
| 105 | $auteur = $tblAuthors[$item2->getVar('ba_auth_id')]; |
|
| 106 | $tblJoin[] = $auteur->getVar('auth_firstname') . ' ' . $auteur->getVar('auth_name'); |
|
| 107 | } |
|
| 108 | if (count($tblJoin) > 0) { |
|
| 109 | $tblTmp['book_joined_authors'] = implode(', ', $tblJoin); |
|
| 110 | } |
|
| 111 | $tblTmp['book_price_ttc'] = sprintf('%0.' . bookshop_getmoduleoption('decimals_count') . 'f', $itemCaddy->getVar('caddy_price')); |
|
| 112 | $tblTmp['book_shipping_amount'] = sprintf('%0.' . bookshop_getmoduleoption('decimals_count') . 'f', $itemCaddy->getVar('caddy_shipping')); |
|
| 113 | $tblTmp['book_qty'] = $itemCaddy->getVar('caddy_qte'); |
|
| 114 | $xoopsTpl->append('books', $tblTmp); |
|
| 115 | } |
|
| 116 | ||
| 117 | $xoopsTpl->assign('commandAmountTTC', sprintf('%0.' . $dec . 'f', $commande->getVar('cmd_total'))); // Tax amount of the order |
|
| 118 | $xoopsTpl->assign('shippingAmount', sprintf('%0.' . $dec . 'f', $commande->getVar('cmd_shipping'))); // VAT amount of shipping cost |
|