Jump to content


This is public support for addon to increase prices by country. This module uses geolocation tool to identify customers' origin and depending on it - increase prices of products by selected percentage value or flat amount. This plugin also gives possibility to decrease prices of products for visitors from selected countries. Module operates also on customers address provided during checkout.
Photo

problem with override of productController and initContent function

overrides

  • Please log in to reply
1 reply to this topic

#1 rado

rado

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 15 September 2021 - 07:07 AM

The following module(s) could not be installed properly: pbc : Unable to install override: The method initContent in the class ProductController is already overridden by the module stoverride version 1.2.0 at 2015-11-17 07:24:20 . ----> hi there iam getting this msg, module stoverride is part of PANDA theme from sunnytoo.com



#2 Milosz

Milosz

    Advanced Member

  • Members
  • PipPipPip
  • 117 posts

Posted 15 September 2021 - 07:08 AM

Hello,
module "price by country" that gives possibility to increase / decrease prices by country has an override of "ProductController".
The message you mentioned means that your shop already uses a module that installed override of "ProductController" with its "initContent" class.
Module "price by country" also uses the same override, so this is why prestashop can't install another module that tries to install override that already exists.
This is not a bug of the "price by country" module nor the bug of "stoverride" addon you already have in your shop. This is the way of how prestashop works currently.

there are at least two solutions depending on your requirements.
 

  1. You do not want to use "stoverride" addon
    if you do not want to use this plugin it is enough to just uninstall it.
    Then you will be able to install "price by country" without any problem.
    Please note that once you will install "price by country" and if in the future you will want to install "stoverride" - you will not have possibility to install it becuase of the same problem.
     
  2. You want to use both modules
    In this case it will be necessary to manually merge two overrides from: "stoverride" and "price by country"
    • /overrides/controllers/front/ProductController.php
    • /modules/pbc/overrides/controllers/front/ProductController.php


Steps to follow:

  1. merge two files into one and move merged file to /overrides/controllers/front/ProductController.php
  2. remove file /modules/pbc/overrides/controllers/front/ProductController.php
  3. install "price by country" module in shop back office
     

so, it requires some php knowledge to merge two php files into one.
if you are not tech-savvy i offer my full support, i can do it directly in your shop if you are interested in this kind of support.

 

 

please do not provide any access credentials here.

if you expect to get direct support please send private message or create support ticket.







Also tagged with one or more of these keywords: overrides

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users