Jump to content

[résolu]Création d'une seule page pour résumer le tunnel de commande


elsa

Recommended Posts

Bonjour à tous !!

Voila, j'ai crée une nouvelle page qui reprend les pages "résumé" ( juste le récapitulatif des achats), "adresse" et "frais de port". Le problème, c'est que lorsque je fais suivant pour passer donc au paiement, il y a un message d'erreur
" 01. this address is not in a valid area". Est ce que quelqu'un a déjà réussi à créer cette fameuse page que je souhaite faire ?

Merci d'avance !!

Link to comment
Share on other sites

Malheureusement non, ça ne résout pas mon problème.. car la solution donnée est de mettre le récap des achats sur la page paiement alors que moi je veux créer une page qui récapitule tout:achat, adresse, frais de port.

J'ai trouvé ça dans order.php:

if (!isset($_POST['id_address_delivery']) OR !Address::isCountryActiveById(intval($_POST['id_address_delivery'])))
$errors[] = 'this address is not in a valid area';

J'imagine donc que si j'ai le message "this address is not in a valid area" c'est que l'un des deux cas est vrai...


voici un bout de mon code:

{$HOOK_SHOPPING_CART}
{if ($carrier->id AND !$virtualCart) OR $delivery->id OR $invoice->id}

[removed]
<!--
var addresses = new Array();
{foreach from=$addresses key=k item=address}
addresses[{$address.id_address|intval}] = new Array('{$address.company|addslashes}', '{$address.firstname|addslashes}', '{$address.lastname|addslashes}', '{$address.address1|addslashes}', '{$address.address2|addslashes}', '{$address.postcode|addslashes}', '{$address.city|addslashes}', '{$address.country|addslashes}', '{$address.state|default:''|addslashes}');
{/foreach}
-->
[removed]
[removed][removed]

{capture name=path}{l s='Addresses'}{/capture}


{l s='Addresses'}



{assign var='current_step' value='address'}

<form action="{$base_dir}order.php" method="post">


{l s='Choose a delivery address:'}

{foreach from=$addresses key=k item=address}
id_address_delivery}selected="selected"{/if}>{$address.alias|escape:'htmlall':'UTF-8'}
{/foreach}



<input type="checkbox" name="same" id="addressesAreEquals" value="1">id_address_invoice == $cart->id_address_delivery}checked="checked"{/if} />
{l s='Use the same address for billing.'}


id_address_invoice == $cart->id_address_delivery}style="display: none;"{/if}>
{l s='Choose a billing address:'}

{foreach from=$addresses key=k item=address}
id_address_invoice}selected="selected"{/if}>{$address.alias|escape:'htmlall':'UTF-8'}
{/foreach}



{if $delivery->id}

{/if}
{if $invoice->id}

  • {l s='Your billing address'}






Link to comment
Share on other sites

désolée pour le code.... Je suis nouvelle ...
Il s'agit du code correspondant à la partie adresse de ma page.. je pense que c'est là que le problème se trouve étant donné que l'erreur donne " this address is not in a valid area"

{$HOOK_SHOPPING_CART}
{if ($carrier->id AND !$virtualCart) OR $delivery->id OR $invoice->id}

   var addresses = new Array();
   {foreach from=$addresses key=k item=address}
       addresses[{$address.id_address|intval}] = new Array('{$address.company|addslashes}', '{$address.firstname|addslashes}', '{$address.lastname|addslashes}', '{$address.address1|addslashes}', '{$address.address2|addslashes}', '{$address.postcode|addslashes}', '{$address.city|addslashes}', '{$address.country|addslashes}', '{$address.state|default:''|addslashes}');
   {/foreach}
-->
[removed]
[removed][removed]

{capture name=path}{l s='Addresses'}{/capture}


{l s='Addresses'}

{assign var='current_step' value='address'}

<form action="{$base_dir}order.php" method="post">



{l s='Choose a delivery address:'}

           {foreach from=$addresses key=k item=address}
id_address_delivery}selected="selected"{/if}>{$address.alias|escape:'htmlall':'UTF-8'}
           {/foreach}




           <input type="checkbox" name="same" id="addressesAreEquals" value="1">id_address_invoice == $cart->id_address_delivery}checked="checked"{/if} />
{l s='Use the same address for billing.'}


id_address_invoice == $cart->id_address_delivery}style="display: none;"{/if}>
{l s='Choose a billing address:'}

           {foreach from=$addresses key=k item=address}
id_address_invoice}selected="selected"{/if}>{$address.alias|escape:'htmlall':'UTF-8'}
           {/foreach}



   {if $delivery->id}

{l s='Your delivery address'}






{l s='Update'}

       {/if}
   {if $invoice->id}

{l s='Your billing address'}






{l s='Update'}
{/if}




{l s='Add a new address'}



{l s='If you want to leave us comment about your order, please write it below.'}

<textarea cols="60" rows="3" name="message">{$oldMessage}</textarea></p>



   [removed]
   <!--
       updateAddressesDisplay();
   -->
   [removed]


</form>

Link to comment
Share on other sites

  • 10 months later...

Bonjour elsa,
j'essayes de faire la même chose que toi : regrouper les pages panier, adresse et frais de port en une seule page.
Apparemment, tu as réussi. Moi pas.

Pourrais-tu me dire comment tu t'y es prise? Quels fichiers as-tu modifier exactement ?

Merci

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...