Jump to content

Hide carriers in delivery choice


Serial

Recommended Posts

Hi,

 

I have several shops to which my customer can be delivered his order.

Simply, I created every stores as a carrier.

Now, for not to show 35 differents stores during the choice of the delivery, I have created a first carrier who's name "Retreat in store". Inside, so in my order-carrier.tpl, I created a list which fetches by a request SQL my stores and which show them in this list. All this works perfectly, this is my code here :

 

Order-carrier.tpl

{if $option.unique_carrier}
<!-- Ajout liste déroulante pour sélectionner magasin seulement si Retrait en magasin -->
	{if $carrier.instance->id=="13"}
		<strong>{$carrier.instance->name|escape:'htmlall':'UTF-8'}</strong>
		<br/>{l s='Veuillez choisir le magasin :'} <select name="choix_magasin" id="choixmag">
		<option value="0" select="selected">--</option>
		{foreach $stores as $store}
		    <option value="{$store.id_store}">{$store.city}</option>
		{/foreach}
                </select>
	{/if}
<!-- Jusqu'ici -->

So, how (in my .js I suppose) can I show just the line of the store corresponding to what the user chooses in the list which I have just created before ?

Two small constraints:

I would like as well as tick automatically this store on the left.
Finally, if the customer don't want to be delivered in store, I would like that when he chooses an option other than the "Retreat in store", it's not either all the list of 35 differents carriers.

 

Thanks :)

post-1055497-0-72849400-1439968463_thumb.png

Edited by Serial (see edit history)
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...