Jump to content

gabrielio

Members
  • Posts

    8
  • Joined

  • Last visited

Profile Information

  • First Name
    Ionescu
  • Last Name
    Gabriel

Recent Profile Visitors

225 profile views

gabrielio's Achievements

Newbie

Newbie (1/14)

4

Reputation

  1. Thanks for the solution, i solved it like this: 1. Create the override file ProductController.php (like @NemoPS mentioned in his tutorial link) containing the code shown below and upload the file to override/controllers/front <?php class ProductController extends ProductControllerCore { public function setMedia() { parent::setMedia(); if (Configuration::get('PS_COMPARATOR_MAX_ITEM')) $this->addJS(_THEME_JS_DIR_.'products-comparison.js'); } public function initContent() { $this->context->smarty->assign('comparator_max_item', Configuration::get('PS_COMPARATOR_MAX_ITEM')); if (isset($this->context->cookie->id_compare)) $this->context->smarty->assign('compareProducts', CompareProduct::getCompareProducts((int)$this->context->cookie->id_compare)); parent::initContent(); } } ?> 2. In product.tpl add the following code (like @kosm12 mentioned) where you want the "add to compare" button to appear. You can customise the check button using css before and after. <div class="compare_product_page"> {if isset($comparator_max_item) && $comparator_max_item} <div class="compare"> <a class="add_to_compare" href="#" data-id-product="{$product->id|intval}">{l s='Add to Compare'}</a> </div> {/if} {include file="./product-compare.tpl"} </div> {*Products compare *} {addJsDefL name=min_item}{l s='Please select at least one product' js=1}{/addJsDefL} {addJsDefL name=max_item}{l s='You cannot add more than %d product(s) to the product comparison' sprintf=$comparator_max_item js=1}{/addJsDefL} {addJsDef comparator_max_item=$comparator_max_item} {addJsDef comparedProductsIds=$compared_products} You can see the results live, here: https://laptop-hunter.com/notebook-hp-15-dw0012na-6pc36ea-silver-6098.html PS: I forgot to mention that i use Prestashop 1.6.1.18. Thank you!
  2. I know you code and i also don`t want to make this a dispute. I just tried the solution again on a Prestashop 1.6.1.7 this time(without any override), I followed the steps i mentioned and IT WORKS. I cannot explain how, but it works on 1.6.1.7 and 1.6.1.10(at least this is what i tested). The solution is simple, first you have to place a test order(or an order) with Enabled invoices from Order > Invoices and with status "Processing in progress" allowing to generate invoice. After you do that, you can uncheck "Enable invoices" form Order > Invoices and the orders will be counted. Maybe it is a Prestashop bug, but for now, at least for me, this solution works great, so you should try it on a new prestashop install and see if it works.(of course if you want to convince yourself) I just hope it helps other peoples on this topic.
  3. Maybe(as you say some other override... but you have nor arguments on that, is just what you suppose), but you should not say that the solution i gave it`s not working as it is working for me with no override. So when you say that, other people that read this topic will probably not try it so they will not know if it will ever work for them as it worked for me. I thought that the purpose here on this forum is to help people and to give them our best experience on Prestashop problems we faced and we somehow solved. Have you at least tried the solution i gave before answering this topic? If it doesn`t work for you, it doesn`t mean that it will not work for anybody else. Let pleople try, they have no reason not to do it. Thank you.
  4. I had this problem too, and the override solution worked perfect on Prestashop 1.6.1.4, but since i updated to 1.6.1.10, the override stopped working and the dashboard stats were empty, not even 0 value. So i discovered a solution for stats to show again, but i must tell you that the old stats(for orders before update) are not displayed. Here is what i did: 1. Go to Order > Invoices and CHECK "Enable invoices". 2. Go to Order > Statuses and for status "Processing in progress" choose to generate Invoice(the green check mark should appear). 3. Place a test order from the front of your site. After doing that, the order should be shown in the dashboard stats and the invoice should have been generated. 4. Go back to step Nr. 1 and access Order > Invoices and UNCHECK "Enable invoices". This way you will avoid generating Invoices for new orders and customers will not receive any invoice on e-mail when placing the order. 5. Place a new test order and you`ll see that it will be registered and showed in dashboard stats. That`s all.
  5. Thanks for posting this. It was easier for me to find what file i had to modify. If you want to expand this to higher resolution than you can modify(in blocktopmenu.js) the "767" and "768" to let`s say "991" and "992" Also in superfish-modified.css(themes/YOUR-THEME/css/modules/blocktopmenu/css) you have to change "767px" and "768px" to "991px" and "992px"
  6. If anyone is still looking for a solution, here it is: Step 1: for user to be able to log out, the logout link should be this one: http://www.example.com/my-account/?mylogout= instead of this one http://www.example.com/?mylogout= as mentioned here: https://www.prestashop.com/forums/topic/515637-customers-cant-log-out/?p=2286273 Step 2: for getting that link you should create a 301 redirect and you can do that following the steps form this post: https://www.prestashop.com/forums/topic/387556-editing-htaccess-for-301-redirects-to-new-site-urls/?p=1903665 It worked for me, hope it helps anybody else looking for the solution.
  7. Thaks a lot for the link tip, i did not knew about adding my-account in the link and i searched for this solution for a long time: So for those that are still looking to solve the problem the url for logout should look like this http://www.example.com/my-account/?mylogout= For redirect, if you do not have any module use the solution from this link https://www.prestashop.com/forums/topic/387556-editing-htaccess-for-301-redirects-to-new-site-urls/?p=1903665 It worked for me, hope it helps anybody else looking for a solution to this problem.
  8. Thank you. This is the best solution for me for redirecting the logout page from '/?mylogout=' to '/my-account/?mylogout=' You have no idea how much i`ve searched for. Perfect redirect so far, it actually works.
  9. @ramdvash Thank you very much for the answer, it was very helpful.
×
×
  • Create New...