Jump to content

Duplicate prices have mysteriously appeared on home page


SkaFace

Recommended Posts

This is certainly not standard behaviour, so I guess some code has been accidentally added somewhere. I see you have the "Featured products on the homepage" and "Top sellers" (hidden) on the homepage, then the price code by itself on a separate line. There must be a module adding it. I suggest that you check which modules are in the "displayHomeTabContent" hook on the Modules > Positions tab in the Back Office. Is there a module below the "Top sellers" module that isn't disabled? If so, that's probably the module adding it. If not, it might be the "Top sellers" module adding it, or it may be in index.tpl in your theme's directory.

Link to comment
Share on other sites

This is certainly not standard behaviour, so I guess some code has been accidentally added somewhere. I see you have the "Featured products on the homepage" and "Top sellers" (hidden) on the homepage, then the price code by itself on a separate line. There must be a module adding it. I suggest that you check which modules are in the "displayHomeTabContent" hook on the Modules > Positions tab in the Back Office. Is there a module below the "Top sellers" module that isn't disabled? If so, that's probably the module adding it. If not, it might be the "Top sellers" module adding it, or it may be in index.tpl in your theme's directory.

 

 

Thanks for the quick reply Rocky. I've checked the "displayHomeTabContent" hook and there is only the "Featured products on the homepage" and "Top sellers" pinned there. 

The index.tpl code is as below. Any clues? Thanks again for you help.

 

*}

{if isset($HOOK_HOME_TAB_CONTENT) && $HOOK_HOME_TAB_CONTENT|trim}

    {if isset($HOOK_HOME_TAB) && $HOOK_HOME_TAB|trim}

        <ul id="home-page-tabs" class="nav nav-tabs clearfix">

{$HOOK_HOME_TAB}

</ul>

{/if}

<div class="tab-content">{$HOOK_HOME_TAB_CONTENT}</div>

{/if}

{if isset($HOOK_HOME) && $HOOK_HOME|trim}

<div class="clearfix">{$HOOK_HOME}</div>

{/if}

Link to comment
Share on other sites

No disabling top sellers makes no difference. I have also unhooked it from  "displayHomeTabContent" hook, so the only one there now is "Featured products on the homepage".

 

Still no joy....

 

This would appear to be linked to the "Featured products on the homepage" module. I have uninstalled and the re-installed, but the error re-appears.

Edited by SkaFace (see edit history)
Link to comment
Share on other sites

Interesting. That made one of them disappear, but there's still one left. It is so weird. There must be a reason it's displaying. I can't figure out where it's coming from.

 

Can you try editing config/defines.inc.php and changing _PS_DEV_MODE_ from false to true? That should add some comments to your HTML code that will help trace the TPL files.

Link to comment
Share on other sites

I tried that Rocky, however the site then just serves up an error message.

 

Are there any clues in the fact that the extra price showing is the price in the last box plus VAT?

 

The text seems to have a calculation working on it before being displayed.

Link to comment
Share on other sites

Cheers Rocky.  error message here - this is all that shows when the shop page loads. :

 

[PrestaShopDatabaseException]

Unknown column 'posters' in 'where clause'


SELECT * FROM ps_category_product cp
            LEFT JOIN ps_category_shop cps ON cp.id_category = cps.id_category
            WHERE     cps.id_shop = 1 AND
            cp.id_product = 3 AND cp.id_category IN (posters) LIMIT 1

at line 791 in file classes/db/Db.php
786.         if ($webservice_call && $errno) {
787.             $dbg = debug_backtrace();
788.             WebserviceRequest::getInstance()->setError(500, '

 '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
789.         } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {
790.             if ($sql) {
791.                 throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
792.             }
793.
794.             throw new PrestaShopDatabaseException($this->getMsgError());
795.         }
796.     }
DbCore->displayError - [line 425 - classes/db/Db.php] - [1 Arguments]
DbCore->query - [line 643 - classes/db/Db.php] - [1 Arguments]
DbCore->executeS - [line 161 - modules/categoryquantitydiscount/categoryquantitydiscount.php] - [1 Arguments]
CategoryQuantityDiscount->getRealQuantity - [line 161 - override/classes/Product.php] - [3 Arguments]
Product::getPriceStatic - [line 4291 - classes/Product.php] - [4 Arguments]
ProductCore::getProductProperties - [line 4423 - classes/Product.php] - [2 Arguments]
ProductCore::getProductsProperties - [line 794 - classes/Category.php] - [2 Arguments]
CategoryCore->getProducts - [line 130 - modules/homefeatured/homefeatured.php] - [4 Arguments]
HomeFeatured->_cacheProducts - [line 140 - modules/homefeatured/homefeatured.php]
HomeFeatured->hookDisplayHomeTab - [line 587 - classes/Hook.php] - [1 Arguments]
HookCore::coreCallHook - [line 542 - classes/Hook.php] - [3 Arguments]
HookCore::exec - [line 41 - controllers/front/IndexController.php] - [1 Arguments]
IndexControllerCore->initContent - [line 189 - classes/controller/Controller.php]
ControllerCore->run - [line 367 - classes/Dispatcher.php]
DispatcherCore->dispatch - [line 28 - index.php]
Edited by SkaFace (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...