Larry Baldwin Posted October 31, 2013 Share Posted October 31, 2013 If i login and click disconnect , nothing happens , just a page refresh.If i am logged in and go on Home Page , it doesn`t shows me i am logged in.After , i hit F5 and it shows that i am logged.If i add a product to cart , it redirects me to card as it should but after, if i go to see other products it shows EMPTY CART. If i hit F5 it shows the correct cart. After i hit refresh it stays the same , correct cart. On Back Office i have delays and new informations are showing only if i hit ctrl+f5 ( chrome ) On server was installed recently KeepAlive module - I don`t know if has something to do with this matter but i guess to share this. If KeepAlive apache module is the problem , can someone tell me how to configure it to work with prestashop ? If needed i can give logins ( to users that have strong history on this forum ) . Problem is mentioned on forge also : http://forge.prestashop.com/browse/PSCFV-10881 http://fancumparaturi.ro/phpinfo.php - for php configuration. Informații despre serverInformații despre server: Linux #1 SMP Tue Jul 16 23:51:20 UTC 2013 x86_64Versiunea softului serverului: ApacheVersiunea PHP: 5.3.27Limita memoriei: 1024MTimpul maxim de execuție: 30Informații despre baza de dateVersiune MySQL: 5.5.32-cllMotor MySQL: InnoDBPrefix tabele: ps_Informații despre magazinVersiune Prestashop: 1.5.6.0URL magazin: http://fancumparaturi.ro/Tema curentă folosită: goConfigurație e-mailMetoda e-mail: Folosești proprii parametri SMTP.Server SMTP: smtp.gmail.comUtilizator SMTP: DefinitParola SMTP: DefinitCriptarea: sslPort: 465 Parametrii obligatorii: OKParametrii opționali: OK Link to comment Share on other sites More sharing options...
Larry Baldwin Posted October 31, 2013 Author Share Posted October 31, 2013 Buump ! I really need this solved ! Link to comment Share on other sites More sharing options...
Larry Baldwin Posted October 31, 2013 Author Share Posted October 31, 2013 Dev mode on : Errors in back office: Strict Standards: Declaration of Link::getModuleLink() should be compatible with that of LinkCore::getModuleLink() in /home/xsusors/public_html/override/classes/Link.php on line 10Strict Standards: Declaration of Dispatcher::createUrl() should be compatible with that of DispatcherCore::createUrl() in /home/xsusors/public_html/override/classes/Dispatcher.php on line 10 Errors on index FRONT OFFICE : Strict Standards: Declaration of Link::getModuleLink() should be compatible with that of LinkCore::getModuleLink() in /home/xsusors/public_html/override/classes/Link.php on line 10Strict Standards: Declaration of Dispatcher::createUrl() should be compatible with that of DispatcherCore::createUrl() in /home/xsusors/public_html/override/classes/Dispatcher.php on line 10Warning: Cannot modify header information - headers already sent by (output started at /home/xsusors/public_html/override/classes/Link.php:10) in /home/xsusors/public_html/classes/controller/FrontController.php on line 751Notice: Undefined variable: res2 in /home/xsusors/public_html/modules/googlesnippet/googlesnippet.php on line 265Notice: Undefined variable: prices in /home/xsusors/public_html/modules/googlesnippet/googlesnippet.php on line 267 Link to comment Share on other sites More sharing options...
Larry Baldwin Posted October 31, 2013 Author Share Posted October 31, 2013 I have seen that i had problems with a module i deactivate it and now i have no errors with dev mode set to true. I am still writing here in hope that someone answers Link to comment Share on other sites More sharing options...
Larry Baldwin Posted October 31, 2013 Author Share Posted October 31, 2013 Anyone ? Please ? Something ? Link to comment Share on other sites More sharing options...
Larry Baldwin Posted October 31, 2013 Author Share Posted October 31, 2013 Just saying , in case someone replies , i have tried already with : different browsers , different pc`s , clear cookies&cache , disabled keepalive module. Nothing happened. Link to comment Share on other sites More sharing options...
Larry Baldwin Posted November 1, 2013 Author Share Posted November 1, 2013 Buuuuumpppppp..... Link to comment Share on other sites More sharing options...
Larry Baldwin Posted November 1, 2013 Author Share Posted November 1, 2013 Buuumpppppp Link to comment Share on other sites More sharing options...
El Patron Posted November 1, 2013 Share Posted November 1, 2013 fyi: it's against forum rules to 'bump' that being said, can you check the following: back office-->preferences-->seo & urls scroll down to 'Set shop URL' what do you have in Shop Domain and SSL domain fields. Link to comment Share on other sites More sharing options...
Larry Baldwin Posted November 2, 2013 Author Share Posted November 2, 2013 @El Patron - Prestashop Fanatic - I am saying this because you know why ! I wounder if have used the same "bump" when u needed some help from the community when u were starting with Prestashop. I have a live shop with about 20 orders / day , so please , understand that i am pretty desperate right now. Now , if u still want to help me , even if i said bump about 5 times , i have set the URLs like this : Shop URL : fancumparaturi.ro SSL domain : fancumparaturi.ro Base URL : / Thank you ! And , sorry for so many buumps. Link to comment Share on other sites More sharing options...
Larry Baldwin Posted November 2, 2013 Author Share Posted November 2, 2013 I observed that maybe it is a smarty issue cause , on Back Office , if i have a new order , the js is updating , i mean , the little icon from top with new order is updating , but on order list , new orders appear only if i hit F5. Also on order page ( OPC ) , js is working , if u setup a new account js is loading correctly. Just mentioning that the website is the one from my signature. Link to comment Share on other sites More sharing options...
El Patron Posted November 2, 2013 Share Posted November 2, 2013 can you contact your hosting provider and as if 'varnish' cache is enabled on your hosting account. If it is ask them to turn it off. Link to comment Share on other sites More sharing options...
Larry Baldwin Posted November 4, 2013 Author Share Posted November 4, 2013 I am doing right now. I will reply after. Link to comment Share on other sites More sharing options...
Larry Baldwin Posted November 4, 2013 Author Share Posted November 4, 2013 Reply from hosting was : On your VPS , right now, u do not have varnish installed. Link to comment Share on other sites More sharing options...
Mohammad Nazrul Posted November 4, 2013 Share Posted November 4, 2013 Hi Larry Baldwin, There may be some reasons for happing this problem. 1.) If browser is not accept cookie [this is not in your case, because you told problem with a module] 2.) Conflickting cookie already exist in browser [also not applicable] 3.) Front-office Context cookie is empty any how or not store Customer info or any others. I think number 3 is applicabale, as you problem with the certail module. Notice: Undefined variable: res2 in /home/xsusors/public_html/modules/googlesnippet/googlesnippet.php on line 265Notice: Undefined variable: prices in /home/xsusors/public_html/modules/googlesnippet/googlesnippet.php on line 267 Go to that file try to declare $es2 & $prices ; assign default value null. Also try to find out why $res2 is undefined. If you can show full source codes of that file I can help you much. May you can use pastebin Thanks Link to comment Share on other sites More sharing options...
Larry Baldwin Posted November 4, 2013 Author Share Posted November 4, 2013 Code for ../modules/googlesnippet/googlesnippet.php : <?php ini_set('allow_url_fopen',true); class GoogleSnippet extends Module { private $_html = ''; private $_postErrors = array(); function __construct() { $this->name = 'googlesnippet'; if(_PS_VERSION_ > "1.4.0.0" && _PS_VERSION_ < "1.5.0.0"){ $this->tab = 'administration'; $this->author = 'RSI'; $this->need_instance = 0; } elseif(_PS_VERSION_ > "1.5.0.0"){ $this->tab = 'administration'; $this->author = 'RSI'; } else{ $this->tab = 'Tools'; } $this->version = '1.2'; parent::__construct(); $this->displayName = $this->l('Google Rich Snippet'); $this->description = $this->l('Add google snippet to your site - www.catalogo-onlinersi.com.ar'); } function install() { global $fh; if (!Configuration::updateValue('GOOGLESNIPPET_NBR', 'https://plus.google.com/118067945609961636215/posts') OR !parent::install() OR !$this->registerHook('header') /* OR !$this->registerHook('extraLeft')*/) return false; @chmod(_PS_THEME_DIR_."product.tpl", 0777 ); $str = ""; if($fh = fopen(_PS_THEME_DIR_.'product.tpl', 'r')){ while(!feof($fh)){ $str .= fgets ($fh); } $str = str_replace('<div id="primary_block" class="clearfix">','<article itemscope itemtype="http://schema.org/Product"><div id="primary_block" class="clearfix">', $str); $str = str_replace('id="bigpic"','id="bigpic" itemprop="image"', $str); $str = str_replace('<h1>','<h1 itemprop="name">', $str); $str = str_replace('<h2>{$product->name|escape:\'htmlall\':\'UTF-8\'}</h2>','<h2 itemprop="name">{$product->name|escape:\'htmlall\':\'UTF-8\'}</h2>', $str); $str = str_replace('id="short_description_content"','id="short_description_content" itemprop="description"', $str); $str = str_replace('id="short_description_block"','id="short_description_block" itemprop="description"', $str); $str = str_replace('class="editable"','class="editable" itemprop="sku"', $str); $str = str_replace('id="availability_value"','id="availability_value" itemprop="availability"', $str); $str = str_replace('id="our_price_display"','id="our_price_display" itemprop="price"', $str); $str = str_replace('id="buy_block"','id="buy_block" itemprop="offers" itemscope itemtype="http://schema.org/Offer"' $str); fclose($fh); @chmod(_PS_THEME_DIR_."product.tpl", 0644 ); $x42 = fopen (_PS_THEME_DIR_.'product.tpl', "w"); fwrite ($x42,$str); } else { die ("Error opening file in ".__FILE__." on line ".__LINE."."); } return true; } public function uninstall() { if (parent::uninstall() == false) return false; chmod("../themes/"._THEME_NAME_."/product.tpl", 0777 ); $str = ""; if($fh = fopen('../themes/'._THEME_NAME_.'/product.tpl', 'r')){ while(!feof($fh)){ $str .= fgets ($fh); } $str = str_replace('<article itemscope itemtype="http://schema.org/Product"><div id="primary_block" class="clearfix">','<div id="primary_block" class="clearfix">', $str); $str = str_replace('id="bigpic" itemprop="image"','id="bigpic"', $str); $str = str_replace('<h1 itemprop="name">','<h1>', $str); $str = str_replace('id="short_description_content" itemprop="description"','id="short_description_content"', $str); $str = str_replace('id="short_description_block" itemprop="description"','id="short_description_block"', $str); $str = str_replace('class="editable" itemprop="sku"','class="editable"', $str); $str = str_replace('id="availability_value" itemprop="availability"','id="availability_value"', $str); $str = str_replace('id="our_price_display" itemprop="price"','id="our_price_display"', $str); $str = str_replace('id="buy_block" itemprop="offers" itemscope itemtype="http://schema.org/Offer",id="buy_block"' $str); fclose($fh); @chmod("../themes/"._THEME_NAME_."/product.tpl", 0644 ); $x42 = fopen (_PS_THEME_DIR_.'product.tpl', "w"); fwrite ($x42,$str); } else { die ("Error opening file in ".__FILE__." on line ".__LINE."."); } return true; } public function postProcess() { global $currentIndex; $errors = false; if ($errors) echo $this->displayError($errors); } public function displayForm() { global $cookie; $defaultLanguage = intval(Configuration::get('PS_LANG_DEFAULT')); $languages = Language::getLanguages(); $iso = Language::getIsoById($defaultLanguage); $divLangName = 'link_label'; /*print _PS_THEME_DIR_."/contact-form.tpl";*/ $this->_html .= ' <form action="'.$_SERVER['REQUEST_URI'].'" method="post" id="form"> <fieldset><legend><img src="'.$this->_path.'logo.gif" alt="" title="" />'.$this->l('Settings').'</legend> <p>'.$this->l('Test your product page here: http://www.google.com/webmasters/tools/richsnippets').'</p> <input type="text" size="100" name="nbr" value="'.Tools::getValue('nbr', Configuration::get('GOOGLESNIPPET_NBR')).'" /> <p>'.$this->l('Put your google plus profile like : https://plus.google.com/118067945609961636215/posts').'</p> <center><input type="submit" name="submitGoogleSnippet" value="'.$this->l('Save').'" class="button" /></center><br/> <center><a href="../modules/googlesnippet/moduleinstall.pdf">README</a></center><br/> <center><a href="../modules/googlesnippet/termsandconditions.pdf">TERMS</a></center><br/> </form> </fieldset> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <fieldset><legend><img src="'.$this->_path.'logo.gif" alt="" title="" />'.$this->l('Contribute').'</legend> <p class="clear">'.$this->l('You can contribute with a donation if our free modules and themes are usefull for you. Clic on the link and support us!').'</p> <p class="clear">'.$this->l('For more modules & themes visit: www.catalogo-onlinersi.com.ar').'</p> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="HMBZNQAHN9UMJ"> <input type="image" src="https://www.paypalobjects.com/WEBSCR-640-20110401-1/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypalobjects.com/WEBSCR-640-20110401-1/en_US/i/scr/pixel.gif" width="1" height="1"> </fieldset> </form>'; return $this->_html; } public function getContent() { $this->postProcess(); global $cookie,$currentIndex; if (Tools::isSubmit('submitGoogleSnippet')) { $nbr = Tools::getValue('nbr'); $text = Tools::getValue('text'); Configuration::updateValue('GOOGLESNIPPET_NBR', $nbr); Configuration::updateValue('GOOGLESNIPPET_TEXT', $text); $this->_html .= @$errors == '' ? $this->displayConfirmation('Settings updated successfully') : @$errors; } return $this->displayForm(); } function hookExtraLeft($params) { return $this->display(__FILE__, 'googlesnippet-footer.tpl'); } public function getProductscath($id_product) { $result = Db::getInstance()->getRow(' SELECT COUNT(pc.`grade`) AS totalCount FROM '._DB_PREFIX_.'product_comment pc WHERE pc.id_product = '.$id_product.''); return $result['totalCount']; } public function getProductscathsum($id_product) { $result = Db::getInstance()->getRow(' SELECT SUM(pc.`grade`) AS totalCount FROM '._DB_PREFIX_.'product_comment pc WHERE pc.id_product = '.$id_product.''); return $result['totalCount']; } public function getPages($objidvideo) { $result = Db::getInstance()->ExecuteS(' SELECT pt.`id_page_type`,pt.`name`,p.`id_page_type`,p.`id_page`,p.`id_object` FROM `'._DB_PREFIX_.'page` p LEFT JOIN `'._DB_PREFIX_.'page_type` pt ON p.`id_page_type` = pt.`id_page_type` WHERE p.`id_page` = '.$objidvideo.' LIMIT 1'); return ($result); } function hookHeader($params) { global $smarty, $psversion, $res; $objidvideo=Page::getCurrentId(); $objres = $this->getPages($objidvideo); foreach ($objres as $obre) { $idnamev = $obre['name']; } $plusname = Configuration::get('GOOGLESNIPPET_NBR'); if($idnamev == "product" || $idnamev == "product.php"){ $id_product = intval(Tools::getValue('id_product')); $prices = Product::getPriceStatic($id_product); $res = GoogleSnippet::getProductscath($id_product); @$res2 = round(GoogleSnippet::getProductscathsum($id_product)/$res,0); } $psversion = _PS_VERSION_; $smarty->assign(array( 'psversion' => $psversion)); $smarty->assign(array( 'res' => $res)); $smarty->assign(array( 'res2' => $res2)); $smarty->assign(array( 'plusname' => $plusname)); $smarty->assign(array( 'prices' => $prices)); if(_PS_VERSION_ > "1.5.0.0") { //return $this->display(__FILE__, 'googlesnippet-header.tpl'); } if(_PS_VERSION_ < "1.5.0.0" && _PS_VERSION_ > "1.4.0.0") { // return $this->display(__FILE__, 'googlesnippet-header2.tpl'); } if(_PS_VERSION_ < "1.4.0.0") { // return $this->display(__FILE__, 'googlesnippet-header3.tpl'); } } } ?> Link to comment Share on other sites More sharing options...
Larry Baldwin Posted November 4, 2013 Author Share Posted November 4, 2013 Also i got a reply from hosting that is trying to help me find the problem : They are saying that i have mod_expires in htacces ,and maybe that is the problem. They are not prestashop experts , they just trying to help. The directive they are refering to : <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/gif "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType text/css "access plus 1 week" ExpiresByType text/javascript "access plus 1 week" ExpiresByType application/javascript "access plus 1 week" ExpiresByType application/x-javascript "access plus 1 week" ExpiresByType image/x-icon "access plus 1 year" </IfModule> Link to comment Share on other sites More sharing options...
Mohammad Nazrul Posted November 4, 2013 Share Posted November 4, 2013 Hi Larry Baldwin I have found one serous error for now (may be more errors) @ line 62 : $str = str_replace('id="buy_block"','id="buy_block" itemprop="offers" itemscope itemtype="http://schema.org/Offer"' $str); please replace with $str = str_replace('id="buy_block"','id="buy_block" itemprop="offers" itemscope itemtype="http://schema.org/Offer"',$str); ------------------ I am confused about the url @line 40 : Configuration::updateValue('GOOGLESNIPPET_NBR', 'https://plus.google....961636215/posts') please make "https://plus.google....961636215/posts" is correct. FYI there is no .com or others. Let me know the problem is not solved yet. Link to comment Share on other sites More sharing options...
Larry Baldwin Posted November 4, 2013 Author Share Posted November 4, 2013 Dev mode on : Notice: Undefined variable: res2 in /home/xsusors/public_html/modules/googlesnippet/googlesnippet.php on line 265Notice: Undefined variable: prices in /home/xsusors/public_html/modules/googlesnippet/googlesnippet.php on line 267 Made the changes u mentioned above and with DEV MOD on that was what i was getting. Link to comment Share on other sites More sharing options...
Mohammad Nazrul Posted November 4, 2013 Share Posted November 4, 2013 (edited) 0.) Uninstall the module. 1.) Disable Cache 2.) Check Force compilation [AP -> Performence] 3.) Goto template directory & check product.tpl [it may be empty]; replace original one with write permission. 4.) Install module ----------------------------------- Make sure you submit a valid Google+ profile url Let me know, I will fix Edited November 4, 2013 by Mohammad Nazrul (see edit history) Link to comment Share on other sites More sharing options...
Larry Baldwin Posted November 4, 2013 Author Share Posted November 4, 2013 I have made a backup of product.tpl I have deactivated and uninstalled the module. Cleared cache/smarty , and force compiled. All working at first sight on Front Office. On Back office , works only with CTRL+F5. Dev mode on , only on product page appears this : Warning: Function getCurrent() is deprecated in /home/xsusors/public_html/modules/piwik/piwik.php on line 281in /home/xsusors/public_html/classes/Tools.php on line 1961 Product TPL is not empty - Checked. Goto template directory & check product.tpl [it may be empty]; replace original one with write permission. I don`t understand this, sorry I need to upload original theme product.tpl over the existing one ? Link to comment Share on other sites More sharing options...
Mohammad Nazrul Posted November 4, 2013 Share Posted November 4, 2013 I don`t understand this, sorry I need to upload original theme product.tpl over the existing one ? Ya, you can try with original one. Then will do more fix if required Link to comment Share on other sites More sharing options...
Larry Baldwin Posted November 4, 2013 Author Share Posted November 4, 2013 Done that. No change. Link to comment Share on other sites More sharing options...
Larry Baldwin Posted November 4, 2013 Author Share Posted November 4, 2013 What is wierd , is that even on Back Office is the same issue. New informations appear only after CTRL+F5 Link to comment Share on other sites More sharing options...
Mohammad Nazrul Posted November 4, 2013 Share Posted November 4, 2013 Warning: Function getCurrent() is deprecated in /home/xsusors/public_html/modules/piwik/piwik.php on line 281 in /home/xsusors/public_html/classes/Tools.php on line 1961 Try to disable piwik module or DEV mode off. Let me know Link to comment Share on other sites More sharing options...
Larry Baldwin Posted November 4, 2013 Author Share Posted November 4, 2013 Same issues on backoffice. I disabled Piwik. I went to backoffice and updated status for an order from Preparation in progres to Shipped. Page loaded but nothing changed. I have hit CTRL+F5 and new status appeared. Link to comment Share on other sites More sharing options...
Larry Baldwin Posted November 4, 2013 Author Share Posted November 4, 2013 Just a mention : i have the exact theme&modules on localhost and working flawless. i have installed the exact theme&modules on another domain on my server and it is working. Link to comment Share on other sites More sharing options...
Mohammad Nazrul Posted November 4, 2013 Share Posted November 4, 2013 Can you please let me your shop url ? Link to comment Share on other sites More sharing options...
El Patron Posted November 4, 2013 Share Posted November 4, 2013 were you able to contact your hosting company and ask if 'varnish' cache was active? Link to comment Share on other sites More sharing options...
Larry Baldwin Posted November 5, 2013 Author Share Posted November 5, 2013 The shop url is my signature : http://fancumparaturi.ro @El Patron - the hosting told me that varnish is not installed on my server. I mentioned this in the previous page. Link to comment Share on other sites More sharing options...
Mohammad Nazrul Posted November 5, 2013 Share Posted November 5, 2013 Larry Baldwin From here I can add to cart from your provided link. Try to clear your browser's cache, all cookies & all data. Link to comment Share on other sites More sharing options...
Larry Baldwin Posted November 5, 2013 Author Share Posted November 5, 2013 I cleared cache/cookies , tried with 3 different browsers to change order status from Preparation in progress to canceled. Status changed but appeared only after i hit CTRL+F5. On front office i have logged in , all good , clicked disconnect and nothing hapened even if the page has reloaded. Clicked again that awesome CTRL+F5 , appeared as logged out. Link to comment Share on other sites More sharing options...
Larry Baldwin Posted November 7, 2013 Author Share Posted November 7, 2013 I was going to say Buump , but i am not saying cause it`s agains rules. So , anyone , can please help me with this smarty issue ? Anyone ? Link to comment Share on other sites More sharing options...
gemus Posted November 16, 2013 Share Posted November 16, 2013 Hi! Do you have a wordpress installation with W3 Total Cache plugin in the root of the domain? I have the same problem, I have a website with Wordpress and W3 Total Cache in the root domain, and Prestashop installed in a subfolder, and if I disable the W3 Total Cache, Prestashop login/logout works fine. Link to comment Share on other sites More sharing options...
Larry Baldwin Posted November 20, 2013 Author Share Posted November 20, 2013 I have a blog installed on a subdomain. Just mentioning that problems appeared only i have installed new theme. Maybe it is related ? On subdomain ( on blog ) , i have installed for cache ( wordpress ) , this module : Quick Cache. Link to comment Share on other sites More sharing options...
Larry Baldwin Posted November 27, 2013 Author Share Posted November 27, 2013 So , still no resolution over here. Please , someone ? Link to comment Share on other sites More sharing options...
sagenterprises Posted June 23, 2015 Share Posted June 23, 2015 Same problem with me. Did you got any solution to this. Link to comment Share on other sites More sharing options...
Recommended Posts