Jump to content

piotrowski-s@hotmail.fr

Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by piotrowski-s@hotmail.fr

  1. Hi, I added a new filed in contact form, I also made changement in overide for updating that new field in database. When I do a reply to my client, that field become empty. So I wanted to know how to get the value of that field in admin panel and to update it in the database ? anykind of help will be much appreicated.
  2. I have some trouble in prestashop 1.6 using smarty. I have an array, but its offset are not reset for each product. so for the firdst product, with attrivute it has offset 1,2,3,4 Then for the next product it has offest 5,6,7,8 etc. I have that kind of array $combinations Smarty_Variable Object (3) ->value = Array (4) 5 => Array (14) attributes_values => Array (1) 1 => "S" attributes => Array (1) 0 => 1 price => 0 specific_price => Array (0) ecotax => 0 weight => 0 quantity => 20 reference => "" unit_impact => 0 minimal_quantity => "1" date_formatted => "" available_date => "" id_image => -1 list => "'1'" 6 => Array (14) I try to go trhough this array but it does not work when I put empty offset (it is inside a foreach) {$combinations[]['quantity']} How can I tell him to go trhough the first iteration, and then in the second automatically ? This return to me the following errors. Fatal error: Cannot use [] for reading in /htdocs/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 584 I can not tell him which offset to use, because for each product it goes up and is not reset to 0. I would be very gratefull for anykind of help.
  3. I got it {$combinations[$id_attribute]['quantity']} Thank you for your help
  4. the data I need is in the var $combination Smarty_Variable Object (3) ->value = Array (4) 1 => Array (14) attributes_values => Array (1) 1 => "S" attributes => Array (1) 0 => 1 price => 0 specific_price => Array (0) ecotax => 0 weight => 0 quantity => 0 reference => "" unit_impact => 0 minimal_quantity => "1" date_formatted => "" available_date => "" id_image => -1 list => "'1'" 2 => Array (14) attributes_values => Array (1) 1 => "M" attributes => Array (1) 0 => 2 price => 0 specific_price => Array (0) ecotax => 0 weight => 0 quantity => 18 reference => "" unit_impact => 0 minimal_quantity => "1" date_formatted => "" available_date => "" id_image => -1 list => "'2'" 3 => Array (14) attributes_values => Array (1) 1 => "L" attributes => Array (1) 0 => 3 price => 0 specific_price => Array (0) ecotax => 0 weight => 0 quantity => 20 reference => "" unit_impact => 0 minimal_quantity => "1" date_formatted => "" available_date => "" id_image => -1 list => "'3'" 4 => Array (14) attributes_values => Array (1) 1 => "XL" attributes => Array (1) 0 => 4 price => 0 specific_price => Array (0) ecotax => 0 weight => 0 quantity => 20 reference => "" unit_impact => 0 minimal_quantity => "1" date_formatted => "" available_date => "" id_image => -1 list => "'4'" But I don't know how can I use this in my loop because it is not the same var name so I don't know how to go through the $combination with $groupname. I will do more research. Thank you for your help.
  5. Hi, I have a custom list with radio buttons for the declination of the product. But I want to get the product quantity by declination (and not all). I have the var ($product->quantity) but it display all quantity and not for each declination. I would like to dispkay near the radio button in the loop but I don't know which is the smarty var to use ? this is my loop : {foreach from=$group.attributes key=id_attribute item=group_attribute} <li> <input type="radio" class="attribute_radio" name="{$groupName|escape:'html':'UTF-8'}" value="{$id_attribute}" {if ($group.default == $id_attribute)} checked="checked"{/if} /> <span>{$group_attribute|escape:'html':'UTF-8'}</span> </li> {/foreach} If anyone know how can get the number of item inside the loop for each attribute I would be realy gratefull.
  6. Hi I have a div using a bg image inside the description, when I save it is not savec, anyone know how can I allow that code in the product description : <div style="width: 100%;background-url:('img/cms/beast-black-baner.jpg')">ddd</div> Anykind of help will be much appreciated I have PS 1.6.1.4
  7. Hi, I did a custom page (a php file, a controller and a tpl). The tpl send data through a form and this data are used in the controller. I need to do a request and to look for values from database. If no result it return a mistake, and if a result it return the value of the database requested through an array then I use this value and display them back in the tpl. I did the following script but in return an error php I'm a novice I know what I want to do, but I don't know exactly how to do it. Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /htdocs/controllers/front/AntiCounterfeitController.php on line 25 Warning: mysql_query(): No such file or directory in /htdocs/controllers/front/AntiCounterfeitController.php on line 25 Warning: mysql_query(): A link to the server could not be established in /htdocs/controllers/front/AntiCounterfeitController.php on line 25 Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /htdocs/controllers/front/AntiCounterfeitController.php on line 26 And this is my controller code <?php /* Create a custom page in PrestaShop without CMS - CustomPageController class /* Read the detailed tutorial at https://iftakharhasan.wordpress.com/prestashop-create-a-custom-page-without-cms */ /* The classname here will be the name of the controller */ class AntiCounterfeitController extends FrontController { public function init() { $this->display_column_left = false; $this->display_column_right = false; parent::init(); } public function postProcess() { if (Tools::isSubmit('submitcounterfeit')) { $serial = Tools::getValue('serial'); $key = Tools::getValue('key'); } if(isset($_POST['submitcounterfeit'])){ $query = "SELECT * FROM `ps_counterfeit` WHERE `serial` = '{$serial}' AND `key` = '{$key}'"; $result = mysql_query($query); if(mysql_num_rows($result)==0){ $error = 1; $data = null; } elseif(mysql_num_rows($result)==1){ $error = 0; $data = mysql_fetch_assoc($result); } } } public function initContent() { parent::initContent(); $this->setTemplate(_PS_THEME_DIR_ . 'anti-counterfeit.tpl'); } } Anykind of help will be much appreciated.
  8. Hi, I've created a custom page, with (tpl, controler and file.php) but the breadcrumb text is empty. Anyone know how can I set a breadcrumb for that page ? Is that in the database ? Anykind of help will be much appreciated.
  9. thank you for your reply, I've created 3 files : in root folder: anti-counterfeit.php <?php include(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); include(dirname(__FILE__).'/header.php'); $smarty->display(_PS_THEME_DIR_.'anti-counterfeit.tpl'); include(dirname(__FILE__).'/footer.php'); Then in controller AntiCounterfeitController.php <?php /* The classname here will be the name of the controller */ class AntiCounterfeitController extends FrontController{ public function init(){ parent::init(); } public function initContent(){ parent::initContent(); $this->setTemplate(_PS_THEME_DIR_.'anti-counterfeit.tpl'); } /* The following code portion is optional. /* Remove the double-slashes to activate the portion /* if you want to use external stylesheet and JavaScript for the page. /* Create the CSS and JS files in the css and js directories of the theme accordingly */ //public function setMedia(){ //parent::setMedia(); //$this->addCSS(_THEME_CSS_DIR_.'custom-page.css'); //$this->addJS(_THEME_JS_DIR_.'custom-page.js'); //} } Then the tpl in the theme folder (actually it is empty just a "test" text to be displayed (it works), but with both column, and I want none of them.
  10. Hi, I created a new page (not using cms) because I want it to be a dynamique page. In my theme, I've selected that no column would be display on that page Even with that, it still display both column. Anykind of help will be much appreciated. In my tpl there is only the main page I want to display (no column).
  11. Bonjour à tous, sur mon site www.omega-nutrition.fr lorsque l'on choisit mode de paiement par virement, on est redirigé vers la page http://omega-nutrition.fr/module/bankwire/validation et on a un beau message d'erreur, je ne sais pas comment le résoudre voici ce que cela dit : Erreur serveur Le site Web a rencontré une erreur lors de l'extraction de http://omega-nutrition.fr/module/bankwire/validation. Cela peut être dû à une opération de maintenance ou à une configuration incorrecte. Voici quelques suggestions : Actualisez cette page Web ultérieurement. Erreur HTTP 500 (Internal Server Error) : Une situation inattendue s'est produite tandis que le serveur tentait de traiter la demande. Toute forme d'aide sera grandement appréciée.
  12. Bonjour, pour ma part les images ne s'affichent pas. Pourtant j'ai bien créer l'image medium pour les produits et catégorie. Je suis sur la dernière version de PS. Voici mon site http://omega-nutrition.fr/ toute forme d'aide sera grandement appréciée
  13. Merci à julien51 qui a fait l'installation du module sur ma boutique car elle ne fonctionnait pas. Vous pouvez voir en live ce que cela donne ici http://www.omega-nutrition.fr Un grand merci à lui
  14. Bonjour, j'ai bien installé, le module cependant il n'apparait pas, pouvez vous m'aider ? par avance merci. http://omega-nutrition.fr/
  15. Bonjour, je me permet de faire un petit "up" apparemment il n'y a aucun retour, et le problème demeure? très Cordialement Stan P
×
×
  • Create New...