Compare commits
39 Commits
ticket/r16
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
1d5578d66b | ||
|
922de8200a | ||
|
7699f86acd | ||
|
76b26ac6b4 | ||
|
6b863fe940 | ||
|
34e2bdc553 | ||
|
2207ae3cb8 | ||
|
893da877e8 | ||
|
efbcf6327f | ||
|
5a605ad905 | ||
|
e057c88351 | ||
|
93fe8b597a | ||
|
9803b2424c | ||
|
4691d8bb0f | ||
|
b5053e443a | ||
|
34c962b75e | ||
|
588fa7e334 | ||
|
03cd386f70 | ||
|
6d0beefa1c | ||
|
2a3e8ebddd | ||
|
aca4357353 | ||
|
f2462e6bc3 | ||
|
d6dbc5f479 | ||
|
e54395e5d1 | ||
|
305234f74f | ||
|
37b955667f | ||
|
9115434424 | ||
|
2343304d25 | ||
|
ffe8c187e8 | ||
|
2985b1ed4f | ||
|
76eb16036b | ||
|
c86f90f0eb | ||
|
9edb325f22 | ||
|
e7551ef018 | ||
|
4a63488b51 | ||
|
2c870b56f4 | ||
|
bec5a21522 | ||
|
d931f7f081 | ||
|
197f4161d1 |
@ -79,7 +79,16 @@ class AdminImport extends AdminTab
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->entities = array_flip(array($this->l('Categories'), $this->l('Products'), $this->l('Combinations'), $this->l('Customers'), $this->l('Addresses'), $this->l('Manufacturers'), $this->l('Suppliers')));
|
||||
$this->entities = array_flip(array(
|
||||
$this->l('Categories'),
|
||||
$this->l('Products'),
|
||||
$this->l('Combinations'),
|
||||
$this->l('Customers'),
|
||||
$this->l('Addresses'),
|
||||
$this->l('Manufacturers'),
|
||||
$this->l('Suppliers'),
|
||||
$this->l('Pack'),
|
||||
));
|
||||
|
||||
switch ((int)(Tools::getValue('entity')))
|
||||
{
|
||||
@ -280,7 +289,19 @@ class AdminImport extends AdminTab
|
||||
'meta_keywords' => array('label' => $this->l('Meta-keywords')),
|
||||
'meta_description' => array('label' => $this->l('Meta-description')));
|
||||
break;
|
||||
|
||||
case $this->entities[$this->l('Pack')]:
|
||||
|
||||
self::$required_fields = array('id_product_item', 'qty', 'id');
|
||||
|
||||
$this->available_fields = array(
|
||||
'id_product_item' => array('label' => $this->l('ID Item')),
|
||||
'qty' => array('label' => $this->l('Quantity Item')),
|
||||
'id' => array('label' => $this->l('ID Pack')),
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
@ -1293,6 +1314,51 @@ class AdminImport extends AdminTab
|
||||
$this->closeCsvFile($handle);
|
||||
}
|
||||
|
||||
public function packImport()
|
||||
{
|
||||
$this->receiveTab();
|
||||
$handle = $this->openCsvFile();
|
||||
self::setLocale();
|
||||
for ($current_line = 0; $line = fgetcsv($handle, MAX_LINE_SIZE, Tools::getValue('separator')); $current_line++)
|
||||
{
|
||||
if (Tools::getValue('convert')) {
|
||||
$line = $this->utf8_encode_array($line);
|
||||
}
|
||||
$info = self::getMaskedRow($line);
|
||||
|
||||
self::setDefaultValues($info);
|
||||
|
||||
// Is product a pack
|
||||
if (array_key_exists('id', $info) && (int)($info['id']) && Pack::isPack((int)($info['id']))) {
|
||||
$pack = new Pack((int)($info['id']));
|
||||
}
|
||||
else {
|
||||
$pack = new Pack();
|
||||
}
|
||||
|
||||
self::array_walk($info, array('AdminImport', 'fillInfo'), $pack);
|
||||
if (($fieldError = $pack->validateFields(UNFRIENDLY_ERROR, true)) === true && is_numeric($info['qty']))
|
||||
{
|
||||
$res = false;
|
||||
// Is product item in pack
|
||||
if ($pack->isPacked($info['id_product_item'])) {
|
||||
$res = $pack->updateItem($info['id'], $info['id_product_item'], $info['qty']);
|
||||
}
|
||||
// Insert
|
||||
if (!$res) {
|
||||
$res = $pack->addItem($info['id'], $info['id_product_item'], $info['qty']);
|
||||
}
|
||||
if (!$res) {
|
||||
$this->_errors[] = mysql_error().' '.$info['id_product_item'].(isset($info['id']) ? ' (ID '.$info['id'].')' : '').' '.Tools::displayError('Cannot be saved');
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->_errors[] = ($fieldError !== true ? $fieldError : '').($langFieldError !== true ? $langFieldError : '');
|
||||
}
|
||||
}
|
||||
$this->closeCsvFile($handle);
|
||||
}
|
||||
|
||||
public function display()
|
||||
{
|
||||
if (!Tools::isSubmit('submitImportFile'))
|
||||
@ -1824,6 +1890,9 @@ class AdminImport extends AdminTab
|
||||
case $this->entities[$this->l('Suppliers')]:
|
||||
$this->supplierImport();
|
||||
break;
|
||||
case $this->entities[$this->l('Pack')]:
|
||||
$this->packImport();
|
||||
break;
|
||||
default:
|
||||
$this->_errors[] = $this->l('no entity selected');
|
||||
}
|
||||
|
@ -175,7 +175,6 @@ class PackCore extends Product
|
||||
|
||||
/**
|
||||
* Add an item to the pack
|
||||
*
|
||||
* @param integer $id_product
|
||||
* @param integer $id_item
|
||||
* @param integer $qty
|
||||
@ -187,6 +186,19 @@ class PackCore extends Product
|
||||
return Db::getInstance()->AutoExecute(_DB_PREFIX_.'pack', array('id_product_pack' => (int)($id_product), 'id_product_item' => (int)($id_item), 'quantity' => (int)($qty)), 'INSERT');
|
||||
}
|
||||
|
||||
/**
|
||||
* Update item and his pack association
|
||||
* @param integer $id_product
|
||||
* @param integer $id_item
|
||||
* @param integer $qty
|
||||
* @return boolean true if everything was fine
|
||||
*/
|
||||
public static function updateItem($id_product, $id_item, $qty)
|
||||
{
|
||||
return Db::getInstance()->AutoExecute(_DB_PREFIX_.'pack', array('quantity' => (int)($qty)),
|
||||
'UPDATE', 'id_product_pack='.(int)($id_product).' AND id_product_item='.(int)($id_item));
|
||||
}
|
||||
|
||||
public static function duplicate($id_product_old, $id_product_new)
|
||||
{
|
||||
Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'pack (id_product_pack, id_product_item, quantity)
|
||||
|
@ -285,22 +285,22 @@ class TaxCore extends ObjectModel
|
||||
$id_state = 0;
|
||||
$id_county = 0;
|
||||
$rate = 0;
|
||||
if (!empty($id_address))
|
||||
{
|
||||
if (!empty($id_address)) {
|
||||
$address_infos = Address::getCountryAndState($id_address);
|
||||
if ($address_infos['id_country'])
|
||||
{
|
||||
if ($address_infos['id_country']) {
|
||||
$id_country = (int)($address_infos['id_country']);
|
||||
$id_state = (int)$address_infos['id_state'];
|
||||
$id_county = (int)County::getIdCountyByZipCode($address_infos['id_state'], $address_infos['postcode']);
|
||||
}
|
||||
|
||||
if (!empty($address_infos['vat_number']) AND $address_infos['id_country'] != Configuration::get('VATNUMBER_COUNTRY') AND Configuration::get('VATNUMBER_MANAGEMENT'))
|
||||
if (!empty($address_infos['vat_number']) AND $address_infos['id_country'] != Configuration::get('VATNUMBER_COUNTRY') AND Configuration::get('VATNUMBER_MANAGEMENT')) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ($rate = Tax::getProductTaxRateViaRules((int)$id_product, (int)$id_country, (int)$id_state, (int)$id_county))
|
||||
if ($rate = Tax::getProductTaxRateViaRules((int)$id_product, (int)$id_country, (int)$id_state, (int)$id_county)) {
|
||||
return $rate;
|
||||
}
|
||||
|
||||
return $rate;
|
||||
}
|
||||
|
@ -34,6 +34,9 @@ function __autoload($className)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (function_exists('MathCaptcha\mathcaptchaAutoload') && MathCaptcha\mathcaptchaAutoload($className)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$className = str_replace(chr(0), '', $className);
|
||||
$classDir = dirname(__FILE__).'/../classes/';
|
||||
@ -42,24 +45,23 @@ function __autoload($className)
|
||||
$file_in_classes = file_exists($classDir.$className.'.php');
|
||||
|
||||
// This is a Core class and its name is the same as its declared name
|
||||
if (substr($className, -4) == 'Core')
|
||||
if (substr($className, -4) == 'Core') {
|
||||
require_once($classDir.substr($className, 0, -4).'.php');
|
||||
else
|
||||
{
|
||||
if ($file_in_override && $file_in_classes)
|
||||
{
|
||||
}
|
||||
else {
|
||||
if ($file_in_override && $file_in_classes) {
|
||||
require_once($classDir.str_replace(chr(0), '', $className).'.php');
|
||||
require_once($overrideDir.$className.'.php');
|
||||
}
|
||||
elseif (!$file_in_override && $file_in_classes)
|
||||
{
|
||||
elseif (!$file_in_override && $file_in_classes) {
|
||||
require_once($classDir.str_replace(chr(0), '', $className).'.php');
|
||||
$classInfos = new ReflectionClass($className.((interface_exists($className, false) or class_exists($className, false)) ? '' : 'Core'));
|
||||
if (!$classInfos->isInterface() && substr($classInfos->name, -4) == 'Core')
|
||||
eval(($classInfos->isAbstract() ? 'abstract ' : '').'class '.$className.' extends '.$className.'Core {}');
|
||||
}
|
||||
elseif ($file_in_override && !$file_in_classes)
|
||||
elseif ($file_in_override && !$file_in_classes) {
|
||||
require_once($overrideDir.$className.'.php');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,22 +35,28 @@ class PasswordControllerCore extends FrontController
|
||||
{
|
||||
parent::process();
|
||||
|
||||
if (Tools::isSubmit('email'))
|
||||
{
|
||||
if (!($email = Tools::getValue('email')) OR !Validate::isEmail($email))
|
||||
// Check User Agent - no bot
|
||||
$userAgent = $_SERVER['HTTP_USER_AGENT'];
|
||||
if (strstr(strtolower($userAgent), 'bot')) {
|
||||
$this->errors[] = Tools::displayError("Who are you ?");
|
||||
}
|
||||
|
||||
if (empty($this->errors)) {
|
||||
if (Tools::isSubmit('email')) {
|
||||
if (!($email = Tools::getValue('email')) OR !Validate::isEmail($email)) {
|
||||
$this->errors[] = Tools::displayError('Invalid e-mail address');
|
||||
else
|
||||
{
|
||||
}
|
||||
else {
|
||||
$customer = new Customer();
|
||||
$customer->getByemail($email);
|
||||
if (!Validate::isLoadedObject($customer))
|
||||
if (!Validate::isLoadedObject($customer)) {
|
||||
$this->errors[] = Tools::displayError('There is no account registered to this e-mail address.');
|
||||
else
|
||||
{
|
||||
if ((strtotime($customer->last_passwd_gen.'+'.(int)($min_time = Configuration::get('PS_PASSWD_TIME_FRONT')).' minutes') - time()) > 0)
|
||||
}
|
||||
else {
|
||||
if ((strtotime($customer->last_passwd_gen.'+'.(int)($min_time = Configuration::get('PS_PASSWD_TIME_FRONT')).' minutes') - time()) > 0) {
|
||||
$this->errors[] = Tools::displayError('You can regenerate your password only every').' '.(int)($min_time).' '.Tools::displayError('minute(s)');
|
||||
else
|
||||
{
|
||||
}
|
||||
else {
|
||||
if (Mail::Send((int)(self::$cookie->id_lang), 'password_query', Mail::l('Password query confirmation'),
|
||||
array('{email}' => $customer->email,
|
||||
'{lastname}' => $customer->lastname,
|
||||
@ -65,17 +71,15 @@ class PasswordControllerCore extends FrontController
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif (($token = Tools::getValue('token')) && ($id_customer = (int)(Tools::getValue('id_customer'))))
|
||||
{
|
||||
elseif (($token = Tools::getValue('token')) && ($id_customer = (int)(Tools::getValue('id_customer')))) {
|
||||
$email = Db::getInstance()->getValue('SELECT `email` FROM '._DB_PREFIX_.'customer c WHERE c.`secure_key` = \''.pSQL($token).'\' AND c.id_customer = '.(int)$id_customer);
|
||||
if ($email)
|
||||
{
|
||||
if ($email) {
|
||||
$customer = new Customer();
|
||||
$customer->getByemail($email);
|
||||
if ((strtotime($customer->last_passwd_gen.'+'.(int)($min_time = Configuration::get('PS_PASSWD_TIME_FRONT')).' minutes') - time()) > 0)
|
||||
if ((strtotime($customer->last_passwd_gen.'+'.(int)($min_time = Configuration::get('PS_PASSWD_TIME_FRONT')).' minutes') - time()) > 0) {
|
||||
Tools::redirect('authentication.php?error_regen_pwd');
|
||||
else
|
||||
{
|
||||
}
|
||||
else {
|
||||
$customer->passwd = Tools::encrypt($password = Tools::passwdGen((int)MIN_PASSWD_LENGTH,'RANDOM'));
|
||||
$customer->last_passwd_gen = date('Y-m-d H:i:s', time());
|
||||
if ($customer->update())
|
||||
@ -95,12 +99,15 @@ class PasswordControllerCore extends FrontController
|
||||
$this->errors[] = Tools::displayError('An error occurred with your account and your new password cannot be sent to your e-mail. Please report your problem using the contact form.');
|
||||
}
|
||||
}
|
||||
else
|
||||
else {
|
||||
$this->errors[] = Tools::displayError('We cannot regenerate your password with the data you submitted');
|
||||
}
|
||||
elseif (($token = Tools::getValue('token')) || ($id_customer = Tools::getValue('id_customer')))
|
||||
}
|
||||
elseif (($token = Tools::getValue('token')) || ($id_customer = Tools::getValue('id_customer'))) {
|
||||
$this->errors[] = Tools::displayError('We cannot regenerate your password with the data you submitted');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function displayContent()
|
||||
{
|
||||
|
@ -40,7 +40,7 @@
|
||||
<br /><br /><br />
|
||||
El depósito del paquete debe hacerse en uno de los 4 500 Puntos de Recogida® de España.
|
||||
<br />
|
||||
Encuentre la lista de puntos de recogida cerca de su casa haciendo <a href="http://www.puntopack.es/buscar-el-punto-pack-más-cercano/" target="_blank" style="color: #5082f5; text-decoration: none;">click aquí</a>
|
||||
Encuentre la lista de puntos de recogida cerca de su casa haciendo <a href="https://www.puntopack.es/buscar-el-punto-pack-mas-cercano/" target="_blank" style="color: #5082f5; text-decoration: none;">click aquí</a>
|
||||
<br />
|
||||
El comerciante le entregará un comprobante que deberá conservar para justificar el depósito en caso de ser necesario.
|
||||
</td>
|
||||
|
@ -24,7 +24,7 @@ Pegue la etiqueta proporcionada por Mondial Relay en una de las caras visibles d
|
||||
El depósito del paquete debe hacerse en uno de los 4 500 Puntos de Recogida de España.
|
||||
Encuentre la lista de puntos de recogida cerca de su casa haciendo click aquí:
|
||||
|
||||
http://www.puntopack.es/buscar-el-punto-pack-más-cercano/
|
||||
https://www.puntopack.es/buscar-el-punto-pack-mas-cercano/
|
||||
|
||||
El comerciante le entregará un comprobante que deberá conservar para justificar el depósito
|
||||
en caso de ser necesario.
|
||||
|
@ -24,7 +24,7 @@
|
||||
Nous vous informons que vous avez dans votre compte un crédit de fidélité non utilisé suite à votre commande {commandenum}.
|
||||
Celui-ci expire dans 1 mois.
|
||||
|
||||
Venez nous rendre visite sur le site : https://wwww.bebeboutik.com et profiter de nos offres jusqu'à -70% !
|
||||
Venez nous rendre visite sur le site : https://www.bebeboutik.com et profiter de nos offres jusqu'à -70% !
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -3,6 +3,6 @@ Bonjour {firstname} {lastname},
|
||||
Nous vous informons que vous avez dans votre compte un crédit de fidélité non utilisé suite à votre commande {commandenum}.
|
||||
Celui-ci expire dans 1 mois.
|
||||
|
||||
Venez nous rendre visite sur le site : https://wwww.bebeboutik.com et profiter de nos offres jusqu'à -70% !
|
||||
Venez nous rendre visite sur le site : https://www.bebeboutik.com et profiter de nos offres jusqu'à -70% !
|
||||
|
||||
L'équipe Bébé Boutik,
|
16
modules/ant_support_form/captcha.php
Normal file
16
modules/ant_support_form/captcha.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
require_once dirname(__FILE__).'/../../config/config.inc.php';
|
||||
require_once dirname(__FILE__).'/../../init.php';
|
||||
|
||||
session_start();
|
||||
|
||||
$mathCaptcha = new MathCaptcha\MathCaptcha();
|
||||
|
||||
try {
|
||||
$mathCaptcha->generate();
|
||||
$mathCaptcha->output();
|
||||
}
|
||||
catch ( MathCaptcha\MathCaptchaException $e ) {
|
||||
// Here you normally log the error, and you can output an error image
|
||||
// to notify the user that something went wrong, if you want.
|
||||
}
|
@ -1,7 +1,10 @@
|
||||
<?php
|
||||
require_once(dirname(__FILE__).'/../../config/config.inc.php');
|
||||
require_once(dirname(__FILE__).'/../../init.php');
|
||||
require_once(dirname(__FILE__).'/Reason.php');
|
||||
require_once dirname(__FILE__).'/../../config/config.inc.php';
|
||||
require_once dirname(__FILE__).'/../../init.php';
|
||||
require_once dirname(__FILE__).'/Reason.php';
|
||||
|
||||
session_start();
|
||||
|
||||
$controller->preProcess();
|
||||
|
||||
$langs = Language::getLanguages();
|
||||
@ -52,12 +55,18 @@ if (Tools::isSubmit('submitMessage')) {
|
||||
$fileAttachment['mime'] = $_FILES['fileUpload']['type'];
|
||||
}
|
||||
|
||||
$mathCaptcha = new MathCaptcha\MathCaptcha();
|
||||
$captcha_ans = Tools::getValue('cans');
|
||||
$message = Tools::htmlentitiesUTF8(Tools::getValue('message'));
|
||||
|
||||
if (Tools::getValue('email2') != '') {
|
||||
$this->errors[] = Tools::displayError('Invalid');
|
||||
$errors[] = Tools::displayError('Invalid');
|
||||
}
|
||||
elseif ($mathCaptcha->check($captcha_ans) !== true) {
|
||||
$errors[] = Tools::displayError('For security reasons, thank you to solve the addition to validate the sending of your message');
|
||||
}
|
||||
elseif (preg_match("/\p{Han}+/u", $message)) {
|
||||
$this->errors[] = Tools::displayError('Invalid message');
|
||||
$errors[] = Tools::displayError('Invalid message');
|
||||
}
|
||||
elseif (!($from = trim(Tools::getValue('from'))) OR !Validate::isEmail($from)) {
|
||||
$errors[] = Tools::displayError('Invalid e-mail address');
|
||||
|
@ -176,10 +176,13 @@
|
||||
<label for="message">{l s='Message' mod='ant_support_form'}</label>
|
||||
<textarea id="message" name="message">{if isset($message)}{$message|escape:'htmlall':'UTF-8'|stripslashes}{/if}</textarea>
|
||||
</p>
|
||||
<p>
|
||||
<img src="{$base_dir_ssl}c.png" alt="" style="vertical-align:middle;">
|
||||
<input type="text" name="cans" style="width:40px;padding:0;">
|
||||
</p>
|
||||
<p class="submit">
|
||||
<input type="submit" name="submitMessage" id="submitMessage" value="{l s='Send' mod='ant_support_form'}" class="button_large" onclick="$(this).hide();" />
|
||||
</p>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
|
Binary file not shown.
@ -1 +0,0 @@
|
||||
default
|
2
modules/blockauth/.hg/cache/branchheads
vendored
2
modules/blockauth/.hg/cache/branchheads
vendored
@ -1,2 +0,0 @@
|
||||
22140c622301271e8694549e29e360916921e485 0
|
||||
22140c622301271e8694549e29e360916921e485 default
|
2
modules/blockauth/.hg/cache/tags
vendored
2
modules/blockauth/.hg/cache/tags
vendored
@ -1,2 +0,0 @@
|
||||
0 22140c622301271e8694549e29e360916921e485
|
||||
|
Binary file not shown.
@ -1,2 +0,0 @@
|
||||
[paths]
|
||||
default = ssh://ewen@localhost//hg/blockauth
|
@ -1,4 +0,0 @@
|
||||
revlogv1
|
||||
fncache
|
||||
store
|
||||
dotencode
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,5 +0,0 @@
|
||||
data/logo.gif.i
|
||||
data/config.xml.i
|
||||
data/fr.php.i
|
||||
data/blockauth.php.i
|
||||
data/blockauth.tpl.i
|
Binary file not shown.
@ -1 +0,0 @@
|
||||
default
|
@ -1,3 +0,0 @@
|
||||
0
|
||||
pull
|
||||
ssh://ewen@localhost//hg/blockauth
|
Binary file not shown.
@ -1 +0,0 @@
|
||||
default
|
2
modules/blockcartex/.hg/cache/branchheads
vendored
2
modules/blockcartex/.hg/cache/branchheads
vendored
@ -1,2 +0,0 @@
|
||||
55a547b9200e199cbe52370d3ee590a2a8237c03 2
|
||||
55a547b9200e199cbe52370d3ee590a2a8237c03 default
|
2
modules/blockcartex/.hg/cache/tags
vendored
2
modules/blockcartex/.hg/cache/tags
vendored
@ -1,2 +0,0 @@
|
||||
2 55a547b9200e199cbe52370d3ee590a2a8237c03
|
||||
|
Binary file not shown.
@ -1,2 +0,0 @@
|
||||
[paths]
|
||||
default = ssh://ewen@localhost//hg/blockcartex
|
@ -1,4 +0,0 @@
|
||||
revlogv1
|
||||
fncache
|
||||
store
|
||||
dotencode
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,16 +0,0 @@
|
||||
data/img/index.php.i
|
||||
data/index.php.i
|
||||
data/config.xml.i
|
||||
data/img/icon/delete.gif.i
|
||||
data/img/icon/index.php.i
|
||||
data/img/icon/basket_go.png.i
|
||||
data/blockcart-ajax.php.i
|
||||
data/img/icon/checkout.png.i
|
||||
data/blockcart-set-collapse.php.i
|
||||
data/blockcartex.php.i
|
||||
data/fr.php.i
|
||||
data/logo.gif.i
|
||||
data/ajax-cart.js.i
|
||||
data/blockcart.tpl.i
|
||||
data/img/icon/basket.png.i
|
||||
data/blockcart-json.tpl.i
|
Binary file not shown.
@ -1 +0,0 @@
|
||||
default
|
@ -1,3 +0,0 @@
|
||||
0
|
||||
pull
|
||||
ssh://ewen@localhost//hg/blockcartex
|
Binary file not shown.
@ -1 +0,0 @@
|
||||
default
|
2
modules/blocklogo/.hg/cache/branchheads
vendored
2
modules/blocklogo/.hg/cache/branchheads
vendored
@ -1,2 +0,0 @@
|
||||
a0b6701fd7c40b9759a83fc8e78566aa84a678e2 0
|
||||
a0b6701fd7c40b9759a83fc8e78566aa84a678e2 default
|
2
modules/blocklogo/.hg/cache/tags
vendored
2
modules/blocklogo/.hg/cache/tags
vendored
@ -1,2 +0,0 @@
|
||||
0 a0b6701fd7c40b9759a83fc8e78566aa84a678e2
|
||||
|
Binary file not shown.
@ -1,2 +0,0 @@
|
||||
[paths]
|
||||
default = ssh://ewen@localhost//hg/blocklogo
|
@ -1,4 +0,0 @@
|
||||
revlogv1
|
||||
fncache
|
||||
store
|
||||
dotencode
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,7 +0,0 @@
|
||||
data/index.php.i
|
||||
data/config.xml.i
|
||||
data/logo.gif.i
|
||||
data/en.php.i
|
||||
data/blocklogo.php.i
|
||||
data/blocklogo.tpl.i
|
||||
data/fr.php.i
|
Binary file not shown.
@ -1 +0,0 @@
|
||||
default
|
@ -1,3 +0,0 @@
|
||||
0
|
||||
pull
|
||||
ssh://ewen@localhost//hg/blocklogo
|
@ -537,7 +537,10 @@ class AdminBulkUpdate extends AdminTab {
|
||||
}
|
||||
|
||||
$output .= '<p class="conf">'.$this->l('Products updated').'</p>';
|
||||
} elseif(Tools::isSubmit('submitUploadPrices')) {
|
||||
}
|
||||
// MAJ Rapide produits (Reduction, Prix d'achat HT, Prix d'achat TTC)
|
||||
elseif(Tools::isSubmit('submitUploadPrices'))
|
||||
{
|
||||
$f = fopen($_FILES['csvfile']['tmp_name'], 'r');
|
||||
fgetcsv($f, 0, ';');
|
||||
|
||||
@ -552,8 +555,9 @@ class AdminBulkUpdate extends AdminTab {
|
||||
|
||||
$products[] = (int) $line[0];
|
||||
}
|
||||
} elseif(Tools::getValue('price_process') == 3
|
||||
|| Tools::getValue('price_process') == 4){
|
||||
}
|
||||
// Prix d'achat HT || Prix public TTC
|
||||
elseif (Tools::getValue('price_process') == 3 || Tools::getValue('price_process') == 4) {
|
||||
while ($line = fgetcsv($f, 0, ';')) {
|
||||
if (empty($line[0])) {
|
||||
continue;
|
||||
@ -564,7 +568,9 @@ class AdminBulkUpdate extends AdminTab {
|
||||
$line[1]
|
||||
);
|
||||
}
|
||||
}else {
|
||||
}
|
||||
// Reduction
|
||||
else {
|
||||
while ($line = fgetcsv($f, 0, ';')) {
|
||||
if (empty($line[0])) {
|
||||
continue;
|
||||
@ -585,14 +591,15 @@ class AdminBulkUpdate extends AdminTab {
|
||||
|
||||
fclose($f);
|
||||
|
||||
if(Tools::getValue('price_process') == 1
|
||||
|| Tools::getValue('price_process') == 2) {
|
||||
// Reduction || ...
|
||||
if (Tools::getValue('price_process') == 1 || Tools::getValue('price_process') == 2) {
|
||||
Db::getInstance()->ExecuteS('
|
||||
DELETE FROM `'._DB_PREFIX_.'specific_price`
|
||||
WHERE `id_product` IN ('.implode(', ', $products).')
|
||||
');
|
||||
}
|
||||
|
||||
// Reduction
|
||||
if (Tools::getValue('price_process') == 1) {
|
||||
foreach ($prices as $price) {
|
||||
if ((int) $price[0] != 0) {
|
||||
@ -617,6 +624,8 @@ class AdminBulkUpdate extends AdminTab {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Prix d'achat HT
|
||||
if (Tools::getValue('price_process') == 3) {
|
||||
foreach ($prices as $price) {
|
||||
if ((int) $price[0] != 0){
|
||||
@ -631,11 +640,21 @@ class AdminBulkUpdate extends AdminTab {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Prix public TTC
|
||||
if (Tools::getValue('price_process') == 4) {
|
||||
foreach ($prices as $price) {
|
||||
if ((int) $price[0] != 0){
|
||||
$price[1] = str_replace(',', '.', $price[1]);
|
||||
$price_ht = floatval($price[1] / 1.20);
|
||||
// Find Tax for this id product
|
||||
// product.id_tax_rules_group => tax_rules_group => tax_rule => tax.rate
|
||||
$tax = new Tax();
|
||||
$taxValue = $tax->getProductTaxRate((int)$price[0]);
|
||||
if ($taxValue == 0) {
|
||||
$taxValue = 20;
|
||||
}
|
||||
|
||||
$price_ht = floatval($price[1] / (1 + $taxValue / 100) );
|
||||
Db::getInstance()->ExecuteS('
|
||||
UPDATE `'._DB_PREFIX_.'product`
|
||||
SET price = '. (float)$price_ht .'
|
||||
@ -647,7 +666,8 @@ class AdminBulkUpdate extends AdminTab {
|
||||
}
|
||||
|
||||
$output .= '<p class="conf">'.$this->l('Products updated').'</p>';
|
||||
} elseif(Tools::isSubmit('submitUploadProductDescriptions')) {
|
||||
}
|
||||
elseif (Tools::isSubmit('submitUploadProductDescriptions')) {
|
||||
$id_lang = Tools::getValue('description_process');
|
||||
$f = fopen($_FILES['csvfile']['tmp_name'], 'r');
|
||||
fgetcsv($f, 0, ';');
|
||||
@ -675,7 +695,8 @@ class AdminBulkUpdate extends AdminTab {
|
||||
|
||||
fclose($f);
|
||||
$output .= '<p class="conf">'.$this->l('Products updated').'</p>';
|
||||
} elseif(Tools::isSubmit('submitUploadCombinations')) {
|
||||
}
|
||||
elseif (Tools::isSubmit('submitUploadCombinations')) {
|
||||
$f = fopen($_FILES['csvfile']['tmp_name'], 'r');
|
||||
fgetcsv($f, 0, ';');
|
||||
|
||||
|
Binary file not shown.
@ -1 +0,0 @@
|
||||
default
|
2
modules/categoryscroll/.hg/cache/branchheads
vendored
2
modules/categoryscroll/.hg/cache/branchheads
vendored
@ -1,2 +0,0 @@
|
||||
613b481451e73594f52e08e2a35120c98652d63c 3
|
||||
613b481451e73594f52e08e2a35120c98652d63c default
|
2
modules/categoryscroll/.hg/cache/tags
vendored
2
modules/categoryscroll/.hg/cache/tags
vendored
@ -1,2 +0,0 @@
|
||||
3 613b481451e73594f52e08e2a35120c98652d63c
|
||||
|
Binary file not shown.
@ -1,2 +0,0 @@
|
||||
[paths]
|
||||
default = ssh://ewen@localhost//hg/categoryscroll
|
@ -1,4 +0,0 @@
|
||||
revlogv1
|
||||
fncache
|
||||
store
|
||||
dotencode
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user