Jump to content

dric83

Members
  • Posts

    147
  • Joined

  • Last visited

About dric83

  • Birthday 05/04/1984

dric83's Achievements

Newbie

Newbie (1/14)

7

Reputation

  1. Thank you Rocky, it helped a lot. Better option maybe : <form id="productsSortForm{if isset($paginationId)}_{$paginationId}{/if}" action="{$request|escape:'html':'UTF-8'|replace:'http://':'https://'}" class="productsSortForm"> Use "replace" instead of "str_replace" check smarty doc : http://www.smarty.net/docsv2/en/language.modifier.replace.tpl
  2. Here is the solution : Check that you have mod_headers in your php info. Then add this in your .htaccess : <IfModule mod_setenvif.c> <IfModule mod_headers.c> # mod_headers, y u no match by Content-Type?! <FilesMatch "\.(gif|png|jpe?g|svg|svgz|ico|webp)$"> SetEnvIf Origin ":" IS_CORS Header set Access-Control-Allow-Origin "*" env=IS_CORS </FilesMatch> </IfModule> </IfModule>
  3. Hey guys Any news on this problem? How did you solved it Morten Borg ? Thankyou
  4. Yes you're right. But I don't have these information. I just have the id_product_attribute.
  5. Hi ! I have php script outside of my store where I already have id_product and id_product_attribute. I would like to use a link to the product page with id product attribute so it will pre-select the combination. My wish is something like : index.php?id_product=1&controller=product&id_product_attribute=2 But it doesn't work. Or, at least I would like the picture of this specific combination. Thank you for any help I use Prestashop 1.6
  6. Hi Vekia, Yes Just like in your post in this topic Check the screen shot you posted
  7. Hi Guys, Any idea what does this option : Plugins detection ? Thank you
  8. Maybe it needs to be replaced by echo $this->smartyOutputContent('views/templates/front/search.tpl');
  9. Hello Everyone I'm trying to adapt a 1.4 module to a 1.6 prestashop :-/ I've fixed almost everything, but there is something I may need help on... In the 1.4 version, there was an Ajax function that was supposed to load a tpl protected function displayAjaxSearchCollect() { echo Module::display(dirname(__FILE__).'/../../mymodule.php', 'views/templates/front/search.tpl'); } But Module::display has been deprecated... I tried to replace by this but it doesn't work ... It doesn't load anything and I don't have any errors echo $this->setTemplate('views/templates/front/search.tpl'); May be there is another 1.5 function because it is Ajax ? Thank you for any help ++
  10. Have a look here: http://www.prestashop.com/forums/index.php?/topic/251508-how-to-add-currency-to-url/page__view__findpost__p__1339776 Hope this could help Code is for PS 1.5
  11. For PS 1.5 add a file Tools.php in /overrides/classes/ with this code : Then delete the file class_index.php in /cache (it will be re-generated automatically) After you will be able to force the currency by the id For example : www.myshop.com/en/?c=3 (currency id 3) <?php class Tools extends ToolsCore { public static function setCurrency($cookie) { if (Tools::isSubmit('SubmitCurrency')) if (isset($_POST['id_currency']) && is_numeric($_POST['id_currency'])) { $currency = Currency::getCurrencyInstance($_POST['id_currency']); if (is_object($currency) && $currency->id && !$currency->deleted && $currency->isAssociatedToShop()) $cookie->id_currency = (int)$currency->id; } // Get Currency from URL (start) if (isset($_GET['c']) AND is_numeric($_GET['c'])) { $currency = Currency::getCurrencyInstance((int)($_GET['c'])); if (is_object($currency) AND $currency->id AND !$currency->deleted) $cookie->id_currency = (int)($currency->id); } // END if ((int)$cookie->id_currency) { $currency = Currency::getCurrencyInstance((int)$cookie->id_currency); if (is_object($currency) && (int)$currency->id && (int)$currency->deleted != 1 && $currency->active) if ($currency->isAssociatedToShop()) return $currency; else { // get currency from context $currency = Shop::getEntityIds('currency', Context::getContext()->shop->id); $cookie->id_currency = $currency[0]['id_currency']; return Currency::getCurrencyInstance((int)$cookie->id_currency); } } $currency = Currency::getCurrencyInstance(Configuration::get('PS_CURRENCY_DEFAULT')); if (is_object($currency) && $currency->id) $cookie->id_currency = (int)$currency->id; return $currency; } }
×
×
  • Create New...