
Le Sultan
Members-
Posts
46 -
Joined
-
Last visited
Profile Information
-
Activity
Other
Recent Profile Visitors
212 profile views
Le Sultan's Achievements
-
Bonsoir j'ai trouvé peut être une solution à tno problème , je l'ai testé et cela fonctionne sur 1.6.011. Déjà vas dans "préférences et paramètres généraux" et autorise les iframs. Dans le pack office dans fa fiche produit"information" .Utilise le champs "résumé" pour y intégrer du code HTML avec la fonction "code source" Intègre ce code : <!-- // FLASH // --> <p style="text-align: center;">Description du produit <object id="player1" type="application/x-shockwave-flash" data="http://localhost/le nom de ton théme/animation3.swf"><param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="internal" /></object></p> <!-- // FIN DU FLASH // --> Dans global css de ton thème tu colle l'exemple là et à modifier comme tu veux object#player1 { float:left; width: 99%; height: 100px; border: 1px solid #ffc463; Maintenant tu peux télécharger une animation pour chaque produit et créer plusieurs dimension d'animation en donnant un nom diffèrent à l'objet exemple:object#player2 Je pense que c'est cela que tu recherche
-
Super merci beaucoup Solidarite cela fonctionne
-
Bonjour et merci Solidarité peux tu me faire parvenir le fichier identily.tpl "1.6.011" modifié, car je crois qu'il me manque du code après un bug.Merci
-
Bonjour voici un petit exemple que j'ai installé dans les fichiers "product.tpl et product-list.tpl "de ton théme Attention je suis sur localhost donc tu dois faire des changement si tu es en local. Sur mon exemple j'ai crée deux animations flash : la première pour dire que j'ai encore du stock dépêchez vous la deuxième, il est trop tard il n'y a plus de stock Enfin tu peux réaliser autre chose,car c"est à toi à créer les fichiers SWF. Je suis sur 1.6.011 mais cela fonctionne pour les autres versions 1.6 Dans ton fichier 'product.tpl" de ton thème après les lignes suivante : <p id="pQuantityAvailable"{if $product->quantity <= 0} style="display: none;"{/if}> <span id="quantityAvailable">{$product->quantity|intval}</span> <span {if $product->quantity > 1} style="display: none;"{/if} id="quantityAvailableTxt">{l s='Item'}</span> <span {if $product->quantity == 1} style="display: none;"{/if} id="quantityAvailableTxtMultiple">{l s='Items'}</span> </p> {/if} Colle ce code: {if $product->quantity == 0} <!-- FLASH --> <embed align="middle" width="100%" height="50" src="http://localhost/seh11/animation.swf" quality="high" wmode="transparent"></embed> <!-- END FLASH --> {/if} {if $product->quantity > 0} <!-- FLASH --> <embed align="middle" width="100%" height="50" src="http://localhost/seh11/animation4.swf" quality="high" wmode="transparent"></embed> <!-- END FLASH --> {/if} Maintenant il suffit de remplacer "localhost et seh11" par tes références et renommer les fichiers "animation.swf4 et animation.swf" . N'oubli pas de coller dans la racine du site tes fichiers swf Voila tu peux faire la même chose dans le fichier "product-list.tpl" J'espère avoir été assez clair.
-
Bonjour Solidarite ,non je n'ai rien modifié ,j'ai simplement dupliqué le thème d'origine
-
Bonjour je suis sur 1.6.11 et le fichier identily.tpl n'est pas le même une idée ? Merci <div class="form-group"> <label> {l s='Date of Birth'} </label> <div class="row"> <div class="col-xs-4"> <select name="days" id="days" class="form-control"> <option value="">-</option> {foreach from=$days item=v} <option value="{$v}" {if ($sl_day == $v)}selected="selected"{/if}>{$v} </option> {/foreach} </select> </div> <div class="col-xs-4"> {* {l s='January'} {l s='February'} {l s='March'} {l s='April'} {l s='May'} {l s='June'} {l s='July'} {l s='August'} {l s='September'} {l s='October'} {l s='November'} {l s='December'} *} <select id="months" name="months" class="form-control"> <option value="">-</option> {foreach from=$months key=k item=v} <option value="{$k}" {if ($sl_month == $k)}selected="selected"{/if}>{l s=$v} </option> {/foreach} </select> </div> <div class="col-xs-4"> <select id="years" name="years" class="form-control"> <option value="">-</option> {foreach from=$years item=v} <option value="{$v}" {if ($sl_year == $v)}selected="selected"{/if}>{$v} </option> {/foreach} </select> </div> </div> </div>
-
Paramétrer dans le BO le module chèque
Le Sultan replied to Le Sultan's topic in PrestaShop pour les développeurs
bonsoir est merci de votre réponse mais pourriez vous m'aider d'avantage en me disant ou intégrer ce code car je suis perdu.Merci beaucoup -
Ajouter un bandeau "nouveau" sur les nouveaux produits
Le Sultan replied to geys's topic in PrestaShop pour les développeurs
Bonjour je suis éventuellement intéressé.Merci -
Paramétrer dans le BO le module chèque
Le Sultan replied to Le Sultan's topic in PrestaShop pour les développeurs
class Cheque1 extends PaymentModule { private $_html = ''; private $_postErrors = array(); public $cheque1Name; public $address; public $extra_mail_vars; public $sommeMini; public $sommeMaxi; public function __construct() { $this->name = 'cheque1'; $this->tab = 'payments_gateways'; $this->version = '2.5.4'; $this->author = 'PrestaShop'; $this->controllers = array('payment', 'validation'); $this->currencies = true; $this->currencies_mode = 'checkbox'; $config = Configuration::getMultiple(array('CHEQUE1_NAME', 'CHEQUE1_ADDRESS','somme_Mini','somme_Maxi')); if (isset($config['CHEQUE1_NAME'])) $this->cheque1Name = $config['CHEQUE1_NAME']; if (isset($config['CHEQUE1_ADDRESS'])) $this->cheque1address = $config['CHEQUE1_ADDRESS']; if (isset($config['somme_Mini'])) $this->sommeMini = $config['somme_Mini']; if (isset($config['somme_Maxi'])) $this->sommeMaxi = $config['somme_Maxi']; $this->bootstrap = true; parent::__construct(); $this->displayName = $this->l('Payments by check'); $this->description = $this->l('This module allows you to accept payments by check.'); $this->confirmUninstall = $this->l('Are you sure you want to delete these details?'); if ((!isset($this->cheque1Name) || !isset($this->cheque1address) || empty($this->cheque1Name) || empty($this->cheque1address) || empty($this->sommeMini) || empty($this->sommeMaxi))) $this->warning = $this->l('The "Pay to the order of" and "Address" fields must be configured before using this module.'); if (!count(Currency::checkPaymentCurrencies($this->id))) $this->warning = $this->l('No currency has been set for this module.'); $this->extra_mail_vars = array( '{cheque1_name}' => Configuration::get('CHEQUE1_NAME'), '{cheque1_address}' => Configuration::get('CHEQUE1_ADDRESS'), '{cheque1_address_html}' => str_replace("\n", '<br />', Configuration::get('CHEQUE1_ADDRESS')) ); } public function install() { if (!parent::install() || !$this->registerHook('payment') || !$this->registerHook('paymentReturn')) return false; return true; } public function uninstall() { if (!Configuration::deleteByName('CHEQUE1_NAME') || !Configuration::deleteByName('CHEQUE1_ADDRESS') || !Configuration::deleteByName('somme_Mini') || !Configuration::deleteByName('somme_Maxi') || !parent::uninstall()) return false; return true; } private function _postValidation() { if (Tools::isSubmit('btnSubmit')) { if (!Tools::getValue('CHEQUE1_NAME')) $this->_postErrors[] = $this->l('The "Pay to the order of" field is required.'); elseif (!Tools::getValue('CHEQUE1_ADDRESS')) $this->_postErrors[] = $this->l('The "Address" field is required.'); } } private function _postProcess() { if (Tools::isSubmit('btnSubmit')) { Configuration::updateValue('CHEQUE1_NAME', Tools::getValue('CHEQUE1_NAME')); Configuration::updateValue('CHEQUE1_ADDRESS', Tools::getValue('CHEQUE1_ADDRESS')); Configuration::updateValue('somme_Mini', Tools::getValue('somme_Mini')); Configuration::updateValue('somme_Maxi', Tools::getValue('somme_Maxi')); } $this->_html .= $this->displayConfirmation($this->l('Settings updated')); } private function _displayCheque1() { return $this->display(__FILE__, 'infos.tpl'); } public function getContent() { $this->_html = ''; if (Tools::isSubmit('btnSubmit')) { $this->_postValidation(); if (!count($this->_postErrors)) $this->_postProcess(); else foreach ($this->_postErrors as $err) $this->_html .= $this->displayError($err); } $this->_html .= $this->_displayCheque1(); $this->_html .= $this->renderForm(); return $this->_html; } public function hookPayment($params) { if (!$this->active) return; if (!$this->checkCurrency($params['cart'])) return; if (($params['cart']->getOrderTotal(true,3))<=$this->sommeMini) return; if (($params['cart']->getOrderTotal())>=$this->sommeMaxi) return; { $this->smarty->assign(array( 'this_path' => $this->_path, 'this_path_cheque1' => $this->_path, 'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/' )); return $this->display(__FILE__, 'payment.tpl'); } } public function hookPaymentReturn($params) { if (!$this->active) return; $state = $params['objOrder']->getCurrentState(); if (in_array($state, array(Configuration::get('PS_OS_CHEQUE1'), Configuration::get('PS_OS_OUTOFSTOCK'), Configuration::get('PS_OS_OUTOFSTOCK_UNPAID')))) { $this->smarty->assign(array( 'total_to_pay' => Tools::displayPrice($params['total_to_pay'], $params['currencyObj'], false), 'cheque1Name' => $this->cheque1Name, 'cheque1Address' => Tools::nl2br($this->cheque1address), 'status' => 'ok', 'id_order' => $params['objOrder']->id, 'date_format' => $this->context->language->date_format_lite )); if (isset($params['objOrder']->reference) && !empty($params['objOrder']->reference)) $this->smarty->assign('reference', $params['objOrder']->reference); } else $this->smarty->assign('status', 'failed'); return $this->display(__FILE__, 'payment_return.tpl'); } public function checkCurrency($cart) { $currency_order = new Currency((int)($cart->id_currency)); $currencies_module = $this->getCurrency((int)$cart->id_currency); if (is_array($currencies_module)) foreach ($currencies_module as $currency_module) if ($currency_order->id == $currency_module['id_currency']) return true; return false; } public function renderForm() { $fields_form = array( 'form' => array( 'legend' => array( 'title' => $this->l('Contact details'), 'icon' => 'icon-envelope' ), 'input' => array( array( 'type' => 'text', 'label' => $this->l('Pay to the order of (name)'), 'name' => 'CHEQUE1_NAME', 'required' => true ), array( 'type' => 'textarea', 'label' => $this->l('Address'), 'desc' => $this->l('Address where the check should be sent to.'), 'name' => 'CHEQUE1_ADDRESS', 'required' => true ), array( 'type' => 'text', 'label' => $this->l('Valeur minimale pour faire un chèque'), 'desc' => $this->l('Valeur minimum d\'achat pour acceptation de paiement par chèque'), 'name' => 'somme_Mini', 'required' => true ), array( 'type' => 'text', 'label' => $this->l('Valeur maximale pour faire un chèque'), 'desc' => $this->l('Valeur maximum d\'achat pour acceptation de paiement par chèque'), 'name' => 'somme_Maxi', 'required' => true ), ), 'submit' => array( 'title' => $this->l('Save'), ) ), ); $helper = new HelperForm(); $helper->show_toolbar = false; $helper->table = $this->table; $lang = new Language((int)Configuration::get('PS_LANG_DEFAULT')); $helper->default_form_language = $lang->id; $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0; $this->fields_form = array(); $helper->id = (int)Tools::getValue('id_carrier'); $helper->identifier = $this->identifier; $helper->submit_action = 'btnSubmit'; $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name; $helper->token = Tools::getAdminTokenLite('AdminModules'); $helper->tpl_vars = array( 'fields_value' => $this->getConfigFieldsValues(), 'languages' => $this->context->controller->getLanguages(), 'id_language' => $this->context->language->id ); return $helper->generateForm(array($fields_form)); } public function getConfigFieldsValues() { return array( 'CHEQUE1_NAME' => Tools::getValue('CHEQUE1_NAME', Configuration::get('CHEQUE1_NAME')), 'CHEQUE1_ADDRESS' => Tools::getValue('CHEQUE1_ADDRESS', Configuration::get('CHEQUE1_ADDRESS')), 'somme_Mini' => Tools::getValue('somme_Mini', Configuration::get('somme_Mini')), 'somme_Maxi' => Tools::getValue('somme_Maxi', Configuration::get('somme_Maxi')), ); } } Ok et merci voila mon code -
Impossible d'ouvrir l'historique d'une commande
Le Sultan replied to Le Sultan's topic in Discussion générale
Oui mais je n'ai supprimé que des occurences mais pas des tables. Qu'elle table est reliée à la page historique des commandes,pour voir en détail la commande? -
Impossible d'ouvrir l'historique d'une commande
Le Sultan replied to Le Sultan's topic in Discussion générale
Le problème je suis en local.Dernièrement j'ai supprimé des occurences dans les tables .J'ai surement fais une boulette. toutes les occurences commencant par "cheq" j'ai supprimé j'ai peut être fais une boulette. Car pour le module chéque il y à fallu que je l'ai réinstalle car j'avais un bug