Jump to content

tesladisk

Members
  • Posts

    33
  • Joined

  • Last visited

Contact Methods

Profile Information

  • Activity
    User/Merchant

tesladisk's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. i am not sure how to do this here is the code of the php if you want to take a look <?php /* * 2007-2012 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2012 PrestaShop SA * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ if (!defined('_CAN_LOAD_FILES_')) exit; class Twittercard extends Module { public function __construct() { $this->name = 'twittercard'; if (version_compare(_PS_VERSION_, '1.4.0.0') >= 0) $this->tab = 'front_office_features'; else $this->tab = 'Blocks'; $this->version = '1.0'; $this -> author = 'dh42'; parent::__construct(); $this->displayName = $this->l('Twitter Card'); $this->description = $this->l('Adds Twitter Cards to your site'); } public function install() { $this->_clearCache('twittercard.tpl'); return (parent::install() && Configuration::updateValue('twitterhandle', '') && Configuration::updateValue('extrainfo1', '') && Configuration::updateValue('extrainfo2', '') && Configuration::updateValue('hometitle', '') && Configuration::updateValue('homedesc', '') && Configuration::updateValue('homelogo', '') && Configuration::updateValue('homelogourl', '') && $this->registerHook('header')); } public function uninstall() { $this->_clearCache('twittercard.tpl'); return ( !Configuration::deleteByName('twitterhandle') || !Configuration::deleteByName('extrainfo1') || !Configuration::deleteByName('extrainfo2') || !Configuration::deleteByName('hometitle') || !Configuration::deleteByName('homedesc') || !Configuration::deleteByName('homelogo') || !Configuration::deleteByName('homelogourl') || parent::uninstall()); } public function getContent() { $html = ''; if (isset($_POST['submitModule'])) { Configuration::updateValue('twitterhandle', ((isset($_POST['twitterhandle']) && $_POST['twitterhandle'] != '') ? $_POST['twitterhandle'] : ''), true); Configuration::updateValue('extrainfo1', Tools::getValue('extrainfo1')); Configuration::updateValue('extrainfo2', Tools::getValue('extrainfo2')); Configuration::updateValue('hometitle', Tools::getValue('hometitle')); Configuration::updateValue('homedesc', Tools::getValue('homedesc')); Configuration::updateValue('homelogo', Tools::getValue('homelogo')); Configuration::updateValue('homelogourl', Tools::getValue('homelogourl')); $html .= '<div class="confirm" style="height: 40px;padding-left: 40px;line-height: 40px;">'.$this->l('Configuration updated').'</div>'; } $html .= ' <h2>'.$this->displayName.'</h2> <form action="'.$_SERVER['REQUEST_URI'].'" method="post"> <fieldset> <p><label for="twitterhandle">'.$this->l('Twitter Name (ex. @designhaus42)').' :</label> <textarea id="twitterhandle" name="twitterhandle" cols="20" rows="1">'.Configuration::get('twitterhandle').'</textarea></p> </fieldset> <fieldset> <p><label for="extrainfo1">'.$this->l('Required Extra Info').' :</label> <textarea id="extrainfo1" name="extrainfo1" cols="40" rows="1">'.Configuration::get('extrainfo1').'</textarea></p> <p><label for="extrainfo2">'.$this->l('Required Extra Info Label').' :</label> <textarea id="extrainfo2" name="extrainfo2" cols="40" rows="1">'.Configuration::get('extrainfo2').'</textarea> <img src="../modules/twittercard/twittercard.png" style="float:right;margin-top:-42px"/> </p> <div class="margin-form"> <p>The same extra info will be displayed on all product pages.</p> </div> </fieldset> <fieldset> <p><label for="hometitle">'.$this->l('Home Page Title').' :</label> <textarea id="hometitle" name="hometitle" cols="40" rows="1">'.Configuration::get('hometitle').'</textarea> </p> <p><label for="homedesc">'.$this->l('Home Page Description limit 200 chars.').' :</label> <textarea id="homedesc" name="homedesc" cols="80" rows="4">'.Configuration::get('homedesc').'</textarea> </p> <div class="margin-form">Home Page Image<br> <input type="radio" name="homelogo" value="1"'.(Configuration::get('homelogo') ? 'checked="checked" ' : '').'> Use logo<br> <input type="radio" name="homelogo" value="0"' .(!Configuration::get('homelogo') ? 'checked="checked" ' : '').'> Use Custom<br> </div> <p><label for="homelogourl">'.$this->l('Custom Image URL').' :</label> <textarea id="homelogourl" name="homelogourl" cols="100" rows="1">'.Configuration::get('homelogourl').'</textarea> </p> <div class="margin-form"> </div> </fieldset> <fieldset> <div class="margin-form"> <input type="submit" name="submitModule" value="'.$this->l('Save').'" class="button" /> <p>You can test your Twitter Cards <a href="https://dev.twitter.com/docs/cards/validation/validator">here.</a> </div> </fieldset> </form> '; return $html; } public function hookHeader($params) { global $smarty, $cookie, $link; $current_page = get_class($this->context->controller); if ($current_page =="ProductController"){ $cover = Product::getCover(intval(Tools::getValue('id_product'))); $productinfo = Product::getCover(intval(Tools::getValue('id_product'))); $product = new Product($_GET['id_product'],false,intval($cookie->id_lang)); if (is_array($cover) && sizeof($cover) == 1) { $fb_cover = ''; $protocol_link = @$_SERVER['HTTPS'] == "on"?"https://":"http://"; if ($id_product = (int)Tools::getValue('id_product')) $product = new Product($id_product, true, $this->context->language->id, $this->context->shop->id); $twitter_image = $link->getImageLink($product->link_rewrite[$cookie->id_lang], Tools::getValue('id_product').'-'.$cover['id_image'],'thickbox_default'); } }else{} if (!$this->isCached('twittercard.tpl', $this->getCacheId())) { global $smarty; if ($current_page =="ProductController"){ $smarty->assign(array( 'twitter_site' => Configuration::get('twitterhandle'), 'twitter_product_name' => $product->name, 'twitter_description' => $product->description_short, 'twitter_currency' => $this->context->currency->sign, 'twitter_image' => $twitter_image, 'twitter_price' => $product->price, 'twitter_extra1' => Configuration::get('extrainfo1'), 'twitter_extra2' => Configuration::get('extrainfo2'), )); }else{ $smarty->assign(array( 'twitter_site' => Configuration::get('twitterhandle'), 'twitter_hometitle' => Configuration::get('hometitle'), 'twitter_homedesc' => Configuration::get('homedesc'), 'twitter_homelogo' => Configuration::get('homelogo'), 'twitter_homelogourl' => Configuration::get('homelogourl') )); } } return $this->display(__FILE__, 'twittercard.tpl', $this->getCacheId()); } }
  2. yes i use twitter card module i disabled it seams the problem is gone i will check the other products and report back thanks vekia
  3. Hi to all i do not know why this is happen but in some of the products i have in my site the short description appears also in the top of the page making the site look odd, in some products all short description appears on top in others only part of it, also the short description continue to display to the home page also, anyone encounder this problem i will like some help thanks image attached also link for one of the problematic pages https://tzabapc.com/en/pc-laptop-cooling/168-zalman-skadi-lq520-dual-fan-radiator-liquid-water-cooling.html
  4. the error you have can be fixed change the default currency and language to the ones you have on ebay if you have a co.uk account you must add default language to en-gb to presta and currency to pounds
  5. same problem with description here any help please
  6. hi prestashop 1.6.0.11 VPS Server running in DSO with Nginx Varnish and Apache Nginx used to act as TLS proxy because Varnish does not work with SSL after the installation of lets encrypt SSL i navigate to PS back office to enable SSL but the only thing is doing after click the link to use the SSL protocol is to refresh without show the button to enable SSL . I have an error in SSl and says not everything is secure such images when visiting back office with https and front office is broken any help please
  7. hi fresh install 1.6.1.4 on my VPS when i upload product images they do not show up in the B.O product edit page F.O is ok is very confusing and time consuming to find what photo to have first second or cover please check image attached help needed
  8. I wanted my new products first inside the category prestashop 1.6 Preferences >Products >Pagination Default Order >By Date Added Default Order Method > Decending Play around with this settings it may fit your needs Regards
  9. i am in unmanaged server no help from host, my server setup is DSO why i have 2 sites and the second one run best with this config i am not coder or expert so i try to learn as more and fast i can the version 1.6.0.9 have many bugs now is confusing the shipping methods and show the same description for all the shipping methods ,and not only that many of the orders have no products and i must go to paypal to find what the customer order also the customer cant see the products in order history . shipping methods is a pain i have 1 free shipping 1 express and one based on weicht for some of the products i sell if a customer buy 2 products with different shipping ends up with a comfuzing shipping page with no sense at all i am in bad luck i think lol
  10. i do not have mod_security installed but if you say is nothing i am happy with that
  11. continue to geting errors anyone know how to fix this PHP Warning: touch(): Utime failed: Permission denied in /home/myaccount/public_html/classes/Tools.php on line 2995, referer: http://mywebsite.com/login i change file permisions from 755 to 777 but nothing happen error continue
  12. i found the problem i look to apache error log and i found the config/xml the file have wrong permisions probably from the last server update dont know when i change the permisions of the xml files work again fine phew i go do drink something to send the stress away
  13. PLEASE HELP i get this in back office Bad SQL query MySQL server has gone away i cant access orders products my sql is ofloaded but i confirm the server is working from my host told me that my script is slow and there is a 10 second timeout and i must use persistent connections but i dont know what to do please anyone who can help me
  14. only paypal latest version with the fixed ssl3 problem Anyone who has fixed this yet?
×
×
  • Create New...