push prod

This commit is contained in:
Srv Bebeboutik 2016-02-24 16:23:27 +01:00
parent fc61e2ed3a
commit 0918b1e26d
10 changed files with 38 additions and 211 deletions

View File

@ -604,6 +604,12 @@ class AdminImport extends AdminTab
// && $info['weight'] != "0") {
// $product->weight = 0.2;
// }
$iso_lang = trim(Tools::getValue('iso_lang'));
if ($iso_lang == 'fr') {
if (empty($info['weight']) && $info['weight'] != "0") {
$product->weight = 0.2;
}
}
if ((int)$product->id_tax_rules_group != 0)
{

View File

@ -178,7 +178,7 @@ class AdminProducts extends AdminTab
*/
public function postProcess($token = null)
{
if(Tools::isSubmit('editProduct')){
if (Tools::isSubmit('editProduct')) {
global $cookie, $currentIndex;
$products = Tools::getValue('productBox');
$id_lang_fast = Tools::getValue('id_lang_fast');
@ -188,7 +188,7 @@ class AdminProducts extends AdminTab
Tools::redirectAdmin($redirect . "&id_product=". json_encode($products)."&id_lang_fast=".(int) $id_lang_fast."&token=". $token_redirect);
}
if(Tools::isSubmit('addCategoryProduct')){
if (Tools::isSubmit('addCategoryProduct')) {
global $cookie, $currentIndex;
$id_category = Tools::getValue('id_category');
@ -209,11 +209,19 @@ class AdminProducts extends AdminTab
}
}
$sale = false;
foreach ($products as $key => $product) {
if (Validate::isLoadedObject($product = new Product((int)$product ) ))
{
// adding - ticket #8267
if (!$sale) {
include_once(_PS_ROOT_DIR_.'/modules/privatesales/Sale.php');
$sale = Sale::getSaleFromCategory((int) $id_category);
}
if($keep_category == 1){
Db::getInstance()->delete( _DB_PREFIX_.'category_product', 'id_product = ' . $product->id);
/*Db::getInstance()->delete( _DB_PREFIX_.'category_product', 'id_product = ' . $product->id);*/
Db::getInstance()->delete( _DB_PREFIX_.'category_product', 'id_product = ' . $product->id . ' AND id_category != ' . $sale->id_category);
}
$categories_product = $product->getCategories();
@ -1668,13 +1676,14 @@ class AdminProducts extends AdminTab
';
echo '<h3>Choisir la catégorie à associer :</h3>';
if ($array_categories['id_category'] != $id_category) {
// adding comment - ticket #8267
/*if ($array_categories['id_category'] != $id_category) {
echo '<input type="checkbox" id="cat_'. $array_categories['id_category'] .'" name="id_category_paste[]" value="'. $array_categories['id_category'] .'">';
echo ' <label for="cat_'. $array_categories['id_category'] .'" style="font-weight:normal; float:none">' . $array_categories['name'] . '</label>';
} else {
echo '<input type="checkbox" id="cat_'. $array_categories['id_category'] .'" name="id_category_paste[]" checked value="'. $array_categories['id_category'] .'">';
echo ' <label for="cat_'. $array_categories['id_category'] .'" style="font-weight:normal; float:none">' . $array_categories['name'] . '</label>';
}
}*/
if ($array_categories['childrens']) {
foreach ($array_categories['childrens'] as $key => $catchild) {
@ -1699,7 +1708,9 @@ class AdminProducts extends AdminTab
}
}
}
}
}/*else {
echo '<p> Il n\'y a pas de sous catégorie</p>';
}*/
// foreach($categories_vp as $category) {
// if($category['id_category'] != $id_category){

View File

@ -1,199 +0,0 @@
<?php
/*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision: 8937 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
/* Debug only */
@ini_set('display_errors', 'off');
define('_PS_DEBUG_SQL_', false);
$start_time = microtime(true);
/* Compatibility warning */
define('_PS_DISPLAY_COMPATIBILITY_WARNING_', false);
/* SSL configuration */
define('_PS_SSL_PORT_', 443);
/* Improve PHP configuration to prevent issues */
ini_set('upload_max_filesize', '100M');
ini_set('default_charset', 'utf-8');
ini_set('magic_quotes_runtime', 0);
// correct Apache charset (except if it's too late
if (!headers_sent())
header('Content-Type: text/html; charset=utf-8');
/* No settings file? goto installer...*/
if (!file_exists(dirname(__FILE__).'/settings.inc.php'))
{
$dir = ((is_dir($_SERVER['REQUEST_URI']) OR substr($_SERVER['REQUEST_URI'], -1) == '/') ? $_SERVER['REQUEST_URI'] : dirname($_SERVER['REQUEST_URI']).'/');
if (!file_exists(dirname(__FILE__).'/../install'))
die('Error: \'install\' directory is missing');
header('Location: install/');
exit;
}
require_once(dirname(__FILE__).'/settings.inc.php');
define('_PS_OPEN_SHOP_', 0);
/* Include all defines */
require_once(dirname(__FILE__).'/defines.inc.php');
if (!defined('_PS_MAGIC_QUOTES_GPC_'))
define('_PS_MAGIC_QUOTES_GPC_', get_magic_quotes_gpc());
if (!defined('_PS_MODULE_DIR_'))
define('_PS_MODULE_DIR_', _PS_ROOT_DIR_.'/modules/');
if (!defined('_PS_MYSQL_REAL_ESCAPE_STRING_'))
define('_PS_MYSQL_REAL_ESCAPE_STRING_', function_exists('mysql_real_escape_string'));
/* Autoload */
require_once(dirname(__FILE__).'/autoload.php');
/* Redefine REQUEST_URI if empty (on some webservers...) */
if (!isset($_SERVER['REQUEST_URI']) OR empty($_SERVER['REQUEST_URI']))
{
if (substr($_SERVER['SCRIPT_NAME'], -9) == 'index.php' && empty($_SERVER['QUERY_STRING']))
$_SERVER['REQUEST_URI'] = dirname($_SERVER['SCRIPT_NAME']).'/';
else
{
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
if (isset($_SERVER['QUERY_STRING']) AND !empty($_SERVER['QUERY_STRING']))
$_SERVER['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];
}
}
/* Trying to redefine HTTP_HOST if empty (on some webservers...) */
if (!isset($_SERVER['HTTP_HOST']) OR empty($_SERVER['HTTP_HOST']))
$_SERVER['HTTP_HOST'] = @getenv('HTTP_HOST');
/* aliases */
function p($var) {
return (Tools::p($var));
}
function d($var) {
Tools::d($var);
}
function ppp($var) {
return (Tools::p($var));
}
function ddd($var) {
Tools::d($var);
}
global $_MODULES;
$_MODULES = array();
/* Load all configuration keys */
Configuration::loadConfiguration();
/* Load all language definitions */
Language::loadLanguages();
/* Define order state */
// DEPRECATED : these defines are going to be deleted on 1.6 version of Prestashop
// USE : Configuration::get() method in order to getting the id of order state
define('_PS_OS_CHEQUE_', Configuration::get('PS_OS_CHEQUE'));
define('_PS_OS_PAYMENT_', Configuration::get('PS_OS_PAYMENT'));
define('_PS_OS_PREPARATION_', Configuration::get('PS_OS_PREPARATION'));
define('_PS_OS_SHIPPING_', Configuration::get('PS_OS_SHIPPING'));
define('_PS_OS_DELIVERED_', Configuration::get('PS_OS_DELIVERED'));
define('_PS_OS_CANCELED_', Configuration::get('PS_OS_CANCELED'));
define('_PS_OS_REFUND_', Configuration::get('PS_OS_REFUND'));
define('_PS_OS_ERROR_', Configuration::get('PS_OS_ERROR'));
define('_PS_OS_OUTOFSTOCK_', Configuration::get('PS_OS_OUTOFSTOCK'));
define('_PS_OS_BANKWIRE_', Configuration::get('PS_OS_BANKWIRE'));
define('_PS_OS_PAYPAL_', Configuration::get('PS_OS_PAYPAL'));
define('_PS_OS_WS_PAYMENT_', Configuration::get('PS_OS_WS_PAYMENT'));
/* It is not safe to rely on the system's timezone settings, and this would generate a PHP Strict Standards notice. */
if (function_exists('date_default_timezone_set'))
@date_default_timezone_set(Configuration::get('PS_TIMEZONE'));
/* Smarty */
require_once(dirname(__FILE__).'/smarty.config.inc.php');
/* Possible value are true, false, 'URL'
(for 'URL' append SMARTY_DEBUG as a parameter to the url)
default is false for production environment */
define('SMARTY_DEBUG_CONSOLE', false);
// INTERNATIONALISATION
global $site_versions, $site_version;
$site_versions = array('com', 'es','local'/*'it'*/);
//$domain_chunks = explode('.bebeboutik.', strtolower($_SERVER['HTTP_HOST']));
$domain_chunks = explode('bebeboutik.', strtolower($_SERVER['HTTP_HOST']));
if(count($domain_chunks) !== 2) {
/*$extensions = explode('.', $domain_chunks[0]);
if(in_array($extensions[1], $site_versions)) {
header('Location: http://www.bebeboutik.'.$extensions[1]);
exit;
} else {*/
header('Location: http://www.bebeboutik.com');
exit;
/*}*/
}
$cookie_version = (
isset($_COOKIE['site_version']) && in_array(strtolower($_COOKIE['site_version']), $site_versions)
? strtolower($_COOKIE['site_version'])
: FALSE
);
//if(!in_array($domain_chunks[0], array('www', 'm',''/*'dev'*/))
// || ($domain_chunks[1] !== 'com' && !in_array($domain_chunks[1], $site_versions))
// || ($domain_chunks[1] === 'com' && $domain_chunks[0] !== 'bo' && $cookie_version !== FALSE)) {
// /*
// * Security check in case of a misconfigured web server
// * If the selected domain is not allowed, redirect to default site
// */
// header('Location: http://'
// .(in_array($domain_chunks[0], array('www', 'm', 'bo'))? $domain_chunks[0]: 'www')
// .'.bebeboutik.'
// .($cookie_version
// ? $cookie_version
// : (in_array($domain_chunks[1], $site_versions)
// ? $domain_chunks[1]
// : 'com'
// )
// )
// .$_SERVER['REQUEST_URI']
// );
// exit;
//}
$_COOKIE['site_version'] = $domain_chunks[1];
$_GET['isolang'] = $domain_chunks[1];
$site_version = $domain_chunks[1];
if ($site_version == 'com' || $site_version == 'local') {
$site_version_front = 'fr';
} else {
$site_version_front = $site_version;
}
if(isset($site_version)) {
global $smarty;
$smarty->assign('site_version', $site_version);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,12 +1,17 @@
<?php
if(isset($_SERVER['REMOTE_ADDR'])) exit;
$_SERVER['SERVER_PORT'] = 80;
$_SERVER['HTTP_HOST'] = 'www.bebeboutik.com';
include(dirname(__FILE__).'/../../config/config.inc.php');
include(dirname(__FILE__).'/Sale.php');
$sales = Sale::getSales(TRUE, NULL, NULL, FALSE);
$file = fopen('lastupdate.txt', 'w');
fwrite($file, date('Ymd His'));
fclose($file);
foreach($sales as $sale) {
$sale->end(TRUE);
}

View File

@ -0,0 +1 @@
20160224 162301

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -569,6 +569,8 @@ $_LANG['product-list_2d0f6b8300be19cf35e89e66f0677f95'] = 'Añadir a la cesta';
$_LANG['product-list_b55197a49e8c4cd8c314bc2aa39d6feb'] = 'Agotado';
$_LANG['product-list_78945de8de090e90045d299651a68a9b'] = 'Disponible';
$_LANG['product-list_4351cfebe4b61d8aa5efa1d020710005'] = 'Ver';
$_LANG['product-list_4391a5fd21c767037fbb3bcad0c1f595'] = 'Producto agotado';
$_LANG['product-list_763ea78c330dfb4adafcaf118747de76'] = 'Comprar expreso';
$_LANG['product-list_77798ad342555ffa834758a2aaa6fc11'] = 'Comparar';
$_LANG['product-sort_cfab1ba8c67c7c838db98d666f02a132'] = '--';
$_LANG['product-sort_b3c4afbd8ec3b1e28710fcbdc8cc0549'] = 'Precio: más baratos primero';