Jump to content


  • Posts

  • Joined

  • Last visited

Visiedo's Achievements


Newbie (1/14)



  1. I think the easiest and safest way to do it is just to rename the module. Let's say you would like to override the module "blockcategories": Copy the module to a new folder, e.g. myblockcategories, with all the files, and preserving the directory structure In the new folder, rename blockcategories.php, .tpl, .css by "myblockcategories". Rename the name of the class and information in the construct method: class MyBlockCategories extends Module { public function __construct() { $this->name = 'myblockcategories'; $this->tab = 'front_office_features'; $this->version = '2.0'; $this->author = 'PrestaShop' parent::__construct(); $this->displayName = $this->l('My custom Categories block'); $this->description = $this->l('Adds a block featuring product categories. Custom version'); } Now modify the. Php as desired. Once you are done you should install the newly created module. Start by disabling / uninstall the original module in the back office. Then search for your module and install it. Please let me know if you need more details
  2. Hi, many people face the tedious task of removing the "Powered by Prestashop" from every mail template in their shops. One obvious possibility is to go to the backoffice -> Localization -> Translations, and select "Email template translation" and the name of your theme. Very soon you will face the reality, around 64 mail templates in html and plain text, and a serial killer interface. Not what you would like to do if you want to have a life ;-) Using the replace functionality from your IDE won't do the work either. Works fine for text files but in html you have to remove three lines <tr> <td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: {color}; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered by <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td> </tr> and many text editors / IDEs would have problems to do it with all your files at a time... at least my experience with NetBeans in Linux. What I did: Use the "Replace" function from the IDE (in my case Netbeans) for the text files. It is just one line. Still might require some iterations since the famous text comes in different flavours. For HTML I used the following regular expression to match the three lines above: <tr>\n.*PrestaShop.*\n</tr> And use the Netbeans ability to use regular expresions to find and replace in multiple files. Alternatively you could also use "sed" if you are using a Unix based system.
  3. Same problem here, with and default configuration options... No way I would change my hosting because of this. It is definitely an issue that PS should take serious, and analyse. I assume they would not have a problem to test with a Goddady hosting, nevertheless I would be happy to lend my hosting for prestashop guys to run their tests.
  4. Hi, I was looking for a way to redirect a user to the original page after the login, avoiding the default behavior from prestashop, i.e. redirect to the "my-account" page. There are several threads on the topic, but at the end I could not find anything that fulfilled my reqs. and finally come with this method. I would like to get your opinions, specially if you believe it won't work under some circumstances, since it is still not fully verified. My [simple] requirements: Redirect a user to the original page after signing in, when using the login link at the "blockuserinfo". No exceptions in any page Should work for both HTTP and HTTPS The solution: Edit the "blockuserinfo.tpl", and change this part at the end of the file (lines 56-60 in 1.5.3) {if $logged} <a href="{$link->getPageLink('my-account', true)}" class="account"><span>{$cookie->customer_firstname} {$cookie->customer_lastname}</span></a> <a href="{$link->getPageLink('index', true, NULL, "mylogout")}" title="{l s='Log me out' mod='blockuserinfo'}" class="logout">{l s='Log out' mod='blockuserinfo'}</a> {else} <a href="{$link->getPageLink('my-account', true)}" class="login">{l s='Log in / Join us!' mod='blockuserinfo'}</a> {/if} by {if $logged} <a href="{$link->getPageLink('my-account', true)}" class="account"><span>{$cookie->customer_firstname} {$cookie->customer_lastname}</span></a> <a href="{$link->getPageLink('index', true, NULL, "mylogout")}" title="{l s='Log me out' mod='blockuserinfo'}" class="logout">{l s='Log out' mod='blockuserinfo'}</a> {else} <a href="{$link->getPageLink('authentication', true)}?back={if $smarty.server.SERVER_PROTOCOL|strstr:"https"}https://{else}http://{/if}{$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI}" class="login">{l s='Log in / Join us!' mod='blockuserinfo'}</a> {/if} I replace the call to 'my-account' by a direct call to the 'authentication' controller, including the full URL of the current page in the "back" parameter. It is important to include also the protocol "http:// or https://", otherwise the it will assume that the value for "back" is the name of a controller, and will result in a redirection to: index.php?controler='your URL' returning a 404. I am very interested on your opinions, I hope you find it correct and useful ;-) Please also feel free to suggest improvements
  5. Sounds great Chicoco ;-) I will give it a try. Muchas gracias!
  6. Not exactly a pop-up, but a "layer" on top of the current page.
  7. Hi, I am trying to show the login / register page as an overlay, Do you have any ideas on how to do it? Thanks!
  8. Do you mean in the header.tpl? Excuse my ignorance but, could you please indicate how could I make use of that {debug} tag?
  9. Hi, is there a way to configure Prestashop to automatically select the shop language based on the browser locale? Cheers /Javier
  10. Thanks a million for your suggestion Clayton, I will take a look to it. Cheers /javier
  11. Hi, this is probably more a CSS general question rather than prestashop, still I am sure you would have some good hints. I am building a cloths site, and I have a requirement to style the product size selector. By default it appears as a normal "Radio Button" selector, and I would rather style it to show boxes with the sizes on in "S", "M", "L", "XL"... I am not sure if this can be done just with CSS in a cross browser compatible way, or it needs some javascript hacking.
  12. Hi, thank you for the various product export queries in the thread! Is there a way to easily combine that export -> import with the product and categories images? I would like to export all the shop product and categories related contents to another shop (sometimes just for development / testing purposes), but I still did not find an easy way. I tried to backup the full database and restore in the new server, but it requires some hacking changing the domain name, and some config parameters until the shop is up and running again... quite a mess for my purpose! I definitely would support having such a functionality as part of the core prestashop system, I regard it as a quite basic feature
  13. Hi, I am using a development -> stage -> production cycle for my web developments, combined with Git to control the site versions and deployment. I usually work on a development branch, until I am ready to show some results to my customer, when I upload them to a stage server. The final result, once approved is moved to the production environment. With PS, I still follow that cycle, but once all the content is pushed to the server (either stage or production) I still must go into the back end and made some clicks before the site is properly configured and ready to go live, which I find it quite tedious. I would like to hear how do you solve it? Is the template installer module good enough for the task? Is there any other good alternative? Thanks a lot for your contributions ;-) Cheers /Javier
  14. Looking into the error.log file there is an exception due to incorrect access permissions for the DB user. I am still troubleshooting it. I can access the prestashop DB via phpmyadmin with the same user and password as the one configured at settings.inc.php.
  15. Same problem here. I followed all the suggested steps and still get an Internal Server Error. I understand that Prestashop is quite a lot based on module contributions from the community, but this kind of things are so basic that I still do not understand how Prestashop neglect including support in the standard release.
  • Create New...