// withdraw empty lines, convert line feeds to \r\n

This commit is contained in:
gRoussac
2013-02-26 10:58:03 +01:00
parent e3a47635aa
commit 8740deeb05
-9
View File
@@ -22,7 +22,6 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
{ldelim} {ldelim}
"products": [ "products": [
{if $products} {if $products}
@@ -47,12 +46,10 @@
"hasAttributes": false, "hasAttributes": false,
{/if} {/if}
"hasCustomizedDatas": {if isset($customizedDatas.$productId.$productAttributeId)}true{else}false{/if}, "hasCustomizedDatas": {if isset($customizedDatas.$productId.$productAttributeId)}true{else}false{/if},
"customizedDatas":[ "customizedDatas":[
{if isset($customizedDatas.$productId.$productAttributeId[$product.id_address_delivery])} {if isset($customizedDatas.$productId.$productAttributeId[$product.id_address_delivery])}
{foreach from=$customizedDatas.$productId.$productAttributeId[$product.id_address_delivery] key='id_customization' item='customization' name='customizedDatas'}{ldelim} {foreach from=$customizedDatas.$productId.$productAttributeId[$product.id_address_delivery] key='id_customization' item='customization' name='customizedDatas'}{ldelim}
{* This empty line was made in purpose (product addition debug), please leave it here *} {* This empty line was made in purpose (product addition debug), please leave it here *}
"customizationId": {$id_customization}, "customizationId": {$id_customization},
"quantity": "{$customization.quantity}", "quantity": "{$customization.quantity}",
"datas": [ "datas": [
@@ -75,12 +72,9 @@
{/foreach} {/foreach}
{/if} {/if}
] ]
{rdelim}{if !$smarty.foreach.products.last},{/if} {rdelim}{if !$smarty.foreach.products.last},{/if}
{/foreach}{/if} {/foreach}{/if}
], ],
"discounts": [ "discounts": [
{if $discounts}{foreach from=$discounts item=discount name='discounts'} {if $discounts}{foreach from=$discounts item=discount name='discounts'}
{ldelim} {ldelim}
@@ -96,7 +90,6 @@
{if !$smarty.foreach.discounts.last},{/if} {if !$smarty.foreach.discounts.last},{/if}
{/foreach}{/if} {/foreach}{/if}
], ],
"shippingCost": "{$shipping_cost|html_entity_decode:2:'UTF-8'}", "shippingCost": "{$shipping_cost|html_entity_decode:2:'UTF-8'}",
"shippingCostFloat": "{$shipping_cost_float|html_entity_decode:2:'UTF-8'}", "shippingCostFloat": "{$shipping_cost_float|html_entity_decode:2:'UTF-8'}",
{if isset($tax_cost)} {if isset($tax_cost)}
@@ -106,7 +99,6 @@
"nbTotalProducts": "{$nb_total_products}", "nbTotalProducts": "{$nb_total_products}",
"total": "{$total|html_entity_decode:2:'UTF-8'}", "total": "{$total|html_entity_decode:2:'UTF-8'}",
"productTotal": "{$product_total|html_entity_decode:2:'UTF-8'}", "productTotal": "{$product_total|html_entity_decode:2:'UTF-8'}",
{if isset($errors) && $errors} {if isset($errors) && $errors}
"hasError" : true, "hasError" : true,
"errors" : [ "errors" : [
@@ -118,5 +110,4 @@
{else} {else}
"hasError" : false "hasError" : false
{/if} {/if}
{rdelim} {rdelim}