Merge branch 'master' into tax
Conflicts: templates/default_save/product.html
This commit is contained in:
@@ -172,7 +172,6 @@ class Coupon extends BaseAction implements EventSubscriberInterface
|
||||
TheliaEvents::COUPON_DISABLE => array("disable", 128),
|
||||
TheliaEvents::COUPON_ENABLE => array("enable", 128),
|
||||
TheliaEvents::COUPON_CONSUME => array("consume", 128),
|
||||
TheliaEvents::COUPON_RULE_CREATE => array("createRule", 128),
|
||||
TheliaEvents::COUPON_RULE_UPDATE => array("updateRule", 128),
|
||||
TheliaEvents::COUPON_RULE_DELETE => array("deleteRule", 128)
|
||||
);
|
||||
|
||||
@@ -95,6 +95,9 @@
|
||||
<route id="admin.coupon.rule.input" path="/admin/coupon/rule/{ruleId}">
|
||||
<default key="_controller">Thelia\Controller\Admin\CouponController::getRuleInputAction</default>
|
||||
</route>
|
||||
<route id="admin.coupon.rule.update" path="/admin/coupon/{couponId}/rule/update/">
|
||||
<default key="_controller">Thelia\Controller\Admin\CouponController::updateRulesAction</default>
|
||||
</route>
|
||||
|
||||
|
||||
|
||||
@@ -189,11 +192,11 @@
|
||||
|
||||
<!-- attribute and feature routes management -->
|
||||
|
||||
<route id="admin.configuration.attribute" path="/admin/configuration/product_attributes">
|
||||
<route id="admin.configuration.product-attribute.default" path="/admin/configuration/product-attributes">
|
||||
<default key="_controller">Thelia\Controller\Admin\AttributeController::defaultAction</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.configuration.attribute.edit" path="/admin/configuration/product_attributes/update">
|
||||
<route id="admin.configuration.product-attribute.edit" path="/admin/configuration/product-attributes/update">
|
||||
<default key="_controller">Thelia\Controller\Admin\AttributeController::updateAction</default>
|
||||
</route>
|
||||
|
||||
|
||||
@@ -203,8 +203,12 @@ abstract class CouponRuleAbstract implements CouponRuleInterface
|
||||
$validator['availableOperators'] = $translatedOperators;
|
||||
$translatedInputs[$key] = $validator;
|
||||
}
|
||||
$validators = array();
|
||||
$validators['inputs'] = $translatedInputs;
|
||||
$validators['setOperators'] = $this->operators;
|
||||
$validators['setValues'] = $this->values;
|
||||
|
||||
return $translatedInputs;
|
||||
return $validators;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -184,8 +184,9 @@ class CouponController extends BaseAdminController
|
||||
);
|
||||
|
||||
/** @var CouponRuleInterface $rule */
|
||||
foreach ($rules as $rule) {
|
||||
foreach ($rules->getRules() as $rule) {
|
||||
$args['rulesObject'][] = array(
|
||||
'serviceId' => $rule->getServiceId(),
|
||||
'name' => $rule->getName(),
|
||||
'tooltip' => $rule->getToolTip(),
|
||||
'validators' => $rule->getValidators()
|
||||
@@ -201,13 +202,18 @@ class CouponController extends BaseAdminController
|
||||
|
||||
$args['availableCoupons'] = $this->getAvailableCoupons();
|
||||
$args['availableRules'] = $this->getAvailableRules();
|
||||
$args['urlAjaxGetRuleInput'] = $this->getRouteFromRouter(
|
||||
'router.admin',
|
||||
$args['urlAjaxGetRuleInput'] = $this->getRoute(
|
||||
'admin.coupon.rule.input',
|
||||
array('ruleId' => 'ruleId'),
|
||||
Router::ABSOLUTE_URL
|
||||
);
|
||||
|
||||
$args['urlAjaxUpdateRules'] = $this->getRoute(
|
||||
'admin.coupon.rule.update',
|
||||
array('couponId' => $couponId),
|
||||
Router::ABSOLUTE_URL
|
||||
);
|
||||
|
||||
$args['formAction'] = 'admin/coupon/update/' . $couponId;
|
||||
|
||||
return $this->render(
|
||||
@@ -288,6 +294,8 @@ class CouponController extends BaseAdminController
|
||||
);
|
||||
}
|
||||
|
||||
// $args['rules'] = $this->cleanRuleForTemplate($coupon->getRules()->getRules());
|
||||
|
||||
// Setup the object form
|
||||
$changeForm = new CouponCreationForm($this->getRequest(), 'form', $data);
|
||||
|
||||
@@ -338,14 +346,16 @@ class CouponController extends BaseAdminController
|
||||
{
|
||||
$this->checkAuth('ADMIN', 'admin.coupon.read');
|
||||
|
||||
if (!$this->getRequest()->isXmlHttpRequest()) {
|
||||
$this->redirect(
|
||||
$this->getRoute(
|
||||
'admin',
|
||||
array(),
|
||||
Router::ABSOLUTE_URL
|
||||
)
|
||||
);
|
||||
if ($this->isDebug()) {
|
||||
if (!$this->getRequest()->isXmlHttpRequest()) {
|
||||
$this->redirect(
|
||||
$this->getRoute(
|
||||
'admin',
|
||||
array(),
|
||||
Router::ABSOLUTE_URL
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/** @var ConstraintFactory $constraintFactory */
|
||||
@@ -365,6 +375,102 @@ class CouponController extends BaseAdminController
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Manage Coupons read display
|
||||
*
|
||||
* @param int $couponId Coupon id
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function updateRulesAction($couponId)
|
||||
{
|
||||
$this->checkAuth('ADMIN', 'admin.coupon.read');
|
||||
|
||||
if ($this->isDebug()) {
|
||||
if (!$this->getRequest()->isXmlHttpRequest()) {
|
||||
$this->redirect(
|
||||
$this->getRoute(
|
||||
'admin',
|
||||
array(),
|
||||
Router::ABSOLUTE_URL
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$search = CouponQuery::create();
|
||||
/** @var Coupon $coupon */
|
||||
$coupon = $search->findOneById($couponId);
|
||||
|
||||
if (!$coupon) {
|
||||
return $this->pageNotFound();
|
||||
}
|
||||
|
||||
$rules = new CouponRuleCollection();
|
||||
|
||||
/** @var ConstraintFactory $constraintFactory */
|
||||
$constraintFactory = $this->container->get('thelia.constraint.factory');
|
||||
$rulesReceived = json_decode($this->getRequest()->get('rules'));
|
||||
foreach ($rulesReceived as $ruleReceived) {
|
||||
var_dump('building ', $ruleReceived->values);
|
||||
$rule = $constraintFactory->build(
|
||||
$ruleReceived->serviceId,
|
||||
(array) $ruleReceived->operators,
|
||||
(array) $ruleReceived->values
|
||||
);
|
||||
$rules->add(clone $rule);
|
||||
}
|
||||
|
||||
$coupon->setSerializedRules(
|
||||
$constraintFactory->serializeCouponRuleCollection($rules)
|
||||
);
|
||||
|
||||
$couponEvent = new CouponCreateOrUpdateEvent(
|
||||
$coupon->getCode(),
|
||||
$coupon->getTitle(),
|
||||
$coupon->getAmount(),
|
||||
$coupon->getType(),
|
||||
$coupon->getShortDescription(),
|
||||
$coupon->getDescription(),
|
||||
$coupon->getIsEnabled(),
|
||||
$coupon->getExpirationDate(),
|
||||
$coupon->getIsAvailableOnSpecialOffers(),
|
||||
$coupon->getIsCumulative(),
|
||||
$coupon->getIsRemovingPostage(),
|
||||
$coupon->getMaxUsage(),
|
||||
$rules,
|
||||
$coupon->getLocale()
|
||||
);
|
||||
|
||||
$eventToDispatch = TheliaEvents::COUPON_RULE_UPDATE;
|
||||
// Dispatch Event to the Action
|
||||
$this->dispatch(
|
||||
$eventToDispatch,
|
||||
$couponEvent
|
||||
);
|
||||
|
||||
$this->adminLogAppend(
|
||||
sprintf(
|
||||
'Coupon %s (ID %s) rules updated',
|
||||
$couponEvent->getTitle(),
|
||||
$couponEvent->getCoupon()->getId()
|
||||
)
|
||||
);
|
||||
|
||||
$cleanedRules = $this->cleanRuleForTemplate($rules);
|
||||
|
||||
return $this->render(
|
||||
'coupon/rules',
|
||||
array(
|
||||
'couponId' => $couponId,
|
||||
'rules' => $cleanedRules,
|
||||
'urlEdit' => $couponId,
|
||||
'urlDelete' => $couponId
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a Coupon from its form
|
||||
*
|
||||
@@ -554,6 +660,21 @@ class CouponController extends BaseAdminController
|
||||
return $cleanedRules;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $rules
|
||||
* @return array
|
||||
*/
|
||||
protected function cleanRuleForTemplate($rules)
|
||||
{
|
||||
$cleanedRules = array();
|
||||
/** @var $rule CouponRuleInterface */
|
||||
foreach ($rules->getRules() as $rule) {
|
||||
$cleanedRules[] = $rule->getToolTip();
|
||||
}
|
||||
|
||||
return $cleanedRules;
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Validation Rule creation
|
||||
// *
|
||||
|
||||
@@ -258,4 +258,14 @@ class BaseController extends ContainerAware
|
||||
{
|
||||
throw new NotFoundHttpException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if environment is in debug mode
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function isDebug()
|
||||
{
|
||||
return $this->container->getParameter('kernel.debug');
|
||||
}
|
||||
}
|
||||
@@ -281,22 +281,6 @@ final class TheliaEvents
|
||||
*/
|
||||
const AFTER_CONSUME_COUPON = "action.after_consume_coupon";
|
||||
|
||||
|
||||
/**
|
||||
* Sent when attempting to create Coupon Rule
|
||||
*/
|
||||
const COUPON_RULE_CREATE = "action.create_coupon_rule";
|
||||
|
||||
/**
|
||||
* Sent just before an attempt to create a Coupon Rule
|
||||
*/
|
||||
const BEFORE_COUPON_RULE_CREATE = "action.before_create_coupon_rule";
|
||||
|
||||
/**
|
||||
* Sent just after an attempt to create a Coupon Rule
|
||||
*/
|
||||
const AFTER_COUPON_RULE_CREATE = "action.after_create_coupon_rule";
|
||||
|
||||
/**
|
||||
* Sent when attempting to update Coupon Rule
|
||||
*/
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
namespace Thelia\Core\Template\Loop;
|
||||
|
||||
use Propel\Runtime\ActiveQuery\Criteria;
|
||||
use Thelia\Constraint\ConstraintFactory;
|
||||
use Thelia\Constraint\Rule\CouponRuleInterface;
|
||||
use Thelia\Core\HttpFoundation\Request;
|
||||
use Thelia\Core\Template\Element\BaseI18nLoop;
|
||||
use Thelia\Core\Template\Element\LoopResult;
|
||||
use Thelia\Core\Template\Element\LoopResultRow;
|
||||
@@ -84,10 +87,27 @@ class Coupon extends BaseI18nLoop
|
||||
$coupons = $this->search($search, $pagination);
|
||||
|
||||
$loopResult = new LoopResult();
|
||||
/** @var ConstraintFactory $constraintFactory */
|
||||
$constraintFactory = $this->container->get('thelia.constraint.factory');
|
||||
|
||||
/** @var Request $request */
|
||||
$request = $this->container->get('request');
|
||||
/** @var Lang $lang */
|
||||
$lang = $request->getSession()->getLang();
|
||||
|
||||
|
||||
/** @var MCoupon $coupon */
|
||||
foreach ($coupons as $coupon) {
|
||||
$loopResultRow = new LoopResultRow();
|
||||
$rules = $constraintFactory->unserializeCouponRuleCollection(
|
||||
$coupon->getSerializedRules()
|
||||
);
|
||||
|
||||
$cleanedRules = array();
|
||||
/** @var CouponRuleInterface $rule */
|
||||
foreach ($rules->getRules() as $key => $rule) {
|
||||
$cleanedRules[] = $rule->getToolTip();
|
||||
}
|
||||
$loopResultRow->set("ID", $coupon->getId())
|
||||
->set("IS_TRANSLATED", $coupon->getVirtualColumn('IS_TRANSLATED'))
|
||||
->set("LOCALE", $locale)
|
||||
@@ -95,13 +115,13 @@ class Coupon extends BaseI18nLoop
|
||||
->set("TITLE", $coupon->getVirtualColumn('i18n_TITLE'))
|
||||
->set("SHORT_DESCRIPTION", $coupon->getVirtualColumn('i18n_SHORT_DESCRIPTION'))
|
||||
->set("DESCRIPTION", $coupon->getVirtualColumn('i18n_DESCRIPTION'))
|
||||
->set("EXPIRATION_DATE", $coupon->getExpirationDate())
|
||||
->set("EXPIRATION_DATE", $coupon->getExpirationDate($lang->getDateFormat()))
|
||||
->set("USAGE_LEFT", $coupon->getMaxUsage())
|
||||
->set("IS_CUMULATIVE", $coupon->getIsCumulative())
|
||||
->set("IS_REMOVING_POSTAGE", $coupon->getIsRemovingPostage())
|
||||
->set("IS_ENABLED", $coupon->getIsEnabled())
|
||||
->set("AMOUNT", $coupon->getAmount())
|
||||
->set("APPLICATION_CONDITIONS", $coupon->getRules());
|
||||
->set("APPLICATION_CONDITIONS", $cleanedRules);
|
||||
$loopResult->addRow($loopResultRow);
|
||||
}
|
||||
|
||||
|
||||
@@ -82,19 +82,10 @@ class SmartyParser extends Smarty implements ParserInterface
|
||||
// The default HTTP status
|
||||
$this->status = 200;
|
||||
|
||||
$this->registerFilter('pre', array($this, "preThelia"));
|
||||
$this->registerFilter('output', array($this, "removeBlankLines"));
|
||||
$this->registerFilter('variable', array(__CLASS__, "theliaEscape"));
|
||||
}
|
||||
|
||||
public function preThelia($tpl_source, \Smarty_Internal_Template $template)
|
||||
{
|
||||
$new_source = preg_replace('`{#([a-zA-Z][a-zA-Z0-9_]*)(.*)}`', '{\$$1$2}', $tpl_source);
|
||||
$new_source = preg_replace('`#([a-zA-Z][a-zA-Z0-9_]*)`', '{\$$1|dieseCanceller:\'#$1\'}', $new_source);
|
||||
|
||||
return $new_source;
|
||||
}
|
||||
|
||||
|
||||
public function removeBlankLines($tpl_source, \Smarty_Internal_Template $template)
|
||||
{
|
||||
return preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $tpl_source);
|
||||
@@ -102,7 +93,7 @@ class SmartyParser extends Smarty implements ParserInterface
|
||||
|
||||
public static function theliaEscape($content, $smarty)
|
||||
{
|
||||
if(!is_object($content)) {
|
||||
if(is_scalar($content)) {
|
||||
return htmlspecialchars($content ,ENT_QUOTES, Smarty::$_CHARSET);
|
||||
} else {
|
||||
return $content;
|
||||
|
||||
@@ -26,6 +26,7 @@ use Symfony\Component\Validator\Constraints;
|
||||
use Symfony\Component\Validator\ExecutionContextInterface;
|
||||
use Thelia\Model\ConfigQuery;
|
||||
use Thelia\Model\CustomerQuery;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
|
||||
/**
|
||||
* Class CustomerCreation
|
||||
@@ -43,55 +44,94 @@ class CustomerCreation extends BaseForm
|
||||
"constraints" => array(
|
||||
new Constraints\NotBlank()
|
||||
),
|
||||
"label" => "firstname"
|
||||
"label" => Translator::getInstance()->trans("First Name"),
|
||||
"label_attr" => array(
|
||||
"for" => "firstname"
|
||||
)
|
||||
))
|
||||
->add("lastname", "text", array(
|
||||
"constraints" => array(
|
||||
new Constraints\NotBlank()
|
||||
),
|
||||
"label" => "lastname"
|
||||
"label" => Translator::getInstance()->trans("Last Name"),
|
||||
"label_attr" => array(
|
||||
"for" => "lastname"
|
||||
)
|
||||
))
|
||||
->add("address1", "text", array(
|
||||
"constraints" => array(
|
||||
new Constraints\NotBlank()
|
||||
),
|
||||
"label" => "address"
|
||||
"label_attr" => array(
|
||||
"for" => "address"
|
||||
),
|
||||
"label" => Translator::getInstance()->trans("Street Address")
|
||||
))
|
||||
->add("address2", "text", array(
|
||||
"label" => "Address Line 2"
|
||||
"label" => Translator::getInstance()->trans("Address Line 2"),
|
||||
"label_attr" => array(
|
||||
"for" => "address2"
|
||||
)
|
||||
))
|
||||
->add("address3", "text", array(
|
||||
"label" => "Address Line 3"
|
||||
"label" => Translator::getInstance()->trans("Address Line 3"),
|
||||
"label_attr" => array(
|
||||
"for" => "address3"
|
||||
)
|
||||
))
|
||||
->add("company", "text", array(
|
||||
"label" => Translator::getInstance()->trans("Company name"),
|
||||
"label_attr" => array(
|
||||
"for" => "company"
|
||||
)
|
||||
))
|
||||
->add("phone", "text", array(
|
||||
"label" => "phone"
|
||||
"label" => Translator::getInstance()->trans("Phone"),
|
||||
"label_attr" => array(
|
||||
"for" => "phone"
|
||||
)
|
||||
))
|
||||
->add("cellphone", "text", array(
|
||||
"label" => "cellphone"
|
||||
"label" => Translator::getInstance()->trans("Cellphone"),
|
||||
"label_attr" => array(
|
||||
"for" => "cellphone"
|
||||
)
|
||||
))
|
||||
->add("zipcode", "text", array(
|
||||
"constraints" => array(
|
||||
new Constraints\NotBlank()
|
||||
),
|
||||
"label" => "zipcode"
|
||||
"label" => Translator::getInstance()->trans("Zip code"),
|
||||
"label_attr" => array(
|
||||
"for" => "zipcode"
|
||||
)
|
||||
))
|
||||
->add("city", "text", array(
|
||||
"constraints" => array(
|
||||
new Constraints\NotBlank()
|
||||
),
|
||||
"label" => "city"
|
||||
"label" => Translator::getInstance()->trans("City"),
|
||||
"label_attr" => array(
|
||||
"for" => "city"
|
||||
)
|
||||
))
|
||||
->add("country", "text", array(
|
||||
"constraints" => array(
|
||||
new Constraints\NotBlank()
|
||||
),
|
||||
"label" => "country"
|
||||
"label" => Translator::getInstance()->trans("Country"),
|
||||
"label_attr" => array(
|
||||
"for" => "country"
|
||||
)
|
||||
))
|
||||
->add("title", "text", array(
|
||||
"constraints" => array(
|
||||
new Constraints\NotBlank()
|
||||
),
|
||||
"label" => "title"
|
||||
"label" => Translator::getInstance()->trans("Title"),
|
||||
"label_attr" => array(
|
||||
"for" => "title"
|
||||
)
|
||||
))
|
||||
->add("email", "email", array(
|
||||
"constraints" => array(
|
||||
@@ -104,9 +144,12 @@ class CustomerCreation extends BaseForm
|
||||
)
|
||||
))
|
||||
),
|
||||
"label" => "email"
|
||||
"label" => Translator::getInstance()->trans("Email Address"),
|
||||
"label_attr" => array(
|
||||
"for" => "email"
|
||||
)
|
||||
))
|
||||
->add("email_confirm", "email", array(
|
||||
/* ->add("email_confirm", "email", array(
|
||||
"constraints" => array(
|
||||
new Constraints\Callback(array(
|
||||
"methods" => array(
|
||||
@@ -116,13 +159,16 @@ class CustomerCreation extends BaseForm
|
||||
))
|
||||
),
|
||||
"label" => "email confirmation"
|
||||
))
|
||||
))*/
|
||||
->add("password", "password", array(
|
||||
"constraints" => array(
|
||||
new Constraints\NotBlank(),
|
||||
new Constraints\Length(array("min" => ConfigQuery::read("password.length", 4)))
|
||||
),
|
||||
"label" => "password"
|
||||
"label" => Translator::getInstance()->trans("Password"),
|
||||
"label_attr" => array(
|
||||
"for" => "password"
|
||||
)
|
||||
))
|
||||
->add("password_confirm", "password", array(
|
||||
"constraints" => array(
|
||||
@@ -132,7 +178,10 @@ class CustomerCreation extends BaseForm
|
||||
array($this, "verifyPasswordField")
|
||||
)))
|
||||
),
|
||||
"label" => "password confirmation"
|
||||
"label" => "Password confirmation",
|
||||
"label_attr" => array(
|
||||
"for" => "password_confirmation"
|
||||
)
|
||||
))
|
||||
|
||||
;
|
||||
|
||||
@@ -3,7 +3,6 @@ A faire dans la procédure d'install
|
||||
|
||||
Variables Config à initialiser:
|
||||
|
||||
- base_url : url de base de la boutique avec / final (ex. http://www.boutique.com/, ou http://www.boutique.com/path/to/thelia2/ )
|
||||
- base_admin_template : chemin du template admin relatif au repertoire template (ex. admin/default)
|
||||
- default_locale : la locale par défaut (ex. en_US), à utiliser pour les fichiers de traduction
|
||||
- asset_dir_from_web_root : le chemin relatif à /web du repertoires des assets (ex. assets)
|
||||
|
||||
@@ -556,6 +556,7 @@ Sed facilisis pellentesque nisl, eu tincidunt erat scelerisque a. Nullam malesua
|
||||
$serializedRules = $constraintFactory->serializeCouponRuleCollection($rules);
|
||||
$coupon1->setSerializedRules($serializedRules);
|
||||
|
||||
$coupon1->setMaxUsage(40);
|
||||
$coupon1->setIsCumulative(1);
|
||||
$coupon1->setIsRemovingPostage(0);
|
||||
$coupon1->save();
|
||||
@@ -606,6 +607,7 @@ Sed facilisis pellentesque nisl, eu tincidunt erat scelerisque a. Nullam malesua
|
||||
$serializedRules = $constraintFactory->serializeCouponRuleCollection($rules);
|
||||
$coupon2->setSerializedRules($serializedRules);
|
||||
|
||||
$coupon1->setMaxUsage(-1);
|
||||
$coupon2->setIsCumulative(0);
|
||||
$coupon2->setIsRemovingPostage(1);
|
||||
$coupon2->save();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,10 +14,10 @@ if exist local\config\database.yml (
|
||||
..\..\bin\propel build -v --output-dir=../../core/lib/
|
||||
|
||||
echo [INFO] Building SQL CREATE file
|
||||
..\..\bin\propel sql:build -v --output-dir=../../install/
|
||||
..\..\bin\propel sql:build -v --output-dir=..\..\install
|
||||
|
||||
|
||||
echo [INFO] Reloaded Thelia2 database
|
||||
echo [INFO] Reloading Thelia2 database
|
||||
cd ..\..
|
||||
del install\sqldb.map
|
||||
php Thelia thelia:dev:reloadDB
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
{* Modules css are included here *}
|
||||
|
||||
{module_include location='head_css'}
|
||||
|
||||
{debugbar_renderHead}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -223,9 +225,10 @@
|
||||
|
||||
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
|
||||
|
||||
{block name="after-javascript-include"}{/block}
|
||||
{block name="after-javascript-include"}{/block}
|
||||
|
||||
{block name="javascript-initialization"}{/block}
|
||||
|
||||
{debugbar_render}
|
||||
{* Modules scripts are included now *}
|
||||
{module_include location='footer_js'}
|
||||
|
||||
486
templates/admin/default/assets/js/json2.js
Normal file
486
templates/admin/default/assets/js/json2.js
Normal file
@@ -0,0 +1,486 @@
|
||||
/*
|
||||
json2.js
|
||||
2013-05-26
|
||||
|
||||
Public Domain.
|
||||
|
||||
NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
|
||||
|
||||
See http://www.JSON.org/js.html
|
||||
|
||||
|
||||
This code should be minified before deployment.
|
||||
See http://javascript.crockford.com/jsmin.html
|
||||
|
||||
USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
|
||||
NOT CONTROL.
|
||||
|
||||
|
||||
This file creates a global JSON object containing two methods: stringify
|
||||
and parse.
|
||||
|
||||
JSON.stringify(value, replacer, space)
|
||||
value any JavaScript value, usually an object or array.
|
||||
|
||||
replacer an optional parameter that determines how object
|
||||
values are stringified for objects. It can be a
|
||||
function or an array of strings.
|
||||
|
||||
space an optional parameter that specifies the indentation
|
||||
of nested structures. If it is omitted, the text will
|
||||
be packed without extra whitespace. If it is a number,
|
||||
it will specify the number of spaces to indent at each
|
||||
level. If it is a string (such as '\t' or ' '),
|
||||
it contains the characters used to indent at each level.
|
||||
|
||||
This method produces a JSON text from a JavaScript value.
|
||||
|
||||
When an object value is found, if the object contains a toJSON
|
||||
method, its toJSON method will be called and the result will be
|
||||
stringified. A toJSON method does not serialize: it returns the
|
||||
value represented by the name/value pair that should be serialized,
|
||||
or undefined if nothing should be serialized. The toJSON method
|
||||
will be passed the key associated with the value, and this will be
|
||||
bound to the value
|
||||
|
||||
For example, this would serialize Dates as ISO strings.
|
||||
|
||||
Date.prototype.toJSON = function (key) {
|
||||
function f(n) {
|
||||
// Format integers to have at least two digits.
|
||||
return n < 10 ? '0' + n : n;
|
||||
}
|
||||
|
||||
return this.getUTCFullYear() + '-' +
|
||||
f(this.getUTCMonth() + 1) + '-' +
|
||||
f(this.getUTCDate()) + 'T' +
|
||||
f(this.getUTCHours()) + ':' +
|
||||
f(this.getUTCMinutes()) + ':' +
|
||||
f(this.getUTCSeconds()) + 'Z';
|
||||
};
|
||||
|
||||
You can provide an optional replacer method. It will be passed the
|
||||
key and value of each member, with this bound to the containing
|
||||
object. The value that is returned from your method will be
|
||||
serialized. If your method returns undefined, then the member will
|
||||
be excluded from the serialization.
|
||||
|
||||
If the replacer parameter is an array of strings, then it will be
|
||||
used to select the members to be serialized. It filters the results
|
||||
such that only members with keys listed in the replacer array are
|
||||
stringified.
|
||||
|
||||
Values that do not have JSON representations, such as undefined or
|
||||
functions, will not be serialized. Such values in objects will be
|
||||
dropped; in arrays they will be replaced with null. You can use
|
||||
a replacer function to replace those with JSON values.
|
||||
JSON.stringify(undefined) returns undefined.
|
||||
|
||||
The optional space parameter produces a stringification of the
|
||||
value that is filled with line breaks and indentation to make it
|
||||
easier to read.
|
||||
|
||||
If the space parameter is a non-empty string, then that string will
|
||||
be used for indentation. If the space parameter is a number, then
|
||||
the indentation will be that many spaces.
|
||||
|
||||
Example:
|
||||
|
||||
text = JSON.stringify(['e', {pluribus: 'unum'}]);
|
||||
// text is '["e",{"pluribus":"unum"}]'
|
||||
|
||||
|
||||
text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
|
||||
// text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
|
||||
|
||||
text = JSON.stringify([new Date()], function (key, value) {
|
||||
return this[key] instanceof Date ?
|
||||
'Date(' + this[key] + ')' : value;
|
||||
});
|
||||
// text is '["Date(---current time---)"]'
|
||||
|
||||
|
||||
JSON.parse(text, reviver)
|
||||
This method parses a JSON text to produce an object or array.
|
||||
It can throw a SyntaxError exception.
|
||||
|
||||
The optional reviver parameter is a function that can filter and
|
||||
transform the results. It receives each of the keys and values,
|
||||
and its return value is used instead of the original value.
|
||||
If it returns what it received, then the structure is not modified.
|
||||
If it returns undefined then the member is deleted.
|
||||
|
||||
Example:
|
||||
|
||||
// Parse the text. Values that look like ISO date strings will
|
||||
// be converted to Date objects.
|
||||
|
||||
myData = JSON.parse(text, function (key, value) {
|
||||
var a;
|
||||
if (typeof value === 'string') {
|
||||
a =
|
||||
/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
|
||||
if (a) {
|
||||
return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
|
||||
+a[5], +a[6]));
|
||||
}
|
||||
}
|
||||
return value;
|
||||
});
|
||||
|
||||
myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
|
||||
var d;
|
||||
if (typeof value === 'string' &&
|
||||
value.slice(0, 5) === 'Date(' &&
|
||||
value.slice(-1) === ')') {
|
||||
d = new Date(value.slice(5, -1));
|
||||
if (d) {
|
||||
return d;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
});
|
||||
|
||||
|
||||
This is a reference implementation. You are free to copy, modify, or
|
||||
redistribute.
|
||||
*/
|
||||
|
||||
/*jslint evil: true, regexp: true */
|
||||
|
||||
/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
|
||||
call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
|
||||
getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
|
||||
lastIndex, length, parse, prototype, push, replace, slice, stringify,
|
||||
test, toJSON, toString, valueOf
|
||||
*/
|
||||
|
||||
|
||||
// Create a JSON object only if one does not already exist. We create the
|
||||
// methods in a closure to avoid creating global variables.
|
||||
|
||||
if (typeof JSON !== 'object') {
|
||||
JSON = {};
|
||||
}
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
function f(n) {
|
||||
// Format integers to have at least two digits.
|
||||
return n < 10 ? '0' + n : n;
|
||||
}
|
||||
|
||||
if (typeof Date.prototype.toJSON !== 'function') {
|
||||
|
||||
Date.prototype.toJSON = function () {
|
||||
|
||||
return isFinite(this.valueOf())
|
||||
? this.getUTCFullYear() + '-' +
|
||||
f(this.getUTCMonth() + 1) + '-' +
|
||||
f(this.getUTCDate()) + 'T' +
|
||||
f(this.getUTCHours()) + ':' +
|
||||
f(this.getUTCMinutes()) + ':' +
|
||||
f(this.getUTCSeconds()) + 'Z'
|
||||
: null;
|
||||
};
|
||||
|
||||
String.prototype.toJSON =
|
||||
Number.prototype.toJSON =
|
||||
Boolean.prototype.toJSON = function () {
|
||||
return this.valueOf();
|
||||
};
|
||||
}
|
||||
|
||||
var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
|
||||
escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
|
||||
gap,
|
||||
indent,
|
||||
meta = { // table of character substitutions
|
||||
'\b': '\\b',
|
||||
'\t': '\\t',
|
||||
'\n': '\\n',
|
||||
'\f': '\\f',
|
||||
'\r': '\\r',
|
||||
'"' : '\\"',
|
||||
'\\': '\\\\'
|
||||
},
|
||||
rep;
|
||||
|
||||
|
||||
function quote(string) {
|
||||
|
||||
// If the string contains no control characters, no quote characters, and no
|
||||
// backslash characters, then we can safely slap some quotes around it.
|
||||
// Otherwise we must also replace the offending characters with safe escape
|
||||
// sequences.
|
||||
|
||||
escapable.lastIndex = 0;
|
||||
return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
|
||||
var c = meta[a];
|
||||
return typeof c === 'string'
|
||||
? c
|
||||
: '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
|
||||
}) + '"' : '"' + string + '"';
|
||||
}
|
||||
|
||||
|
||||
function str(key, holder) {
|
||||
|
||||
// Produce a string from holder[key].
|
||||
|
||||
var i, // The loop counter.
|
||||
k, // The member key.
|
||||
v, // The member value.
|
||||
length,
|
||||
mind = gap,
|
||||
partial,
|
||||
value = holder[key];
|
||||
|
||||
// If the value has a toJSON method, call it to obtain a replacement value.
|
||||
|
||||
if (value && typeof value === 'object' &&
|
||||
typeof value.toJSON === 'function') {
|
||||
value = value.toJSON(key);
|
||||
}
|
||||
|
||||
// If we were called with a replacer function, then call the replacer to
|
||||
// obtain a replacement value.
|
||||
|
||||
if (typeof rep === 'function') {
|
||||
value = rep.call(holder, key, value);
|
||||
}
|
||||
|
||||
// What happens next depends on the value's type.
|
||||
|
||||
switch (typeof value) {
|
||||
case 'string':
|
||||
return quote(value);
|
||||
|
||||
case 'number':
|
||||
|
||||
// JSON numbers must be finite. Encode non-finite numbers as null.
|
||||
|
||||
return isFinite(value) ? String(value) : 'null';
|
||||
|
||||
case 'boolean':
|
||||
case 'null':
|
||||
|
||||
// If the value is a boolean or null, convert it to a string. Note:
|
||||
// typeof null does not produce 'null'. The case is included here in
|
||||
// the remote chance that this gets fixed someday.
|
||||
|
||||
return String(value);
|
||||
|
||||
// If the type is 'object', we might be dealing with an object or an array or
|
||||
// null.
|
||||
|
||||
case 'object':
|
||||
|
||||
// Due to a specification blunder in ECMAScript, typeof null is 'object',
|
||||
// so watch out for that case.
|
||||
|
||||
if (!value) {
|
||||
return 'null';
|
||||
}
|
||||
|
||||
// Make an array to hold the partial results of stringifying this object value.
|
||||
|
||||
gap += indent;
|
||||
partial = [];
|
||||
|
||||
// Is the value an array?
|
||||
|
||||
if (Object.prototype.toString.apply(value) === '[object Array]') {
|
||||
|
||||
// The value is an array. Stringify every element. Use null as a placeholder
|
||||
// for non-JSON values.
|
||||
|
||||
length = value.length;
|
||||
for (i = 0; i < length; i += 1) {
|
||||
partial[i] = str(i, value) || 'null';
|
||||
}
|
||||
|
||||
// Join all of the elements together, separated with commas, and wrap them in
|
||||
// brackets.
|
||||
|
||||
v = partial.length === 0
|
||||
? '[]'
|
||||
: gap
|
||||
? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']'
|
||||
: '[' + partial.join(',') + ']';
|
||||
gap = mind;
|
||||
return v;
|
||||
}
|
||||
|
||||
// If the replacer is an array, use it to select the members to be stringified.
|
||||
|
||||
if (rep && typeof rep === 'object') {
|
||||
length = rep.length;
|
||||
for (i = 0; i < length; i += 1) {
|
||||
if (typeof rep[i] === 'string') {
|
||||
k = rep[i];
|
||||
v = str(k, value);
|
||||
if (v) {
|
||||
partial.push(quote(k) + (gap ? ': ' : ':') + v);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
// Otherwise, iterate through all of the keys in the object.
|
||||
|
||||
for (k in value) {
|
||||
if (Object.prototype.hasOwnProperty.call(value, k)) {
|
||||
v = str(k, value);
|
||||
if (v) {
|
||||
partial.push(quote(k) + (gap ? ': ' : ':') + v);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Join all of the member texts together, separated with commas,
|
||||
// and wrap them in braces.
|
||||
|
||||
v = partial.length === 0
|
||||
? '{}'
|
||||
: gap
|
||||
? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}'
|
||||
: '{' + partial.join(',') + '}';
|
||||
gap = mind;
|
||||
return v;
|
||||
}
|
||||
}
|
||||
|
||||
// If the JSON object does not yet have a stringify method, give it one.
|
||||
|
||||
if (typeof JSON.stringify !== 'function') {
|
||||
JSON.stringify = function (value, replacer, space) {
|
||||
|
||||
// The stringify method takes a value and an optional replacer, and an optional
|
||||
// space parameter, and returns a JSON text. The replacer can be a function
|
||||
// that can replace values, or an array of strings that will select the keys.
|
||||
// A default replacer method can be provided. Use of the space parameter can
|
||||
// produce text that is more easily readable.
|
||||
|
||||
var i;
|
||||
gap = '';
|
||||
indent = '';
|
||||
|
||||
// If the space parameter is a number, make an indent string containing that
|
||||
// many spaces.
|
||||
|
||||
if (typeof space === 'number') {
|
||||
for (i = 0; i < space; i += 1) {
|
||||
indent += ' ';
|
||||
}
|
||||
|
||||
// If the space parameter is a string, it will be used as the indent string.
|
||||
|
||||
} else if (typeof space === 'string') {
|
||||
indent = space;
|
||||
}
|
||||
|
||||
// If there is a replacer, it must be a function or an array.
|
||||
// Otherwise, throw an error.
|
||||
|
||||
rep = replacer;
|
||||
if (replacer && typeof replacer !== 'function' &&
|
||||
(typeof replacer !== 'object' ||
|
||||
typeof replacer.length !== 'number')) {
|
||||
throw new Error('JSON.stringify');
|
||||
}
|
||||
|
||||
// Make a fake root object containing our value under the key of ''.
|
||||
// Return the result of stringifying the value.
|
||||
|
||||
return str('', {'': value});
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
// If the JSON object does not yet have a parse method, give it one.
|
||||
|
||||
if (typeof JSON.parse !== 'function') {
|
||||
JSON.parse = function (text, reviver) {
|
||||
|
||||
// The parse method takes a text and an optional reviver function, and returns
|
||||
// a JavaScript value if the text is a valid JSON text.
|
||||
|
||||
var j;
|
||||
|
||||
function walk(holder, key) {
|
||||
|
||||
// The walk method is used to recursively walk the resulting structure so
|
||||
// that modifications can be made.
|
||||
|
||||
var k, v, value = holder[key];
|
||||
if (value && typeof value === 'object') {
|
||||
for (k in value) {
|
||||
if (Object.prototype.hasOwnProperty.call(value, k)) {
|
||||
v = walk(value, k);
|
||||
if (v !== undefined) {
|
||||
value[k] = v;
|
||||
} else {
|
||||
delete value[k];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return reviver.call(holder, key, value);
|
||||
}
|
||||
|
||||
|
||||
// Parsing happens in four stages. In the first stage, we replace certain
|
||||
// Unicode characters with escape sequences. JavaScript handles many characters
|
||||
// incorrectly, either silently deleting them, or treating them as line endings.
|
||||
|
||||
text = String(text);
|
||||
cx.lastIndex = 0;
|
||||
if (cx.test(text)) {
|
||||
text = text.replace(cx, function (a) {
|
||||
return '\\u' +
|
||||
('0000' + a.charCodeAt(0).toString(16)).slice(-4);
|
||||
});
|
||||
}
|
||||
|
||||
// In the second stage, we run the text against regular expressions that look
|
||||
// for non-JSON patterns. We are especially concerned with '()' and 'new'
|
||||
// because they can cause invocation, and '=' because it can cause mutation.
|
||||
// But just to be safe, we want to reject all unexpected forms.
|
||||
|
||||
// We split the second stage into 4 regexp operations in order to work around
|
||||
// crippling inefficiencies in IE's and Safari's regexp engines. First we
|
||||
// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
|
||||
// replace all simple value tokens with ']' characters. Third, we delete all
|
||||
// open brackets that follow a colon or comma or that begin the text. Finally,
|
||||
// we look to see that the remaining characters are only whitespace or ']' or
|
||||
// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
|
||||
|
||||
if (/^[\],:{}\s]*$/
|
||||
.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
|
||||
.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
|
||||
.replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
|
||||
|
||||
// In the third stage we use the eval function to compile the text into a
|
||||
// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
|
||||
// in JavaScript: it can begin a block or an object literal. We wrap the text
|
||||
// in parens to eliminate the ambiguity.
|
||||
|
||||
j = eval('(' + text + ')');
|
||||
|
||||
// In the optional fourth stage, we recursively walk the new structure, passing
|
||||
// each name/value pair to a reviver function for possible transformation.
|
||||
|
||||
return typeof reviver === 'function'
|
||||
? walk({'': j}, '')
|
||||
: j;
|
||||
}
|
||||
|
||||
// If the text is not JSON parseable, then a SyntaxError is thrown.
|
||||
|
||||
throw new SyntaxError('JSON.parse');
|
||||
};
|
||||
}
|
||||
}());
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
<td>
|
||||
{loop type="image" name="cat_image" source="category" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
|
||||
<a href="{url path='admin/catalog' category_id=$ID}" title="{intl l='Browse this category'}"><img class="img-thumbnail" src="#IMAGE_URL" alt="#TITLE" /></a>
|
||||
<a href="{url path='admin/catalog' category_id=$ID}" title="{intl l='Browse this category'}"><img class="img-thumbnail" src="{$IMAGE_URL}" alt="{$TITLE}" /></a>
|
||||
{/loop}
|
||||
</td>
|
||||
|
||||
@@ -258,7 +258,7 @@
|
||||
<td>
|
||||
{loop type="image" name="cat_image" source="product" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
|
||||
<a href="{url path='admin/product/edit' id=$ID}" title="{intl l='Edit this product'}">
|
||||
<img src="#IMAGE_URL" alt="#TITLE" />
|
||||
<img src="{$IMAGE_URL}" alt="{$TITLE}" />
|
||||
</a>
|
||||
{/loop}
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
</label>
|
||||
|
||||
<div class="controls">
|
||||
<input type="text" name="id" disabled="disabled" value="#ID" />
|
||||
<input type="text" name="id" disabled="disabled" value="{$ID}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -162,7 +162,7 @@
|
||||
<option value="0">{intl l="Top level"}</option>
|
||||
|
||||
{loop name="cat-parent" type="category-tree" visible="*" category="0" exclude="{$current_category_id}"}
|
||||
<option value="#ID" style="padding-left: {3 + $LEVEL * 20}px" {if $parent_category_id == $ID}selected="selected"{/if}>{$TITLE}</option>
|
||||
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px" {if $parent_category_id == $ID}selected="selected"{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
|
||||
</select>
|
||||
|
||||
@@ -25,21 +25,21 @@
|
||||
{loop type="auth" name="pcc1" roles="ADMIN" permissions="admin.configuration.product_templates"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/product_templates'}">{intl l='Product templates'}</a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/product_templates'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/product-templates'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc2" roles="ADMIN" permissions="admin.configuration.product_attributes"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/product_attributes'}">{intl l='Product attributes'}</a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/product_attributes'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/product-attributes'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc3" roles="ADMIN" permissions="admin.configuration.product_features"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/product_features'}">{intl l='Product features'}</a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/product_features'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/product-features'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
|
||||
@@ -3,116 +3,116 @@
|
||||
{block name="page-title"}{intl l='Coupon'}{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<section id="wrapper" class="container">
|
||||
<section id="wrapper" class="container">
|
||||
|
||||
<nav>
|
||||
<ul class="breadcrumb">
|
||||
{include file="includes/coupon_breadcrumb.html"}
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<div class="page-header">
|
||||
<h1>Coupons : <small>Read coupon n°1</small></h1>
|
||||
</div>
|
||||
<nav>
|
||||
<ul class="breadcrumb">
|
||||
{include file="includes/coupon_breadcrumb.html"}
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
{loop type="coupon" name="read_coupon" id={$couponId} backend_context="true"}
|
||||
<div class="page-header">
|
||||
<h1>{intl l='Coupon : '}<small>{$CODE}</small></h1>
|
||||
</div>
|
||||
|
||||
|
||||
<section class="row">
|
||||
<div class="col-md-12 general-block-decorator">
|
||||
{loop type="coupon" name="read_coupon" id=1 backend_context="true"}
|
||||
<div class="alert alert-info">
|
||||
<span class="glyphicon glyphicon-question-sign"></span>
|
||||
{if #IS_ENABLED}{else}This coupon is disabled, you can enable to the bottom of this form.{/if}
|
||||
</div>
|
||||
<section class="row">
|
||||
<div class="col-md-12 general-block-decorator">
|
||||
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Code</td>
|
||||
<td>#CODE</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title</td>
|
||||
<td>#TITLE</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Expiration date</td>
|
||||
<td>EXPIRATION_DATE</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Usage left</td>
|
||||
<td>
|
||||
{if #USAGE_LEFT}
|
||||
<span class="label label-success">
|
||||
#USAGE_LEFT
|
||||
</span>
|
||||
<div class="alert alert-info">
|
||||
<span class="glyphicon glyphicon-question-sign"></span>
|
||||
{if !$IS_ENABLED}{intl l='This coupon is disabled, you can enable to the bottom of this form.'}{/if}
|
||||
</div>
|
||||
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{intl l='Title'}</td>
|
||||
<td>{$TITLE}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{intl l='Expiration date'}</td>
|
||||
<td>{$EXPIRATION_DATE}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{intl l='Usage left'}</td>
|
||||
<td>
|
||||
{if $USAGE_LEFT}
|
||||
<span class="label label-success">
|
||||
{$USAGE_LEFT}
|
||||
</span>
|
||||
{else}
|
||||
<span class="label label-important">
|
||||
0
|
||||
</span>
|
||||
<span class="label label-important">
|
||||
0
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">#SHORT_DESCRIPTION</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">#DESCRIPTION</td>
|
||||
<td colspan="2">{$SHORT_DESCRIPTION}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td colspan="2">{$DESCRIPTION}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{if #IS_CUMULATIVE}
|
||||
<span class="label label-success">
|
||||
{intl l="May be cumulative"}
|
||||
</span>
|
||||
{else}
|
||||
<span class="label label-important">
|
||||
{intl l="Can't be cumulative"}
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{if #IS_REMOVING_POSTAGE}
|
||||
<span class="label label-important">
|
||||
{intl l="Will remove postage"}
|
||||
{if $IS_CUMULATIVE}
|
||||
<span class="label label-success">
|
||||
{intl l="May be cumulative"}
|
||||
</span>
|
||||
{else}
|
||||
<span class="label label-important">
|
||||
{intl l="Can't be cumulative"}
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{if $IS_REMOVING_POSTAGE}
|
||||
<span class="label label-important">
|
||||
{intl l="Will remove postage"}
|
||||
</span>
|
||||
{else}
|
||||
<span class="label label-success">
|
||||
{intl l="Won't remove postage"}
|
||||
</span>
|
||||
{intl l="Won't remove postage"}
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Amount</td>
|
||||
<td>#AMOUNT</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Conditions of application</td>
|
||||
<td>
|
||||
<ul class="list-unstyled">
|
||||
<li>Total cart supperior to 400 €</li>
|
||||
<li><span class="label label-info">OR</span></li>
|
||||
<li>At least 4 products</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Actions</td>
|
||||
<td>
|
||||
<a href="#url" class="btn btn-default btn-primary btn-medium"><span class="icon-edit icon-white"></span> Edit</a>
|
||||
<a href="#url" class="btn btn-default btn-success btn-medium" data-toggle="confirm" data-target="#enable"><span class="glyphicon glyphicon-ok"></span> Enabled</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{/loop}
|
||||
</div>
|
||||
</section>
|
||||
</section> <!-- #wrapper -->
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{intl l='Amount'}</td>
|
||||
<td>{$AMOUNT}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{intl l='Application field'}</td>
|
||||
<td>
|
||||
<ul class="list-unstyled">
|
||||
{foreach from=$APPLICATION_CONDITIONS item=rule name=rulesForeach}
|
||||
{if !$smarty.foreach.rulesForeach.first}
|
||||
<li><span class="label label-info">{intl l='And'}</span></li>
|
||||
{/if}
|
||||
<li>{$rule nofilter}</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{intl l='Actions'}</td>
|
||||
<td>
|
||||
<a href="#url" class="btn btn-default btn-primary btn-medium"><span class="icon-edit icon-white"></span> {intl l='Edit'}</a>
|
||||
<a href="#url" class="btn btn-default btn-success btn-medium" data-toggle="confirm" data-target="#enable"><span class="glyphicon glyphicon-ok"></span> {intl l='Enabled'}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{/loop}
|
||||
</div>
|
||||
</section>
|
||||
</section> <!-- #wrapper -->
|
||||
|
||||
{include file='includes/confirmation-modal.html' id="enable" message="{intl l='Do you really want to enable this element ?'}"}
|
||||
{include file='includes/confirmation-modal.html' id="enable" message="{intl l='Do you really want to enable this element ?'}"}
|
||||
|
||||
{/block}
|
||||
|
||||
@@ -121,7 +121,4 @@
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
{javascripts file='assets/bootstrap-editable/js/bootstrap-editable.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
{/block}
|
||||
|
||||
@@ -33,35 +33,126 @@
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
{javascripts file='assets/js/json2.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
<script>
|
||||
$(function($){
|
||||
miniBrowser(0, '/test_to_remove/datas_coupon_edit.json');
|
||||
|
||||
$('#effect').on('change', function (e) {
|
||||
var optionSelected = $("option:selected", this);
|
||||
$('#effectToolTip').html(optionSelected.attr("data-description"));
|
||||
});
|
||||
|
||||
$('#category-rule').on('change', function (e) {
|
||||
$('#rule-add-operators-values').html('<div class="loading" ></div>');
|
||||
var url = "{$urlAjaxGetRuleInput}";
|
||||
url = url.replace('ruleId', $(this).val())
|
||||
console.log(url);
|
||||
|
||||
|
||||
|
||||
|
||||
// Init Rules
|
||||
var initRule = function() {
|
||||
var rules = [];
|
||||
{foreach from=$rulesObject key=k item=rule}
|
||||
var rule = {};
|
||||
rule['serviceId'] = '{$rule.serviceId nofilter}';
|
||||
rule['operators'] = {};
|
||||
rule['values'] = {};
|
||||
|
||||
{foreach from=$rule.validators.setOperators key=input item=operator}
|
||||
rule['operators']['{$input nofilter}'] = '{$operator nofilter}';
|
||||
rule['values']['{$input nofilter}'] = '{$rule.validators.setValues[$input] nofilter}';
|
||||
{/foreach}
|
||||
rules.push(rule);
|
||||
{/foreach}
|
||||
|
||||
return rules;
|
||||
}
|
||||
|
||||
// Save Rules AJAX
|
||||
var saveRuleAjax = function() {
|
||||
var $url = '{$urlAjaxUpdateRules}';
|
||||
console.log('save');
|
||||
console.log('{$urlAjaxUpdateRules}');
|
||||
console.log(rules);
|
||||
console.log(JSON.stringify(rules));
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: "POST",
|
||||
url: $url,
|
||||
{*data: {literal}{{/literal}rules:rules{literal}}{/literal},*}
|
||||
data: {literal}{{/literal}rules:JSON.stringify(rules){literal}}{/literal},
|
||||
statusCode: {
|
||||
404: function() {
|
||||
$('#rule-add-operators-values').html(
|
||||
'{intl l='Please select another rule'}'
|
||||
$('#constraint-add-operators-values').html(
|
||||
'{intl l='Please retry'}'
|
||||
);
|
||||
}
|
||||
}
|
||||
}).done(function(data) {
|
||||
$('#rule-add-operators-values').html(data);
|
||||
$('#constraint-list').html(data);
|
||||
$('#constraint-add-operators-values').html('');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Remove 1 Rule then Save Rules AJAX
|
||||
var removeRuleAjax = function($id) {
|
||||
rules.slice($id, 1);
|
||||
saveRuleAjax();
|
||||
}
|
||||
|
||||
// Add 1 Rule then Save Rules AJAX
|
||||
var addRuleAjax = function() {
|
||||
rules.push(ruleToSave);
|
||||
saveRuleAjax();
|
||||
}
|
||||
|
||||
|
||||
var rules = initRule();
|
||||
console.log(rules);
|
||||
|
||||
|
||||
// Save rules on click
|
||||
var onClickSaveRule = function() {
|
||||
$('#constraint-save-btn').on('click', function (e) {
|
||||
addRuleAjax();
|
||||
});
|
||||
}
|
||||
onClickSaveRule();
|
||||
|
||||
// Remove rule on click
|
||||
var onClickDeleteRule = function() {
|
||||
$('#constraint-delete-btn').on('click', function (e) {
|
||||
// removeRuleAjax();
|
||||
});
|
||||
}
|
||||
onClickDeleteRule();
|
||||
|
||||
// Reload effect inputs when changing effect
|
||||
var onEffectChange = function() {
|
||||
$('#effect').on('change', function (e) {
|
||||
var optionSelected = $("option:selected", this);
|
||||
$('#effectToolTip').html(optionSelected.attr("data-description"));
|
||||
});
|
||||
}
|
||||
onEffectChange();
|
||||
|
||||
// Reload rule inputs when changing effect
|
||||
var onRuleChange = function() {
|
||||
$('#category-rule').on('change', function (e) {
|
||||
$('#constraint-add-operators-values').html('<div class="loading" ></div>');
|
||||
var url = "{$urlAjaxGetRuleInput}";
|
||||
url = url.replace('ruleId', $(this).val())
|
||||
$.ajax({
|
||||
url: url,
|
||||
statusCode: {
|
||||
404: function() {
|
||||
$('#constraint-add-operators-values').html(
|
||||
'{intl l='Please select another rule'}'
|
||||
);
|
||||
}
|
||||
}
|
||||
}).done(function(data) {
|
||||
$('#constraint-add-operators-values').html(data);
|
||||
});
|
||||
});
|
||||
}
|
||||
onRuleChange();
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -167,9 +167,6 @@
|
||||
<table class="table table-striped">
|
||||
<caption class="clearfix">
|
||||
{intl l='Rules'}
|
||||
<a class="btn btn-default btn-primary pull-right" title="{intl l='Add a new rule'}">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -177,16 +174,23 @@
|
||||
<th>{intl l='Actions'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$rulesObject item=rule}
|
||||
<tr>
|
||||
<td>{$rule.tooltip}</td>
|
||||
<td>
|
||||
<a href="#url" class="btn btn-default btn-primary btn-medium"><span class="glyphicon glyphicon-edit"></span> {intl l='Edit'}</a>
|
||||
<a href="#url" class="btn btn-default btn-danger btn-medium" data-toggle="confirm" data-target="#delete"><span class="glyphicon glyphicon-remove"></span> {intl l='Delete'}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
<tbody id="constraint-list">
|
||||
{include file='coupon/rules.html' rules=$rulesObject}
|
||||
{*{foreach from=$rulesObject item=rule name=rulesForeach}*}
|
||||
{*<tr>*}
|
||||
{*<td>*}
|
||||
{*{if !$smarty.foreach.rulesForeach.first}*}
|
||||
{*<span class="label label-info">{intl l='And'}</span>*}
|
||||
{*{/if}*}
|
||||
{*{$rule.tooltip nofilter}*}
|
||||
{*</td>*}
|
||||
|
||||
{*<td>*}
|
||||
{*<a href="#url" class="btn btn-default btn-primary btn-medium"><span class="glyphicon glyphicon-edit"></span> {intl l='Edit'}</a>*}
|
||||
{*<a href="#url" class="btn btn-default btn-danger btn-medium" data-toggle="confirm" data-target="#delete"><span class="glyphicon glyphicon-remove"></span> {intl l='Delete'}</a>*}
|
||||
{*</td>*}
|
||||
{*</tr>*}
|
||||
{*{/foreach}*}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -194,7 +198,7 @@
|
||||
|
||||
<section class="row">
|
||||
<div class="col-md-12 general-block-decorator clearfix">
|
||||
<a title="{intl l='Save this rule'}" class="btn btn-default btn-primary pull-right">
|
||||
<a id="constraint-save-btn" title="{intl l='Save this rule'}" class="btn btn-default btn-primary pull-right">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
|
||||
@@ -217,72 +221,72 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div id="rule-add-operators-values" class="form-group col-md-6">
|
||||
<label for="operator">{intl l='Operator :'}</label>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<select name="operator" id="operator" class="form-control">
|
||||
<option value="1">is superior to</option>
|
||||
<option value="2">equals to</option>
|
||||
<option value="3">is inferior to</option>
|
||||
<option value="4">is inferior or equals to</option>
|
||||
<option value="5">is superior or equals to</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group col-lg-6">
|
||||
<input type="text" name="value" class="form-control">
|
||||
<span class="input-group-addon">€</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="constraint-add-operators-values" class="form-group col-md-6">
|
||||
{*<label for="operator">{intl l='Operator :'}</label>*}
|
||||
{*<div class="row">*}
|
||||
{*<div class="col-lg-6">*}
|
||||
{*<select name="operator" id="operator" class="form-control">*}
|
||||
{*<option value="1">is superior to</option>*}
|
||||
{*<option value="2">equals to</option>*}
|
||||
{*<option value="3">is inferior to</option>*}
|
||||
{*<option value="4">is inferior or equals to</option>*}
|
||||
{*<option value="5">is superior or equals to</option>*}
|
||||
{*</select>*}
|
||||
{*</div>*}
|
||||
{*<div class="input-group col-lg-6">*}
|
||||
{*<input type="text" name="value" class="form-control">*}
|
||||
{*<span class="input-group-addon">€</span>*}
|
||||
{*</div>*}
|
||||
{*</div>*}
|
||||
{**}
|
||||
|
||||
<label for="operator">Operator :</label>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<select name="operator" id="operator" class="form-control">
|
||||
<option value="1">is superior to</option>
|
||||
<option value="2">equals to</option>
|
||||
<option value="3">is inferior to</option>
|
||||
<option value="4">is inferior or equals to</option>
|
||||
<option value="5">is superior or equals to</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group col-lg-6 date" data-date="12/02/2012" data-date-format="dd/mm/yyyy">
|
||||
<input type="text" name="value" class="form-control">
|
||||
<span class="input-group-addon"><span class="glyphicon glyphicon-th"></span></span>
|
||||
</div>
|
||||
</div>
|
||||
{*<label for="operator">Operator :</label>*}
|
||||
{*<div class="row">*}
|
||||
{*<div class="col-lg-6">*}
|
||||
{*<select name="operator" id="operator" class="form-control">*}
|
||||
{*<option value="1">is superior to</option>*}
|
||||
{*<option value="2">equals to</option>*}
|
||||
{*<option value="3">is inferior to</option>*}
|
||||
{*<option value="4">is inferior or equals to</option>*}
|
||||
{*<option value="5">is superior or equals to</option>*}
|
||||
{*</select>*}
|
||||
{*</div>*}
|
||||
{*<div class="input-group col-lg-6 date" data-date="12/02/2012" data-date-format="dd/mm/yyyy">*}
|
||||
{*<input type="text" name="value" class="form-control">*}
|
||||
{*<span class="input-group-addon"><span class="glyphicon glyphicon-th"></span></span>*}
|
||||
{*</div>*}
|
||||
{*</div>*}
|
||||
|
||||
<label for="operator">Operator :</label>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<select name="operator" id="operator" class="form-control">
|
||||
<option value="1">is superior to</option>
|
||||
<option value="2">equals to</option>
|
||||
<option value="3">is inferior to</option>
|
||||
<option value="4">is inferior or equals to</option>
|
||||
<option value="5">is superior or equals to</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" name="value" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td id="minibrowser-breadcrumb"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><span class="icon-th-list"></span> Categories list</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="minibrowser-categories"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{*<label for="operator">Operator :</label>*}
|
||||
{*<div class="row">*}
|
||||
{*<div class="col-lg-6">*}
|
||||
{*<select name="operator" id="operator" class="form-control">*}
|
||||
{*<option value="1">is superior to</option>*}
|
||||
{*<option value="2">equals to</option>*}
|
||||
{*<option value="3">is inferior to</option>*}
|
||||
{*<option value="4">is inferior or equals to</option>*}
|
||||
{*<option value="5">is superior or equals to</option>*}
|
||||
{*</select>*}
|
||||
{*</div>*}
|
||||
{*<div class="col-lg-6">*}
|
||||
{*<input type="text" name="value" class="form-control">*}
|
||||
{*</div>*}
|
||||
{*</div>*}
|
||||
{*<div class="row">*}
|
||||
{*<div class="col-lg-12">*}
|
||||
{*<table class="table table-bordered">*}
|
||||
{*<tr>*}
|
||||
{*<td id="minibrowser-breadcrumb"></td>*}
|
||||
{*</tr>*}
|
||||
{*<tr>*}
|
||||
{*<th><span class="icon-th-list"></span> Categories list</th>*}
|
||||
{*</tr>*}
|
||||
{*<tr>*}
|
||||
{*<td id="minibrowser-categories"></td>*}
|
||||
{*</tr>*}
|
||||
{*</table>*}
|
||||
{*</div>*}
|
||||
{*</div>*}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,26 +1,23 @@
|
||||
{*test*}
|
||||
{*{$ruleId}*}
|
||||
{*{$inputs|var_dump}*}
|
||||
|
||||
{foreach from=$inputs key=name item=input}
|
||||
{*{$inputs.inputs|var_dump}*}
|
||||
{foreach from=$inputs.inputs key=name item=input}
|
||||
<label for="operator">{$input.title}</label>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<select class="form-control" id="{$name}[operator]" name="{$name}[operator]">
|
||||
<select class="form-control" id="{$name}-operator" name="{$name}[operator]">
|
||||
{foreach from=$input.availableOperators key=k item=availableOperator}
|
||||
<option value="{$availableOperator}">{$availableOperator}</option>
|
||||
<option value="{$k}">{$availableOperator}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group col-lg-6">
|
||||
{if $input.type == 'select'}
|
||||
<select class="{$input.class}" id="{$name}[value]" name="{$name}[value]">
|
||||
<select class="{$input.class}" id="{$name}-value" name="{$name}[value]">
|
||||
{foreach from=$input.availableValues key=code item=availableValue}
|
||||
<option value="{$code}">{$availableValue}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{else}
|
||||
<input type="{$input.type}" class="{$input.class}" id="{$name}[value]" name="{$name}[value]">
|
||||
<input type="{$input.type}" class="{$input.class}" id="{$name}-value" name="{$name}[value]">
|
||||
{*<span class="input-group-addon">€</span>*}
|
||||
{/if}
|
||||
</div>
|
||||
@@ -71,4 +68,35 @@
|
||||
{*</tr>*}
|
||||
{*</tbody></table>*}
|
||||
{*</div>*}
|
||||
{*</div>*}
|
||||
{*</div>*}
|
||||
|
||||
<script>
|
||||
var ruleToSave = {};
|
||||
ruleToSave['serviceId'] = '{$ruleId}';
|
||||
ruleToSave['operators'] = {};
|
||||
ruleToSave['values'] = {};
|
||||
{foreach from=$inputs.inputs key=name item=input}
|
||||
ruleToSave['operators']['{$name nofilter}'] = '{foreach from=$inputs.inputs[$name].availableOperators key=keyOperator item=valueOperator name=operators}{if $smarty.foreach.operators.first}{$keyOperator nofilter}{/if}{/foreach}';
|
||||
ruleToSave['values']['{$name nofilter}'] = '{if count($inputs.inputs[$name].availableValues) != 0}{foreach from=$inputs.inputs[$name].availableValues key=keyValue item=valueValue name=values}{if $smarty.foreach.values.first}{$keyValue nofilter}{/if}{/foreach}{else}to set{/if}';
|
||||
{/foreach}
|
||||
|
||||
|
||||
// Update ruleToSave Array ready to be saved
|
||||
var onInputsChange = function() {literal}{{/literal}
|
||||
{foreach from=$inputs.inputs key=name item=input}
|
||||
$('#{$name}-operator').change(function (e) {
|
||||
var $this = $(this);
|
||||
ruleToSave['operators']['{$name nofilter}'] = $this.val();
|
||||
console.log('#{$name}-operator changed ' + $this.val());
|
||||
console.log(ruleToSave);
|
||||
});
|
||||
$('#{$name}-value').change(function (e) {
|
||||
var $this = $(this);
|
||||
ruleToSave['values']['{$name nofilter}'] = $this.val();
|
||||
console.log('#{$name}-value changed ' + $this.val());
|
||||
console.log(ruleToSave);
|
||||
});
|
||||
{/foreach}
|
||||
{literal}}{/literal}
|
||||
onInputsChange();
|
||||
</script>
|
||||
18
templates/admin/default/coupon/rules.html
Normal file
18
templates/admin/default/coupon/rules.html
Normal file
@@ -0,0 +1,18 @@
|
||||
{foreach from=$rules item=rule name=rulesForeach}
|
||||
<tr>
|
||||
<td>
|
||||
{if !$smarty.foreach.rulesForeach.first}
|
||||
<span class="label label-info">{intl l='And'}</span>
|
||||
{/if}
|
||||
{$rule nofilter}
|
||||
</td>
|
||||
<td>
|
||||
<a class="btn btn-default btn-primary btn-medium" href="{$urlEdit}">
|
||||
<span class="glyphicon glyphicon-edit"></span> {intl l='Edit'}
|
||||
</a>
|
||||
<a data-target="#delete" data-toggle="confirm" class="btn btn-default btn-danger btn-medium" href="{$urlDelete}">
|
||||
<span class="glyphicon glyphicon-remove"></span> {intl l='Delete'}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
@@ -59,16 +59,16 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="customer_list" type="customer" visible="*" last_order="1" backend_context="1" page={$customer_page} limit={$display_customer}}
|
||||
{loop name="customer_list" type="customer" current="false" visible="*" last_order="1" backend_context="1" page={$customer_page} limit={$display_customer}}
|
||||
<tr>
|
||||
<td>{#REF}</td>
|
||||
<td>{$REF}</td>
|
||||
|
||||
<td>
|
||||
{#COMPANY}
|
||||
{$COMPANY}
|
||||
</td>
|
||||
|
||||
<td class="object-title">
|
||||
{#FIRSTNAME} {#LASTNAME}
|
||||
{$FIRSTNAME} {$LASTNAME}
|
||||
</td>
|
||||
|
||||
{module_include location='customer_list_row'}
|
||||
@@ -87,7 +87,7 @@
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this customer'}" href="{url path="/admin/customer/update/{$ID}" }"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{/loop}
|
||||
{loop type="auth" name="can_send_mail" roles="ADMIN" permissions="admin.customer.sendMail"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l="Send a mail to this customer"}" href="mailto:{#EMAIL}"><span class="glyphicon glyphicon-envelope"></span></a>
|
||||
<a class="btn btn-default btn-xs" title="{intl l="Send a mail to this customer"}" href="mailto:{$EMAIL}"><span class="glyphicon glyphicon-envelope"></span></a>
|
||||
{/loop}
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.customer.delete"}
|
||||
<a class="btn btn-default btn-xs customer-delete" title="{intl l='Delete this customer and all his orders'}" href="#delete_customer_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
|
||||
@@ -110,21 +110,21 @@
|
||||
<div class="col-md-12 text-center">
|
||||
|
||||
<ul class="pagination pagination-centered">
|
||||
{if #customer_page != 1}
|
||||
{if $customer_page != 1}
|
||||
<li><a href="{url path="/admin/customers" page="1"}">«</a></li>
|
||||
{else}
|
||||
<li class="disabled"><a href="#">«</a></li>
|
||||
{/if}
|
||||
|
||||
{pageloop rel="customer_list"}
|
||||
{if #PAGE != #CURRENT}
|
||||
<li><a href="{url path="/admin/customers" page="#PAGE"}">#PAGE</a></li>
|
||||
{if $PAGE != $CURRENT}
|
||||
<li><a href="{url path="/admin/customers" page="$PAGE"}">{$PAGE}</a></li>
|
||||
{else}
|
||||
<li class="active"><a href="#">#PAGE</a></li>
|
||||
<li class="active"><a href="#">{$PAGE}</a></li>
|
||||
{/if}
|
||||
|
||||
{if #PAGE == #LAST && #LAST != #CURRENT}
|
||||
<li><a href="{url path="/admin/customers" page="#PAGE"}">»</a></li>
|
||||
{if $PAGE == $LAST && $LAST != $CURRENT}
|
||||
<li><a href="{url path="/admin/customers" page="$PAGE"}">»</a></li>
|
||||
{else}
|
||||
<li class="disabled"><a href="#">»</a></li>
|
||||
{/if}
|
||||
|
||||
@@ -26,8 +26,7 @@ A generic modal creation dialog template. Parameters
|
||||
<form method="POST" action="{$form_action nofilter}" {$form_enctype nofilter}>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
{if ! empty($form_error_message)}<div class="alert alert-block alert-error" id="{$dialog_id}_error">{$form_error_message nofilter}</div>{/if}
|
||||
{if ! empty($form_error_message)}<div class="alert alert-danger" id="{$dialog_id}_error">{$form_error_message nofilter}</div>{/if}
|
||||
|
||||
{$dialog_body nofilter}
|
||||
</div>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
{form name="thelia.admin.login"}
|
||||
<form action="{url path='/admin/checklogin'}" method="post" class="well form-inline" {form_enctype form=$form}>
|
||||
|
||||
{if #form_error}<div class="alert alert-error">#form_error_message</div>{/if}
|
||||
{if $form_error}<div class="alert alert-error">{$form_error_message}</div>{/if}
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<input type="hidden" name="{$name}" value="{{$edit_language_locale}}" />
|
||||
{/form_field}
|
||||
|
||||
{if #form_error}<div class="alert alert-danger">#form_error_message</div>{/if}
|
||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||
|
||||
{form_field form=$form field='name'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
<input type="hidden" name="{$name}" value="{$edit_language_locale}" />
|
||||
{/form_field}
|
||||
|
||||
{if #form_error}<div class="alert alert-danger">#form_error_message</div>{/if}
|
||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||
|
||||
{form_field form=$form field='name'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
|
||||
@@ -39,23 +39,23 @@
|
||||
<meta itemprop="condition" content="new"> <!-- List of condition : new, used, refurbished -->
|
||||
<meta itemprop="identifier" content="mpn:925872"> <!-- List of identifier : asin, isbn, mpn, upc, sku -->
|
||||
|
||||
<a href="#URL" itemprop="url" tabindex="-1" class="product-image">
|
||||
<a href="{$URL}" itemprop="url" tabindex="-1" class="product-image">
|
||||
{ifloop rel="image_product_new" }
|
||||
<img itemprop="image"
|
||||
{loop name="image_product_new" type="image" limit="1" product="{#ID}"}
|
||||
src="{#IMAGE_URL}"
|
||||
{loop name="image_product_new" type="image" limit="1" product="{$ID}"}
|
||||
src="{$IMAGE_URL}"
|
||||
{/loop}
|
||||
alt="Product #{#LOOP_COUNT}" >
|
||||
alt="Product #{$LOOP_COUNT}" >
|
||||
{/ifloop}
|
||||
{elseloop rel="image_product_new"}
|
||||
{images file='assets/img/280x196.png'}<img itemprop="image" src="{$asset_url}" alt="Product #{#LOOP_COUNT}">{/images}
|
||||
{images file='assets/img/280x196.png'}<img itemprop="image" src="{$asset_url}" alt="Product #{$LOOP_COUNT}">{/images}
|
||||
{/elseloop}
|
||||
<span class="mask"></span>
|
||||
</a>
|
||||
|
||||
<a href="{#URL}" class="product-info">
|
||||
<h3 class="name"><span itemprop="name">{#TITLE}</span></h3>
|
||||
<div class="short-description" itemprop="description">{#CHAPO}</div>
|
||||
<a href="{$URL}" class="product-info">
|
||||
<h3 class="name"><span itemprop="name">{$TITLE}</span></h3>
|
||||
<div class="short-description" itemprop="description">{$CHAPO}</div>
|
||||
|
||||
<div class="product-price">
|
||||
<div class="price-container" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
||||
@@ -68,7 +68,7 @@
|
||||
preorder : http://schema.org/PreOrder
|
||||
online_only : http://schema.org/OnlineOnly
|
||||
-->
|
||||
<span class="regular-price"><span itemprop="price" class="price">{currency attr="symbol"} {format_number number="{#BEST_TAXED_PRICE}"}
|
||||
<span class="regular-price"><span itemprop="price" class="price">{currency attr="symbol"} {format_number number="{$BEST_TAXED_PRICE}"}
|
||||
</span></span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -97,22 +97,22 @@
|
||||
<meta itemprop="condition" content="new"> <!-- List of condition : new, used, refurbished -->
|
||||
<meta itemprop="identifier" content="mpn:925872"> <!-- List of identifier : asin, isbn, mpn, upc, sku -->
|
||||
|
||||
<a href="{#URL}" itemprop="url" tabindex="-1" class="product-image">
|
||||
<a href="{$URL}" itemprop="url" tabindex="-1" class="product-image">
|
||||
{ifloop rel="image_product_promo" }
|
||||
<img itemprop="image"
|
||||
{loop name="image_product_promo" type="image" limit="1" product="{#ID}"}
|
||||
src="{#IMAGE_URL}"
|
||||
{loop name="image_product_promo" type="image" limit="1" product="{$ID}"}
|
||||
src="{$IMAGE_URL}"
|
||||
{/loop}
|
||||
alt="Product #{#LOOP_COUNT}" >
|
||||
alt="Product #{$LOOP_COUNT}" >
|
||||
{/ifloop}
|
||||
{elseloop rel="image_product_promo"}
|
||||
{images file='assets/img/218x146.png'}<img itemprop="image" src="{$asset_url}" alt="Promotion #{#LOOP_COUNT}">{/images}
|
||||
{images file='assets/img/218x146.png'}<img itemprop="image" src="{$asset_url}" alt="Promotion #{$LOOP_COUNT}">{/images}
|
||||
{/elseloop}
|
||||
<span class="mask"></span>
|
||||
</a>
|
||||
|
||||
<div class="product-info">
|
||||
<h3 class="name"><a href="{#URL}"><span itemprop="name">{#CHAPO}</span></a></h3>
|
||||
<h3 class="name"><a href="{$URL}"><span itemprop="name">{$CHAPO}</span></a></h3>
|
||||
</div>
|
||||
|
||||
<div class="product-price">
|
||||
@@ -126,9 +126,9 @@
|
||||
preorder : http://schema.org/PreOrder
|
||||
online_only : http://schema.org/OnlineOnly
|
||||
-->
|
||||
{loop name="productSaleElements_promo" type="product_sale_elements" product="{#ID}" limit="1"}
|
||||
<span class="special-price"><span itemprop="price" class="price-label">{intl l="Special Price:"} </span><span class="price">{format_number number="{#TAXED_PROMO_PRICE}"} {currency attr="symbol"}</span></span>
|
||||
<span class="old-price"><span class="price-label">{intl l="Regular Price:"} </span><span class="price">{format_number number="{#TAXED_PRICE}"} {currency attr="symbol"}</span></span>
|
||||
{loop name="productSaleElements_promo" type="product_sale_elements" product="{$ID}" limit="1"}
|
||||
<span class="special-price"><span itemprop="price" class="price-label">{intl l="Special Price:"} </span><span class="price">{format_number number="{$TAXED_PROMO_PRICE}"} {currency attr="symbol"}</span></span>
|
||||
<span class="old-price"><span class="price-label">{intl l="Regular Price:"} </span><span class="price">{format_number number="{$TAXED_PRICE}"} {currency attr="symbol"}</span></span>
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -80,7 +80,7 @@ URL: http://www.thelia.net
|
||||
</ul>
|
||||
</li>
|
||||
{loop type="category" name="category.navigation" parent="0" limit="3"}
|
||||
<li><a href="{#URL}">{#TITLE}</a></li>
|
||||
<li><a href="{$URL}">{$TITLE}</a></li>
|
||||
{/loop}
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-cart navbar-right">
|
||||
@@ -124,7 +124,7 @@ URL: http://www.thelia.net
|
||||
<a class="current dropdown-toggle" data-toggle="dropdown" href="language.html">{lang attr="title"}</a>
|
||||
<ul class="select dropdown-menu">
|
||||
{loop type="lang" name="lang_available" exclude="{lang attr="id"}"}
|
||||
<li><a href="?lang={#CODE}">{#TITLE}</a></li>
|
||||
<li><a href="?lang={$CODE}">{$TITLE}</a></li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</div>
|
||||
@@ -134,7 +134,7 @@ URL: http://www.thelia.net
|
||||
<a class="current dropdown-toggle" data-toggle="dropdown" href="currency.html">{currency attr="code"}</a>
|
||||
<ul class="select dropdown-menu">
|
||||
{loop type="currency" name="currency_available" exclude="{currency attr="id"}" }
|
||||
<li><a href="?currency={#ISOCODE}">{#SYMBOL} - {#NAME}</a></li>
|
||||
<li><a href="?currency={$ISOCODE}">{$SYMBOL} - {$NAME}</a></li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<h1 id="main-label" class="page-header">{intl l="Login"}</h1>
|
||||
{form name="thelia.customer.login"}
|
||||
<form id="form-login" action="{url path="/customer/login"}" method="post" role="form" {form_enctype form=$form}>
|
||||
{if #form_error}<div class="alert alert-danger">#form_error_message</div>{/if}
|
||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{navigate to="return_to"}" /> {* the url the user is redirected to on login success *}
|
||||
{/form_field}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<label> <span>{intl l="{$label}"} : </span></label>
|
||||
<select name="{$name}">
|
||||
{loop type="title" name="title1"}
|
||||
<option value="#ID">#LONG</option>
|
||||
<option value="{$ID}">{$LONG}</option>
|
||||
{/loop}
|
||||
|
||||
</select>
|
||||
@@ -78,7 +78,7 @@
|
||||
<label> <span>{intl l="{$label}"} : </span></label>
|
||||
<select name="{$name}">
|
||||
{loop type="country" name="country1"}
|
||||
<option value="#ID">#TITLE</option>
|
||||
<option value="{$ID}">{$TITLE}</option>
|
||||
{/loop}
|
||||
|
||||
</select>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<label> <span>{intl l="{$label}"} : </span></label>
|
||||
<select name="{$name}">
|
||||
{loop type="title" name="title1"}
|
||||
<option value="#ID">#LONG</option>
|
||||
<option value="{$ID}">{$LONG}</option>
|
||||
{/loop}
|
||||
|
||||
</select>
|
||||
@@ -79,7 +79,7 @@
|
||||
<label> <span>{intl l="{$label}"} : </span></label>
|
||||
<select name="{$name}">
|
||||
{loop type="country" name="country1"}
|
||||
<option value="#ID">#TITLE</option>
|
||||
<option value="{$ID}">{$TITLE}</option>
|
||||
{/loop}
|
||||
|
||||
</select>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<ul>
|
||||
{loop type="address" name="customer_list" customer="current"}
|
||||
<li>{#LABEL} - {#FIRSTNAME} {#LASTNAME} - <a href="{url path="/address/edit/{#ID}"}">edit</a></li>
|
||||
<li>{$LABEL} - {$FIRSTNAME} {$LASTNAME} - <a href="{url path="/address/edit/{$ID}"}">edit</a></li>
|
||||
{/loop}
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<h1>{intl l='cart'}</h1>
|
||||
<ul>
|
||||
{loop name="cart" type="cart"}
|
||||
<li>Item {$LOOP_COUNT}/{$LOOP_TOTAL} : #ITEM_ID #TITLE - quantity : #QUANTITY</li>
|
||||
<li>Item {$LOOP_COUNT}/{$LOOP_TOTAL} : {$ITEM_ID} {$TITLE} - quantity : {$QUANTITY}</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
and passed back to the form plugin through the ParserContext.
|
||||
*}
|
||||
|
||||
{if #form_error}<div class="alert alert-error">#form_error_message</div>{/if}
|
||||
{if $form_error}<div class="alert alert-error">{$form_error_message}</div>{/if}
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
|
||||
{loop name="category0" type="category" parent="0" order="manual"}
|
||||
<div style="border: solid 4px blue; padding: 20px; margin: 10px;">
|
||||
<h2>CATEGORY : #TITLE (#LOOP_COUNT / #LOOP_TOTAL)</h2>
|
||||
<h2>CATEGORY : {$TITLE} ({$LOOP_COUNT} / {$LOOP_TOTAL})</h2>
|
||||
|
||||
{ifloop rel="prod_ass_cont"}
|
||||
<h5>Associated Content</h5>
|
||||
<ul>
|
||||
{loop name="prod_ass_cont" type="associated_content" category="#ID" order="associated_content"}
|
||||
<li>#TITLE</li>
|
||||
{loop name="prod_ass_cont" type="associated_content" category="$ID" order="associated_content"}
|
||||
<li>{$TITLE}</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
{/ifloop}
|
||||
@@ -26,23 +26,23 @@
|
||||
<h5>No associated content</h5>
|
||||
{/elseloop}
|
||||
|
||||
{loop name="product" type="product" category="#ID"}
|
||||
{loop name="product" type="product" category="$ID"}
|
||||
<div style="border: dashed 2px red; padding: 20px; margin: 10px;">
|
||||
<h3><a href="#URL">PRODUCT #ID : #REF (#LOOP_COUNT / #LOOP_TOTAL)</a></h3>
|
||||
<h4>#TITLE</h4>
|
||||
<p>#DESCRIPTION</p>
|
||||
<h3><a href="{$URL}">PRODUCT {$ID} : {$REF} ({$LOOP_COUNT} / {$LOOP_TOTA}L)</a></h3>
|
||||
<h4>{$TITLE}</h4>
|
||||
<p>{$DESCRIPTION}</p>
|
||||
|
||||
<p>Starting by #BEST_PRICE € HT (TAX : #BEST_PRICE_TAX ; #BEST_TAXED_PRICE € TTC)</p>
|
||||
<p>Starting by {$BEST_PRICE} € HT (TAX : {$BEST_PRICE_TAX} ; {$BEST_TAXED_PRICE} € TTC)</p>
|
||||
|
||||
{ifloop rel="ft"}
|
||||
<h5>Features</h5>
|
||||
<ul>
|
||||
{assign var=current_product value=#ID}
|
||||
{loop name="ft" type="feature" order="manual" product="#ID"}
|
||||
{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
|
||||
<strong>{$TITLE}</strong> :
|
||||
{loop name="ft_v" type="feature_value" product="{$current_product}" feature="{$ID}"}
|
||||
{$TITLE} / {$PERSONAL_VALUE}
|
||||
{/loop}
|
||||
</li>
|
||||
{/loop}
|
||||
@@ -53,15 +53,15 @@
|
||||
{/elseloop}
|
||||
</div>
|
||||
{/loop}
|
||||
{loop name="catgory1" type="category" parent="#ID"}
|
||||
{loop name="catgory1" type="category" parent="$ID"}
|
||||
<div style="border: double 4px lightseagreen; padding: 20px; margin: 10px;">
|
||||
<h3>SUBCATEGORY : #TITLE (#LOOP_COUNT / #LOOP_TOTAL)</h3>
|
||||
<h3>SUBCATEGORY : {$TITLE} ({$LOOP_COUNT} / {$LOOP_TOTAL})</h3>
|
||||
|
||||
{ifloop rel="prod_ass_cont"}
|
||||
<h5>Associated Content</h5>
|
||||
<ul>
|
||||
{loop name="prod_ass_cont" type="associated_content" category="#ID" order="associated_content"}
|
||||
<li>#TITLE</li>
|
||||
{loop name="prod_ass_cont" type="associated_content" category="$ID" order="associated_content"}
|
||||
<li>{$TITLE}</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
{/ifloop}
|
||||
@@ -69,22 +69,22 @@
|
||||
<h5>No associated content</h5>
|
||||
{/elseloop}
|
||||
|
||||
{loop name="product" type="product" category="#ID"}
|
||||
{loop name="product" type="product" category="$ID"}
|
||||
|
||||
<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>
|
||||
<h3><a href="{$URL}">PRODUCT {$ID} : {$REF} ({$LOOP_COUNT} / {$LOOP_TOTAL})</a></h3>
|
||||
<h4>{$TITLE}</h4>
|
||||
<p>{$DESCRIPTION}</p>
|
||||
|
||||
{ifloop rel="ft"}
|
||||
<h5>Features</h5>
|
||||
<ul>
|
||||
{assign var=current_product value=#ID}
|
||||
{loop name="ft" type="feature" order="manual" product="#ID"}
|
||||
{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
|
||||
<strong>{$TITLE}</strong> :
|
||||
{loop name="ft_v" type="feature_value" product="{$current_product}" feature="$ID"}
|
||||
{$TITLE} / {$PERSONAL_VALUE}
|
||||
{/loop}
|
||||
</li>
|
||||
{/loop}
|
||||
@@ -109,10 +109,10 @@
|
||||
<ul>
|
||||
{loop name="ft" type="feature" order="manual"}
|
||||
<li>
|
||||
#TITLE
|
||||
{$TITLE}
|
||||
<ul>
|
||||
{loop name="ftav" type="feature_availability" order="manual" feature="#ID"}
|
||||
<li>#TITLE</li>
|
||||
{loop name="ftav" type="feature_availability" order="manual" feature="$ID"}
|
||||
<li>{$TITLE}</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</li>
|
||||
@@ -126,10 +126,10 @@
|
||||
<ul>
|
||||
{loop name="attr" type="attribute" order="manual"}
|
||||
<li>
|
||||
#TITLE
|
||||
{$TITLE}
|
||||
<ul>
|
||||
{loop name="attrav" type="attribute_availability" order="manual" attribute="#ID"}
|
||||
<li>#TITLE</li>
|
||||
{loop name="attrav" type="attribute_availability" order="manual" attribute="$ID"}
|
||||
<li>{$TITLE}</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</li>
|
||||
@@ -143,7 +143,7 @@
|
||||
<ul>
|
||||
{loop name="cur" type="currency"}
|
||||
<li>
|
||||
#NAME (#SYMBOL)
|
||||
{$NAME} ({$SYMBOL})
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
and passed back to the form plugin through the ParserContext.
|
||||
*}
|
||||
|
||||
{if #form_error}<div class="alert alert-error">#form_error_message</div>{/if}
|
||||
{if $form_error}<div class="alert alert-error">{$form_error_message}</div>{/if}
|
||||
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
@@ -132,28 +132,28 @@
|
||||
|
||||
{form_field form=$form field="email"}
|
||||
{form_error form=$form field="email"}
|
||||
{#message}
|
||||
{$message}
|
||||
{/form_error}
|
||||
<label><span>{intl l="{$label}"}</span></label><input type="email" name="{$name}" value="{$value}" {$attr} ><br />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field="email_confirm"}
|
||||
{form_error form=$form field="email_confirm"}
|
||||
{#message}
|
||||
{$message}
|
||||
{/form_error}
|
||||
<label><span>{intl l="{$label}"}</span></label><input type="email" name="{$name}" {$attr} ><br />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field="password"}
|
||||
{form_error form=$form field="password"}
|
||||
{#message}
|
||||
{$message}
|
||||
{/form_error}
|
||||
<label><span>{intl l="{$label}"}</span></label><input type="password" name="{$name}" {$attr} ><br />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field="password_confirm"}
|
||||
{form_error form=$form field="password_confirm"}
|
||||
{#message}
|
||||
{$message}
|
||||
{/form_error}
|
||||
<label><span>{intl l="{$label}"}</span></label><input type="password" name="{$name}" {$attr} ><br />
|
||||
{/form_field}
|
||||
|
||||
@@ -7,43 +7,43 @@
|
||||
<table border="1" cellspacing="0" cellpadding="5">
|
||||
<tr>
|
||||
<td>ID</td>
|
||||
<td>#ID</td>
|
||||
<td>{$ID}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Réference</td>
|
||||
<td>#REF</td>
|
||||
<td>{$REF}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title</td>
|
||||
<td>
|
||||
{loop name="title" type="title" id="#TITLE"}
|
||||
#LONG (#SHORT)
|
||||
{loop name="title" type="title" id="$TITLE"}
|
||||
{$LONG} ({$SHORT})
|
||||
{/loop}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Firstname</td>
|
||||
<td>#FIRSTNAME</td>
|
||||
<td>{$FIRSTNAME}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lastname</td>
|
||||
<td>#LASTNAME</td>
|
||||
<td>{$LASTNAME}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Email</td>
|
||||
<td>#EMAIL</td>
|
||||
<td>{$EMAIL}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Is reseller</td>
|
||||
<td>#RESELLER</td>
|
||||
<td>{$RESELLER}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sponsor</td>
|
||||
<td>#SPONSOR</td>
|
||||
<td>{$SPONSOR}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Discount</td>
|
||||
<td>#DISCOUNT %</td>
|
||||
<td>{$DISCOUNT} %</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -56,20 +56,20 @@
|
||||
<table border="1" cellspacing="0" cellpadding="5">
|
||||
<tr>
|
||||
<td>ID</td>
|
||||
<td>#ID</td>
|
||||
<td>{$ID}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>#NAME</td>
|
||||
<td>{$NAME}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title</td>
|
||||
<td>
|
||||
<ul>
|
||||
{assign var=current_title value=#TITLE}
|
||||
{assign var=current_title value=$TITLE}
|
||||
{loop name="title" type="title"}
|
||||
<li {if $current_title==#ID}style="background-color: yellow"{/if}>
|
||||
#LONG (#SHORT)
|
||||
<li {if $current_title==$ID}style="background-color: yellow"{/if}>
|
||||
{$LONG} ({$SHORT})
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
@@ -77,36 +77,36 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Company</td>
|
||||
<td>#COMPANY</td>
|
||||
<td>{$COMPANY}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Firstname</td>
|
||||
<td>#FIRSTNAME</td>
|
||||
<td>{$FIRSTNAME}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lastname</td>
|
||||
<td>#LASTNAME</td>
|
||||
<td>{$LASTNAME}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Address</td>
|
||||
<td>#ADDRESS1<br/>#ADDRESS2<br/>#ADDRESS3</td>
|
||||
<td>{$ADDRESS1}<br/>{$ADDRESS2}<br/>{$ADDRESS3}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Zipcode</td>
|
||||
<td>#ZIPCODE</td>
|
||||
<td>{$ZIPCODE}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>City</td>
|
||||
<td>#CITY</td>
|
||||
<td>{$CITY}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Country</td>
|
||||
<td>
|
||||
<select>
|
||||
{assign var=current_country value=#COUNTRY}
|
||||
{assign var=current_country value=$COUNTRY}
|
||||
{loop name="country" type="country"}
|
||||
<option {if $current_country==#ID}selected="selected"{/if}>
|
||||
#TITLE (#ID - #ISOCODE - #ISOALPHA2 - #ISOALPHA3)
|
||||
<option {if $current_country==$ID}selected="selected"{/if}>
|
||||
{$TITLE} ({$ID} - {$ISOCODE} - {$ISOALPHA2} - {$ISOALPHA3})
|
||||
</option>
|
||||
{/loop}
|
||||
</select>
|
||||
@@ -114,11 +114,11 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Phone</td>
|
||||
<td>#PHONE</td>
|
||||
<td>{$PHONE}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cellphone</td>
|
||||
<td>#CELLPHONE</td>
|
||||
<td>{$CELLPHONE}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
{loop type="delivery" name="delivery.list"}
|
||||
<li>
|
||||
<ul>
|
||||
<li>id : {#ID}</li>
|
||||
<li>prix : {#PRICE}</li>
|
||||
<li>Choisir : <a href="{url path="/delivery/choose/{#ID}"}">Choisir</a></li>
|
||||
<li>id : {$ID}</li>
|
||||
<li>prix : {$PRICE}</li>
|
||||
<li>Choisir : <a href="{url path="/delivery/choose/{$ID}"}">Choisir</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{/loop}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{loop name="folder0" type="folder" parent="0" order="alpha_reverse"}
|
||||
<div style="border: solid 4px blue; padding: 20px; margin: 10px;">
|
||||
<h2>FOLDER : #TITLE</h2>
|
||||
{loop name="folder1" type="folder" parent="#ID"}
|
||||
<h2>FOLDER : {$TITLE}</h2>
|
||||
{loop name="folder1" type="folder" parent="$ID"}
|
||||
<div style="border: double 4px lightseagreen; padding: 20px; margin: 10px;">
|
||||
<h3>SUBFOLDER : #TITLE (#LOOP_COUNT / #LOOP_TOTAL)</h3>
|
||||
{loop name="content" type="content" folder="#ID"}
|
||||
<h3>SUBFOLDER : {$TITLE} ({$LOOP_COUNT} / {$LOOP_TOTAL})</h3>
|
||||
{loop name="content" type="content" folder="$ID"}
|
||||
<div style="border: solid 1px green; padding: 20px; margin: 10px;">
|
||||
<h3>CONTENT : #TITLE</h3>
|
||||
<p>#DESCRIPTION</p>
|
||||
<h3>CONTENT : {$TITLE}</h3>
|
||||
<p>{$DESCRIPTION}</p>
|
||||
</div>
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
@@ -5,22 +5,22 @@
|
||||
<h2>Category Images</h2>
|
||||
<ul>
|
||||
{loop type="category" name="jsvdfk"}
|
||||
<li><p>Category id #ID: #TITLE</p>
|
||||
<li><p>Category id {$ID}: {$TITLE}</p>
|
||||
<ul>
|
||||
<li>
|
||||
{loop type="image" name="image_test" category="#ID" width="200" height="100" resize_mode="borders"}
|
||||
<p>Processed file URL: #IMAGE_URL</p>
|
||||
<p>Original file URL: #ORIGINAL_IMAGE_URL</p>
|
||||
<img src="#IMAGE_URL" />
|
||||
{loop type="image" name="image_test" category="$ID" width="200" height="100" resize_mode="borders"}
|
||||
<p>Processed file URL: {$IMAGE_URL}</p>
|
||||
<p>Original file URL: {$ORIGINAL_IMAGE_URL}</p>
|
||||
<img src="{$IMAGE_URL}" />
|
||||
{/loop}
|
||||
|
||||
{loop type="image" name="image_test" category="#ID"}
|
||||
<p>Full size file URL: #IMAGE_URL</p>
|
||||
<img src="#IMAGE_URL" />
|
||||
{loop type="image" name="image_test" category="$ID"}
|
||||
<p>Full size file URL: {$IMAGE_URL}</p>
|
||||
<img src="{$IMAGE_URL}" />
|
||||
{/loop}
|
||||
|
||||
{loop type="image" name="image_test" source="category" source_id="#ID"}
|
||||
<p>source="category" source_id="x" argument style: Processed file URL: #IMAGE_URL</p>
|
||||
{loop type="image" name="image_test" source="category" source_id="$ID"}
|
||||
<p>source="category" source_id="x" argument style: Processed file URL: {$IMAGE_URL}</p>
|
||||
{/loop}
|
||||
</li>
|
||||
</ul>
|
||||
@@ -34,27 +34,27 @@
|
||||
<h2>Product Images</h2>
|
||||
<ul>
|
||||
{loop type="product" name="jsvdfk"}
|
||||
<li><p>Product id #ID: #TITLE</p>
|
||||
<li><p>Product id {$ID}: {$TITLE}</p>
|
||||
<ul>
|
||||
<li>
|
||||
{loop type="image" name="image_test" product="#ID" width="200" height="100" resize_mode="borders" effects="gamma:0.7" background_color="#cc8000"}
|
||||
<p>Processed file URL: #IMAGE_URL</p>
|
||||
<p>Original file URL: #ORIGINAL_IMAGE_URL</p>
|
||||
{loop type="image" name="image_test" product="$ID" width="200" height="100" resize_mode="borders" effects="gamma:0.7" background_color="#cc8000"}
|
||||
<p>Processed file URL: {$IMAGE_URL}</p>
|
||||
<p>Original file URL: {$ORIGINAL_IMAGE_URL}</p>
|
||||
<p>Images:</p>
|
||||
|
||||
<img src="#IMAGE_URL" />
|
||||
<img src="{$IMAGE_URL}" />
|
||||
{/loop}
|
||||
{loop type="image" name="image_test" product="#ID" width="200" height="100" resize_mode="crop"}
|
||||
<img src="#IMAGE_URL" />
|
||||
{loop type="image" name="image_test" product="$ID" width="200" height="100" resize_mode="crop"}
|
||||
<img src="{$IMAGE_URL}" />
|
||||
{/loop}
|
||||
{loop type="image" name="image_test" product="#ID" width="100" height="200" resize_mode="borders" background_color="#cc8000"}
|
||||
<img src="#IMAGE_URL" />
|
||||
{loop type="image" name="image_test" product="$ID" width="100" height="200" resize_mode="borders" background_color="#cc8000"}
|
||||
<img src="{$IMAGE_URL}" />
|
||||
{/loop}
|
||||
{loop type="image" name="image_test" product="#ID" width="100" rotation="-20" background_color="#facabe"}
|
||||
<img src="#IMAGE_URL" />
|
||||
{loop type="image" name="image_test" product="$ID" width="100" rotation="-20" background_color="#facabe"}
|
||||
<img src="{$IMAGE_URL}" />
|
||||
{/loop}
|
||||
{loop type="image" name="image_test" product="#ID" width="200" height="100" resize_mode="borders" background_color="#facabe" effects="negative"}
|
||||
<img src="#IMAGE_URL" />
|
||||
{loop type="image" name="image_test" product="$ID" width="200" height="100" resize_mode="borders" background_color="#facabe" effects="negative"}
|
||||
<img src="{$IMAGE_URL}" />
|
||||
{/loop}
|
||||
</p>
|
||||
</li>
|
||||
@@ -67,13 +67,13 @@
|
||||
<h2>Folder Images</h2>
|
||||
<ul>
|
||||
{loop type="folder" name="jsvdfk"}
|
||||
<li><p>Folder id #ID: #TITLE</p>
|
||||
<li><p>Folder id {$ID}: {$TITLE}</p>
|
||||
<ul>
|
||||
<li>
|
||||
{loop type="image" name="image_test" folder="#ID" width="200" height="100" resize_mode="borders"}
|
||||
<p>Processed file URL: #IMAGE_URL</p>
|
||||
<p>Original file URL: #ORIGINAL_IMAGE_URL</p>
|
||||
<img src="#IMAGE_URL" />
|
||||
{loop type="image" name="image_test" folder="$ID" width="200" height="100" resize_mode="borders"}
|
||||
<p>Processed file URL: {$IMAGE_URL}</p>
|
||||
<p>Original file URL: {$ORIGINAL_IMAGE_URL}</p>
|
||||
<img src="{$IMAGE_URL}" />
|
||||
{/loop}
|
||||
</li>
|
||||
</ul>
|
||||
@@ -86,13 +86,13 @@
|
||||
<h2>Content Images</h2>
|
||||
<ul>
|
||||
{loop type="content" name="jsvdfk"}
|
||||
<li><p>Content id #ID: #TITLE</p>
|
||||
<li><p>Content id {$ID}: {$TITLE}</p>
|
||||
<ul>
|
||||
<li>
|
||||
{loop type="image" name="image_test" content="#ID" width="200" height="100" resize_mode="borders"}
|
||||
<p>Processed file URL: #IMAGE_URL</p>
|
||||
<p>Original file URL: #ORIGINAL_IMAGE_URL</p>
|
||||
<img src="#IMAGE_URL" />
|
||||
{loop type="image" name="image_test" content="$ID" width="200" height="100" resize_mode="borders"}
|
||||
<p>Processed file URL: {$IMAGE_URL}</p>
|
||||
<p>Original file URL: {$ORIGINAL_IMAGE_URL}</p>
|
||||
<img src="{$IMAGE_URL}" />
|
||||
{/loop}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{loop name="included0" type="category" parent="0"}
|
||||
<h2>Out before - CATEGORY : #TITLE (#LOOP_COUNT / #LOOP_TOTAL)</h2>
|
||||
{loop name="category1" type="category" parent="#ID"}
|
||||
<h3>Inner - SUBCATEGORY : #TITLE (#LOOP_COUNT / #LOOP_TOTAL)</h3>
|
||||
<h2>Out before - CATEGORY : {$TITLE} ({$LOOP_COUNT} / {$LOOP_TOTAL})</h2>
|
||||
{loop name="category1" type="category" parent="$ID"}
|
||||
<h3>Inner - SUBCATEGORY : {$TITLE} ({$LOOP_COUNT} / {$LOOP_TOTAL})</h3>
|
||||
{/loop}
|
||||
|
||||
{loop name="category2" type="category" parent="#ID"}
|
||||
<h3>Inner 2 - SUBCATEGORY : #TITLE (#LOOP_COUNT / #LOOP_TOTAL)</h3>
|
||||
{loop name="category2" type="category" parent="$ID"}
|
||||
<h3>Inner 2 - SUBCATEGORY : {$TITLE} ({$LOOP_COUNT} / {$LOOP_TOTAL})</h3>
|
||||
{/loop}
|
||||
<h2>Out after - CATEGORY : #TITLE (#LOOP_COUNT / #LOOP_TOTAL)</h2>
|
||||
<h2>Out after - CATEGORY : {$TITLE} ({$LOOP_COUNT} / {$LOOP_TOTAL})</h2>
|
||||
<hr />
|
||||
{/loop}
|
||||
@@ -25,12 +25,12 @@
|
||||
and passed back to the form plugin through the ParserContext.
|
||||
*}
|
||||
|
||||
{if #form_error}<div class="alert alert-error">#form_error_message</div>{/if}
|
||||
{if $0form_error}<div class="alert alert-error">{$form_error_message}</div>{/if}
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field="email"}
|
||||
{if #error}{#message}{/if}
|
||||
{if $error}{$message}{/if}
|
||||
<label>{intl l="Your e-mail address"}: </label><input type="email" name="{$name}" {$attr} value="{$value}"><br />
|
||||
{/form_field}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div style="border: solid 1px; padding: 20px;">
|
||||
|
||||
{loop name="cat" type="category" page="{$category_current_page}" limit="2"}
|
||||
<h2>#LOOP_COUNT - #TITLE</h2>
|
||||
<h2>{$LOOP_COUNT} - {$TITLE}</h2>
|
||||
<h3>Products :</h3>
|
||||
|
||||
<div style="border: solid 1px; padding: 20px;">
|
||||
@@ -17,23 +17,23 @@
|
||||
{assign var=product_current_page value={$smarty.get.$this_product_getter|default:1}}
|
||||
|
||||
<ul>
|
||||
{loop name="prod" type="product" category="#ID" page="{$product_current_page}" limit="2"}
|
||||
{loop name="prod" type="product" category="$ID" page="{$product_current_page}" limit="2"}
|
||||
<li>
|
||||
#ID:#REF
|
||||
{$ID}:{$REF}
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<p>#TITLE page choice</p>
|
||||
<p>{$TITLE} page choice</p>
|
||||
{pageloop rel="prod"}
|
||||
{if ${PAGE} != {$product_current_page}}
|
||||
<a href="index_dev.php?view=pagination&category_page={$category_current_page}&{$this_product_getter}=#PAGE">#PAGE</a>
|
||||
{if $PAGE != $product_current_page}
|
||||
<a href="index_dev.php?view=pagination&category_page={$category_current_page}&{$this_product_getter}={$PAGE}">{$PAGE}</a>
|
||||
{else}
|
||||
{ #PAGE }
|
||||
{$PAGE}
|
||||
{/if}
|
||||
{if {$PAGE} != {$LAST}}
|
||||
{if $PAGE != $LAST}
|
||||
-
|
||||
{/if}
|
||||
{/pageloop}
|
||||
@@ -44,12 +44,12 @@
|
||||
|
||||
<p>categories page choice</p>
|
||||
{pageloop rel="cat"}
|
||||
{if ${PAGE} != {$category_current_page}}
|
||||
<a href="index_dev.php?view=pagination&category_page=#PAGE">#PAGE</a>
|
||||
{if $PAGE != $category_current_page}
|
||||
<a href="index_dev.php?view=pagination&category_page={$PAGE}">{$PAGE}</a>
|
||||
{else}
|
||||
{ #PAGE }
|
||||
{$PAGE}
|
||||
{/if}
|
||||
{if {$PAGE} != {$LAST}}
|
||||
{if $PAGE != $LAST}
|
||||
-
|
||||
{/if}
|
||||
{/pageloop}
|
||||
@@ -62,18 +62,18 @@ Pagination before loop
|
||||
{capture name="prod2"}
|
||||
{loop name="prod2" type="product" page="{$product_current_page}" limit="2"}
|
||||
<li>
|
||||
#ID:#REF
|
||||
{$ID}:{$REF}
|
||||
</li>
|
||||
{/loop}
|
||||
{/capture}
|
||||
|
||||
{pageloop rel="prod2"}
|
||||
{if ${PAGE} != {$product_current_page}}
|
||||
<a href="index_dev.php?view=pagination&category_page={$category_current_page}&{$this_product_getter}=#PAGE">#PAGE</a>
|
||||
<a href="index_dev.php?view=pagination&category_page={$category_current_page}&{$this_product_getter}={$PAGE}">{$PAGE}</a>
|
||||
{else}
|
||||
{ #PAGE }
|
||||
{$PAGE}
|
||||
{/if}
|
||||
{if {$PAGE} != {$LAST}}
|
||||
{if $PAGE != $LAST}
|
||||
-
|
||||
{/if}
|
||||
{/pageloop}
|
||||
@@ -82,11 +82,11 @@ Pagination before loop
|
||||
|
||||
{pageloop rel="prod2"}
|
||||
{if ${PAGE} != {$product_current_page}}
|
||||
<a href="index_dev.php?view=pagination&category_page={$category_current_page}&{$this_product_getter}=#PAGE">#PAGE</a>
|
||||
<a href="index_dev.php?view=pagination&category_page={$category_current_page}&{$this_product_getter}={$PAGE}">{$PAGE}</a>
|
||||
{else}
|
||||
{ #PAGE }
|
||||
{$PAGE}
|
||||
{/if}
|
||||
{if {$PAGE} != {$LAST}}
|
||||
{if $PAGE != $LAST}
|
||||
-
|
||||
{/if}
|
||||
{/pageloop}
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
<html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
Here you are : {navigate to="current"}<br />
|
||||
From : {navigate to="return_to"}<br />
|
||||
Index : {navigate to="index"}<br />
|
||||
@@ -14,17 +9,17 @@ Index : {navigate to="index"}<br />
|
||||
{loop type="product" name="product" current="true"}
|
||||
|
||||
<div style="border: dashed 2px red; padding: 20px; margin: 10px;">
|
||||
<h2>PRODUCT (#ID) : #REF</h2>
|
||||
<h3>#TITLE</h3>
|
||||
<p>#DESCRIPTION</p>
|
||||
<h2>PRODUCT ({$ID}) : {$REF}</h2>
|
||||
<h3>{$TITLE}</h3>
|
||||
<p>{$DESCRIPTION}</p>
|
||||
|
||||
<p>Starting by #BEST_PRICE {currency attr="symbol"} HT (TAX : #BEST_PRICE_TAX ; #BEST_TAXED_PRICE {currency attr="symbol"} TTC)</p>
|
||||
<p>Starting by {$BEST_PRICE} {currency attr="symbol"} HT (TAX : {$BEST_PRICE_TAX} ; {$BEST_TAXED_PRICE} {currency attr="symbol"} TTC)</p>
|
||||
|
||||
{ifloop rel="acc"}
|
||||
<h4>Accessories</h4>
|
||||
<ul>
|
||||
{loop name="acc" type="accessory" product="#ID" order="accessory"}
|
||||
<li><a href="#URL">#REF</a></li>
|
||||
{loop name="acc" type="accessory" product="$ID" order="accessory"}
|
||||
<li><a href="{$URL}">{$REF}</a></li>
|
||||
{/loop}
|
||||
</ul>
|
||||
{/ifloop}
|
||||
@@ -35,8 +30,8 @@ Index : {navigate to="index"}<br />
|
||||
{ifloop rel="prod_ass_cont"}
|
||||
<h4>Associated Content</h4>
|
||||
<ul>
|
||||
{loop name="prod_ass_cont" type="associated_content" product="#ID" order="associated_content"}
|
||||
<li>#TITLE</li>
|
||||
{loop name="prod_ass_cont" type="associated_content" product="$ID" order="associated_content"}
|
||||
<li>{$TITLE}</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
{/ifloop}
|
||||
@@ -47,12 +42,12 @@ Index : {navigate to="index"}<br />
|
||||
{ifloop rel="ft"}
|
||||
<h4>Features</h4>
|
||||
<ul>
|
||||
{assign var=current_product value=#ID}
|
||||
{loop name="ft" type="feature" order="manual" product="#ID"}
|
||||
{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
|
||||
<strong>{$TITLE}</strong> :
|
||||
{loop name="ft_v" type="feature_value" product="{$current_product}" feature="$ID"}
|
||||
{$TITLE} / {$PERSONAL_VALUE}
|
||||
{/loop}
|
||||
</li>
|
||||
{/loop}
|
||||
@@ -64,18 +59,18 @@ Index : {navigate to="index"}<br />
|
||||
|
||||
<h4>Product sale elements</h4>
|
||||
|
||||
{assign var=current_product value=#ID}
|
||||
{loop name="pse" type="product_sale_elements" product="#ID"}
|
||||
{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 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 {currency attr="symbol"} HT // TAX : #PROMO_PRICE_TAX ; #TAXED_PROMO_PRICE {currency attr="symbol"} TTC (instead of #PRICE HT // TAX : #PRICE_TAX ; #TAXED_PRICE {currency attr="symbol"} TTC){else} #PRICE {currency attr="symbol"} HT // TAX : #PRICE_TAX ; #TAXED_PRICE {currency attr="symbol"} TTC{/if}</strong>
|
||||
<br />{$WEIGHT} g
|
||||
<br /><strong>{if $IS_PROMO == 1} {$PROMO_PRICE} {currency attr="symbol"} HT // TAX : {$PROMO_PRICE_TAX} ; {$TAXED_PROMO_PRICE} {currency attr="symbol"} TTC (instead of {$PRICE HT} // TAX : {$PRICE_TAX} ; {$TAXED_PRICE} {currency attr="symbol"} TTC){else} {$PRICE} {currency attr="symbol"} HT // TAX : {$PRICE_TAX} ; {$TAXED_PRICE} {currency attr="symbol"} TTC{/if}</strong>
|
||||
<br /><br />
|
||||
Add
|
||||
<select>
|
||||
{for $will=1 to #QUANTITY}
|
||||
{for $will=1 to $QUANTITY}
|
||||
<option>{$will}</option>
|
||||
{/for}
|
||||
</select>
|
||||
@@ -92,8 +87,4 @@ Index : {navigate to="index"}<br />
|
||||
|
||||
{elseloop rel="product"}
|
||||
<h2>Produit introuvable !</h2>
|
||||
{/elseloop}
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
{/elseloop}
|
||||
@@ -2,8 +2,8 @@
|
||||
{loop name="car" type="category"}
|
||||
<li>
|
||||
<ul>
|
||||
{loop name="product" type="product" category="#ID"}
|
||||
<li>#REF</li>
|
||||
{loop name="product" type="product" category="$ID"}
|
||||
<li>{$REF}</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user