Jump to content


Popular Content

Showing content with the highest reputation on 08/09/2020 in all areas

  1. 1 point
    Nueva version que incluye el Total de los productos facturados. En Total Impuestos se muestra el total de impuestos facturados por pedido, productos y envíos
  2. 1 point
    Il suffit de taper la bonne url avec le bon nom de domaine, simplement, vous faites un changement mais vous utilisez l’ancien domaine, pourquoi ?
  3. 1 point
    Finally I found it! The actual customer object is in: $this->context->customer
  4. 1 point
    Bonjour, Je n'arrive pas à me connecter au prestashop addon module de selection ou theme . voir les captures. Avez vous une idée du probleme ?
  5. 1 point
    Hey George, I agree with what Verlonimo said - building content is the best way to show up higher on Google. Secondly, your ranking on google is not guaranteed. There are a few things that you can do right away: Start posting content (like Verlonimo said) on social media so people can follow, like, share it. As it grows in popularity, your reach will grow as well Try to post question-answers (if this is relevant to your store) in places like Quora. Google has started weighing a bit heavily on these. You might want to consult SEO specialists as well if you feel the need. They are aware of latest trends. If you have a lot of products, the products themselves can help you market if you sign up on Google Merchants. I am developer of a module which can help you get more organic traffic through Google: https://addons.prestashop.com/en/seo-natural-search-engine-optimization/48686-1-long-tail-seo.html . It will allow you to pick keywords and build targeted pages for them, that are SEO-friendly. We have shown 4x traffic growth just in 2 months for some of our customers. It will greatly augment your other efforts. I hope it helps.
  6. 1 point
    Many shop owners don't like the default random string order reference, but changing it to order ID reveals the number of orders to customers. This module changes the order reference tu numeric and let's you choose between a random number and order ID, you can also add custom prefix and choose to have leading zeros. Module works for Prestashop 1.5, 1.6, 1.7 I am sharing this module for free on my most common improvements subscription list on http://greenmousestudio.com/ or below. gmnumeric.zip Update 16.08.2016 gmnumeric_v_1_2_0.zip A few notes in case this module does not work for you and you need to uninstall it: - this module overrides generateReference() function from the Order class, sometimes (I don't know why) Prestashop leaves the overriden files after uninstall, so check the "overrides/classes/Order.php" and remove the generateReference() function or delete the whole file if there is nothing else in it.
  7. 1 point
    Solved! Apparently i wasn't generating correctly the comabinations, i generated the size combinations first and then colors separately, for anyone else having this problem you need to select all the combinations size / color / etc. and generate them all together.
  8. 1 point
    Hello: For adding and extra action in AdminController of your module you do not need to touch any tpl or twig file. Just need some pieces of code in your AdminController.php file: $this->addRowAction('newaction'); then public function displayNewactionLink($token = null, $id = null) { $this->context->smarty->assign(array( 'href' => self::$currentIndex.'&'.$this->identifier.'='.(int)$id .'&action=newaction&token='.($token != null ? $token : $this->token), 'action' => $this->l('New Action'), 'icon' => 'icon-mail-forward', )); return $this->context->smarty->fetch($this->module->getLocalPath().'views/templates/admin/list_action_forward.tpl'); } Just copy the same code of the edit button action to your file list_action_forward.tpl and modifiy it. finally public function processNewaction() { //do something } Regards
  9. 1 point
    BAM found a perfect solution! I created a module that does that (so when I reinstall my store at a later point again, I can just reinstall the module). But you can also just hack your way through the process. I guess another advantage of making it a module is that you can require this module to be installed by all those modules that will now depend on this hook. Here's what you need to do: 1.) Create a new Hook When doing a module installation, you should be able to just call $this->registerHook('nameOfNewHook'); since the Hook class has a case for creating new, non existing hooks. Otherwise, the code to create a new hook is this: $hook = 'nameOfNewHook'; $new_hook = new Hook(); $new_hook->name = pSQL($hook); $new_hook->title = pSQL($hook); $new_hook->add(); So just run that code during installation of your module, or just run it once and then you're set. No I actually gave my new hook the name 'actionLoadProductTemplate'. 2.) Create a new Product Controller class Create a file called ProductController.php with the following contents: <?php class ProductController extends ProductControllerCore { public function initContent() { parent::initContent(); $template_file = Hook::exec('actionLoadProductTemplate', array('product' => $this->product, 'category'=> $this->category)); //you can pass along other properties of the product class by putting them in this array if($template_file && file_exists($template_file)) { $tpl_path = $template_file; } else { $tpl_path = _PS_THEME_DIR_.'product.tpl'; } $this->setTemplate($tpl_path); } } 3.) Override the ProductConroller class Once you created the class file, you'll need to make sure Prestashop uses it, by overriding it: If you are installing a module, put it in the folder 'PS_ROOT/modules/NAMEOFYOURMODULE/override/controller/front/ProductController.php' If you delete the file 'PS_ROOT/cache/class_index.php' JUST before the installation, it should even work properly from the start. Of course alternatively you can just place your file in the override directory of the prestashop folder ( 'PS_ROOT/override/controller/front/ProductController.php') If it doesn't work, make sure the class_index.php file has this written in it: 'ProductController' => array ( 'path' => 'override/controllers/front/ProductController.php', 'type' => 'class', 'override' => false, ), or if you want to maintain the source code of your override file in the folder of your module, go like this: 'ProductController' => array ( 'path' => 'modules/NAMEOFYOURMODULE/override/controllers/front/ProductController.php', 'type' => 'class', 'override' => true, ), Again, you just need to hack around in the cache file, if it didn't work from the beginning (which it never has for me though, so I've always had to do it ) 4.) Start using your new hook in all your modules! :-D So now you can use this great new hook to change the template file of a product. Your hook function will need to RETURN the path to the new template you want to use, and your template file needs to exist. Otherwise it'll just show the default template file. public function hookActionLoadProductTemplate($params) { $this->product = $params['product']; $this->category = $params['category']; //the product and category arrays are passed along by the product controller. $this->customer = $this->context->customer; //do some custom logic $myrule = TRUE; //for example what type of product you have, and if you customer has purchased it, or what category it is in... //assign any custom variables to your custom template $this->context->smarty->assign('custom stuff', 'custom things go here'); //return the path of your new template. if($myrule) { $this->context->smarty->assign('custom_variable', 'custom value!'); return _PS_MODULE_DIR_.'YOURMODULENAME/views/templates/product_custom_no1.tpl'; } else { $this->context->smarty->assign('another_variable', 'different value!'); return _PS_THEME_DIR_.'product_custom_no2.tpl'; } }
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More