url global substitution

This commit is contained in:
Etienne Roudeix
2013-08-30 14:30:33 +02:00
parent 4ba16dc290
commit 3c71aa613f
15 changed files with 126 additions and 166 deletions

View File

@@ -67,7 +67,7 @@
</form>
{/loop}
<div class="view-shop"><a href="{$INDEX_PAGE}" title="{intl l='View site'}" target="_blank"><i class="icon-white icon-eye-open"></i> {intl l="View shop"}</a></div>
<div class="view-shop"><a href="{navigate to="index"}" title="{intl l='View site'}" target="_blank"><i class="icon-white icon-eye-open"></i> {intl l="View shop"}</a></div>
</div>
</div>

View File

@@ -8,7 +8,7 @@
</ul>
{form name="thelia.cart.add" }
{* We use $INDEX_PAGE as form action to avoid mixing post and get data *}
{* We use {navigate to="index"} as form action to avoid mixing post and get data *}
<form action="{url path="/cart/add" }" method="post" {form_enctype form=$form}>
{*

View File

@@ -22,34 +22,10 @@
{loop name="product" type="product" category="#ID"}
<div style="border: dashed 2px red; padding: 20px; margin: 10px;">
<h3><a name="#REF" href="#URL">PRODUCT #ID : #REF (#LOOP_COUNT / #LOOP_TOTAL)</a></h3>
<h3><a href="#URL">PRODUCT #ID : #REF (#LOOP_COUNT / #LOOP_TOTAL)</a></h3>
<h4>#TITLE</h4>
<p>#DESCRIPTION</p>
{ifloop rel="acc"}
<h5>Accessories</h5>
<ul>
{loop name="acc" type="accessory" product="#ID" order="accessory"}
<li><a href="##REF">#REF</a></li>
{/loop}
</ul>
{/ifloop}
{elseloop rel="acc"}
<h5>No accessory</h5>
{/elseloop}
{ifloop rel="prod_ass_cont"}
<h5>Associated Content</h5>
<ul>
{loop name="prod_ass_cont" type="associated_content" product="#ID" order="associated_content"}
<li>#TITLE</li>
{/loop}
</ul>
{/ifloop}
{elseloop rel="prod_ass_cont"}
<h5>No associated content</h5>
{/elseloop}
{ifloop rel="ft"}
<h5>Features</h5>
<ul>
@@ -67,29 +43,6 @@
{elseloop rel="ft"}
<h5>No feature</h5>
{/elseloop}
<h5>Product sale elements</h5>
{assign var=current_product value=#ID}
{loop name="pse" type="product_sale_elements" product="#ID"}
<div style="border: solid 2px darkorange; padding: 5px; margin: 5px;">
{loop name="combi" type="attribute_combination" product_sale_elements="#ID"}
#ATTRIBUTE_TITLE = #ATTRIBUTE_AVAILABILITY_TITLE<br />
{/loop}
<br />#WEIGHT g
<br /><strong>{if #IS_PROMO == 1} #PROMO_PRICE € (instead of #PRICE) {else} #PRICE € {/if}</strong>
<br /><br />
Add
<select>
{for $will=1 to #QUANTITY}
<option>{$will}</option>
{/for}
</select>
to my cart
</ul>
</div>
{/loop}
</div>
{/loop}
{loop name="catgory1" type="category" parent="#ID"}
@@ -110,75 +63,29 @@
{loop name="product" type="product" category="#ID"}
<div style="border: solid 1px green; padding: 20px; margin: 10px;">
<h3><a name="#REF" href="#URL">PRODUCT #ID : #REF (#LOOP_COUNT / #LOOP_TOTAL)</a></h3>
<h4>#TITLE</h4>
<p>#DESCRIPTION</p>
<div style="border: solid 1px green; padding: 20px; margin: 10px;">
<h3><a href="#URL">PRODUCT #ID : #REF (#LOOP_COUNT / #LOOP_TOTAL)</a></h3>
<h4>#TITLE</h4>
<p>#DESCRIPTION</p>
{ifloop rel="acc"}
<h5>Accessories</h5>
<ul>
{loop name="acc" type="accessory" product="#ID" order="accessory"}
<li><a href="##REF">#REF</a></li>
{/loop}
</ul>
{/ifloop}
{elseloop rel="acc"}
<h5>No accessory</h5>
{/elseloop}
{ifloop rel="prod_ass_cont"}
<h5>Associated Content</h5>
<ul>
{loop name="prod_ass_cont" type="associated_content" product="#ID" order="associated_content"}
<li>#TITLE</li>
{/loop}
</ul>
{/ifloop}
{elseloop rel="prod_ass_cont"}
<h5>No associated content</h5>
{/elseloop}
{ifloop rel="ft"}
<h5>Features</h5>
<ul>
{loop name="ft" type="feature" order="manual" product="#ID"}
<li>
<strong>#TITLE</strong> :
{loop name="ft_v" type="feature_value" product="{$current_product}" feature="#ID"}
#TITLE / #PERSONAL_VALUE
{ifloop rel="ft"}
<h5>Features</h5>
<ul>
{assign var=current_product value=#ID}
{loop name="ft" type="feature" order="manual" product="#ID"}
<li>
<strong>#TITLE</strong> :
{loop name="ft_v" type="feature_value" product="{$current_product}" feature="#ID"}
#TITLE / #PERSONAL_VALUE
{/loop}
</li>
{/loop}
</li>
{/loop}
</ul>
{/ifloop}
{elseloop rel="ft"}
<h5>No feature</h5>
{/elseloop}
<h5>Product sale elements</h5>
{assign var=current_product value=#ID}
{loop name="pse" type="product_sale_elements" product="#ID"}
<div style="border: solid 2px darkorange; padding: 5px; margin: 5px;">
{loop name="combi" type="attribute_combination" product_sale_elements="#ID"}
#ATTRIBUTE_TITLE = #ATTRIBUTE_AVAILABILITY_TITLE<br />
{/loop}
<br />#WEIGHT g
<br /><strong>{if #IS_PROMO == 1} #PROMO_PRICE € (instead of #PRICE) {else} #PRICE € {/if}</strong>
<br /><br />
Add
<select>
{for $will=1 to #QUANTITY}
<option>{$will}</option>
{/for}
</select>
to my cart
</ul>
</div>
{/loop}
</div>
</ul>
{/ifloop}
{elseloop rel="ft"}
<h5>No feature</h5>
{/elseloop}
</div>
{/loop}
</div>
{/loop}

View File

@@ -1,7 +1,7 @@
{include file="includes/header.html"}
{form name="thelia.customer.creation"}
{* We use $INDEX_PAGE as form action to avoid mixing post and get data *}
{* We use {navigate to="index"} as form action to avoid mixing post and get data *}
<form action="{url path="/customer/create" }" method="post" {form_enctype form=$form}>
{*
The two fields below are not par of the form, they are here to defines
@@ -16,7 +16,7 @@
*}
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{$RETURN_TO_URL}" /> {* the url the user is redirected to on login success *}
<input type="hidden" name="{$name}" value="{navigate to="return_to"}" /> {* the url the user is redirected to on login success *}
{/form_field}
{form_field form=$form field='auto_login'}

View File

@@ -3,8 +3,8 @@
<h1>{intl l='Please login'}</h1>
{form name="thelia.customer.login" }
{* We use $INDEX_PAGE as form action to avoid mixing post and get data *}
<form action="{$INDEX_PAGE}" method="post" {form_enctype form=$form}>
{* We use {navigate to="index"} as form action to avoid mixing post and get data *}
<form action="{navigate to="index"}" method="post" {form_enctype form=$form}>
{*
The two fields below are not par of the Login form, they are here to defines
@@ -20,7 +20,7 @@
*}
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{$RETURN_TO_URL}" /> {* the url the user is redirected to on login success *}
<input type="hidden" name="{$name}" value="{navigate to="return_to"}" /> {* the url the user is redirected to on login success *}
{/form_field}
{*