Jump to content


Global Moderators
  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by razaro

  1. Ok try with this for blocksocial_top.tpl <div id="social_block_top" class="col-sm-4 clearfix"> <h4 class="title_block_top">{l s='Follow us' mod='blocksocial'}</h4> <ul> {if $facebook_url != ''}<li class="facebook_top"><a class="_blank" href="{$facebook_url|escape:html:'UTF-8'}"><span>{l s='Facebook' mod='blocksocial'}</span></a></li>{/if} {if $twitter_url != ''}<li class="twitter_top"><a class="_blank" href="{$twitter_url|escape:html:'UTF-8'}"><span>{l s='Twitter' mod='blocksocial'}</span></a></li>{/if} {if $youtube_url != ''}<li class="youtube_top"><a class="_blank" href="{$youtube_url|escape:html:'UTF-8'}"><span>{l s='YouTube' mod='blocksocial'}</span></a></li>{/if} {if $google_plus_url != ''}<li class="google_plus_top"><a class="_blank" href="{$google_plus_url|escape:html:'UTF-8'}"><span>{l s='Google+' mod='blocksocial'}</span></a></li>{/if} {if $pinterest_url != ''}<li class="pinterest_top"><a class="_blank" href="{$pinterest_url|escape:html:'UTF-8'}"><span>{l s='Pinterest' mod='blocksocial'}</span></a></li>{/if} {if $instagram_url != ''}<li class="instagram_top"><a class="_blank" href="{$instagram_url|escape:html:'UTF-8'}"><span>{l s='Instagram' mod='blocksocial'}</span></a></li>{/if} </ul> </div> Then add these css syles after yours #social_block_top { margin-top: 30px; } #social_block_top h4 { display: none; } #social_block_top ul li a { display: inline-block; color: #916E6E; font-size: 24px; } And if that cache causes issues change to public function hookDisplayTop() { $this->smarty->assign(array( 'facebook_url' => Configuration::get('BLOCKSOCIAL_FACEBOOK'), 'twitter_url' => Configuration::get('BLOCKSOCIAL_TWITTER'), 'rss_url' => Configuration::get('BLOCKSOCIAL_RSS'), 'youtube_url' => Configuration::get('BLOCKSOCIAL_YOUTUBE'), 'google_plus_url' => Configuration::get('BLOCKSOCIAL_GOOGLE_PLUS'), 'pinterest_url' => Configuration::get('BLOCKSOCIAL_PINTEREST'), 'vimeo_url' => Configuration::get('BLOCKSOCIAL_VIMEO'), 'instagram_url' => Configuration::get('BLOCKSOCIAL_INSTAGRAM'), )); return $this->display(__FILE__, 'blocksocial-top.tpl'); } I got this as result
  2. @bellini13 Think he uses https://prestashopmodul.com/en/home/35-prestashop-3d-sanalpospro-payu-ipara.html @blackwinds And to ask also you make orders by your self in back office ? Looks to me like cart id is not connected correctly with modules validateOrder.
  3. Not sure if this could help you but check in back office > modules > payment , scroll down a bit, if there are currency and group restriction checked.
  4. Sorry if explanation was not too clear. Few thing to clear out, first displayHeader hook is mostly only used for linking js and css files. That module have .css in code but it is not needed because like you said all code is in global.css. For css code you said you have added custom class, good. So then copy that css code and replace .footer-container #footer with your class. You can be more specific also so check maybe you have div with id header so in code you can use maybe #header .blocksocial-top for example if blocksocial-top is your custom class. Also I suggested you add displayTop hook and then transplant module to that hook. Because that one have modules in header/top. And it is different then displayHeader. And if you need some more explanations or some help with css, you can PM me your website if you do not want to post links in forum.
  5. Not sure if something like that exist, but custom module can be made that adds that "button". You can check for example Wishlist module https://github.com/PrestaShop/blockwishlist/blob/master/blockwishlist.php have hookProductAction function that adds wishlist button next to add to cart. There is module for shortcodes but it is paid https://www.prestashop.com/forums/topic/348881-prestashop-short-code/ . And sorry missed that question, but no, you can't use WorPress plugins in Prestashop.
  6. If it is just html and js code then that module should be enough. You probably will need to restrict that module only to that custom page. So not sure of exact code, but maybe custom hook from that tutorial that you add to cms.tpl probably need to be inside condition like in my previous post.
  7. You can do that in couple of ways. One is if you have those icons in footer and want same for header. Then you can try to add this code blocksocial.php public function hookDisplayTop() { return $this->hookDisplayFooter(); } and then Transplant module to displayTop hook and move it after to right position. Other way, is to have new tpl file, so code could be public function hookDisplayTop() { if (!$this->isCached('blocksocial-top.tpl', $this->getCacheId())) $this->smarty->assign(array( 'facebook_url' => Configuration::get('BLOCKSOCIAL_FACEBOOK'), 'twitter_url' => Configuration::get('BLOCKSOCIAL_TWITTER'), 'rss_url' => Configuration::get('BLOCKSOCIAL_RSS'), 'youtube_url' => Configuration::get('BLOCKSOCIAL_YOUTUBE'), 'google_plus_url' => Configuration::get('BLOCKSOCIAL_GOOGLE_PLUS'), 'pinterest_url' => Configuration::get('BLOCKSOCIAL_PINTEREST'), 'vimeo_url' => Configuration::get('BLOCKSOCIAL_VIMEO'), 'instagram_url' => Configuration::get('BLOCKSOCIAL_INSTAGRAM'), )); return $this->display(__FILE__, 'blocksocial-top.tpl', $this->getCacheId()); } and then create new blocksocial-top.tpl file in modules/blocksocial folder. In that file you can place similar code to original one.
  8. Prestashop have some free plugins but much less in number then WordPress and also they are nowhere near organised like in WordPress. But most of free ones for Prestashop is good written and useful. There is Free module section , but could you explain what you mean by Buttons plugin ?
  9. Could you be bit more specific ? What do you mean by visible on all pages ? Do you maybe have some error so footer is not displaying? Or you maybe wont both to be static and visible all time and main content to be scrollable ?
  10. Well depends how complex you want this it can be in few ways. If you have one specific category you can just edit product.tpl (10 is example id of category you want) {if $product->id_category_default eq 10} <div itemscope itemtype="http://schema.org/Product"> New code </div> {else} <div itemscope itemtype="http://schema.org/Product"> current code </div> {/if} Other solution is to override ProductController.php initcontent function <?php class ProductController extends ProductControllerCore { public function initContent() { FrontController::initContent(); if (!$this->errors) { if (Pack::isPack((int)$this->product->id) && !Pack::isInStock((int)$this->product->id)) $this->product->quantity = 0; $this->product->description = $this->transformDescriptionWithImg($this->product->description); // Assign to the template the id of the virtual product. "0" if the product is not downloadable. $this->context->smarty->assign('virtual', ProductDownload::getIdFromIdProduct((int)$this->product->id)); $this->context->smarty->assign('customizationFormTarget', Tools::safeOutput(urldecode($_SERVER['REQUEST_URI']))); if (Tools::isSubmit('submitCustomizedDatas')) { // If cart has not been saved, we need to do it so that customization fields can have an id_cart // We check that the cookie exists first to avoid ghost carts if (!$this->context->cart->id && isset($_COOKIE[$this->context->cookie->getName()])) { $this->context->cart->add(); $this->context->cookie->id_cart = (int)$this->context->cart->id; } $this->pictureUpload(); $this->textRecord(); $this->formTargetFormat(); } elseif (Tools::getIsset('deletePicture') && !$this->context->cart->deleteCustomizationToProduct($this->product->id, Tools::getValue('deletePicture'))) $this->errors[] = Tools::displayError('An error occurred while deleting the selected picture.'); $pictures = array(); $text_fields = array(); if ($this->product->customizable) { $files = $this->context->cart->getProductCustomization($this->product->id, Product::CUSTOMIZE_FILE, true); foreach ($files as $file) $pictures['pictures_'.$this->product->id.'_'.$file['index']] = $file['value']; $texts = $this->context->cart->getProductCustomization($this->product->id, Product::CUSTOMIZE_TEXTFIELD, true); foreach ($texts as $text_field) $text_fields['textFields_'.$this->product->id.'_'.$text_field['index']] = str_replace('<br />', "\n", $text_field['value']); } $this->context->smarty->assign(array( 'pictures' => $pictures, 'textFields' => $text_fields)); $this->product->customization_required = false; $customization_fields = $this->product->customizable ? $this->product->getCustomizationFields($this->context->language->id) : false; if (is_array($customization_fields)) foreach ($customization_fields as $customization_field) if ($this->product->customization_required = $customization_field['required']) break; // Assign template vars related to the category + execute hooks related to the category $this->assignCategory(); // Assign template vars related to the price and tax $this->assignPriceAndTax(); // Assign template vars related to the images $this->assignImages(); // Assign attribute groups to the template $this->assignAttributesGroups(); // Assign attributes combinations to the template $this->assignAttributesCombinations(); // Pack management $pack_items = Pack::isPack($this->product->id) ? Pack::getItemTable($this->product->id, $this->context->language->id, true) : array(); $this->context->smarty->assign('packItems', $pack_items); $this->context->smarty->assign('packs', Pack::getPacksTable($this->product->id, $this->context->language->id, true, 1)); if (isset($this->category->id) && $this->category->id) $return_link = Tools::safeOutput($this->context->link->getCategoryLink($this->category)); else $return_link = 'javascript: history.back();'; $accessories = $this->product->getAccessories($this->context->language->id); if ($this->product->cache_is_pack || count($accessories)) $this->context->controller->addCSS(_THEME_CSS_DIR_.'product_list.css'); $this->context->smarty->assign(array( 'stock_management' => Configuration::get('PS_STOCK_MANAGEMENT'), 'customizationFields' => $customization_fields, 'accessories' => $accessories, 'return_link' => $return_link, 'product' => $this->product, 'product_manufacturer' => new Manufacturer((int)$this->product->id_manufacturer, $this->context->language->id), 'token' => Tools::getToken(false), 'features' => $this->product->getFrontFeatures($this->context->language->id), 'attachments' => (($this->product->cache_has_attachments) ? $this->product->getAttachments($this->context->language->id) : array()), 'allow_oosp' => $this->product->isAvailableWhenOutOfStock((int)$this->product->out_of_stock), 'last_qties' => (int)Configuration::get('PS_LAST_QTIES'), 'HOOK_EXTRA_LEFT' => Hook::exec('displayLeftColumnProduct'), 'HOOK_EXTRA_RIGHT' => Hook::exec('displayRightColumnProduct'), 'HOOK_PRODUCT_OOS' => Hook::exec('actionProductOutOfStock', array('product' => $this->product)), 'HOOK_PRODUCT_ACTIONS' => Hook::exec('displayProductButtons', array('product' => $this->product)), 'HOOK_PRODUCT_TAB' => Hook::exec('displayProductTab', array('product' => $this->product)), 'HOOK_PRODUCT_TAB_CONTENT' => Hook::exec('displayProductTabContent', array('product' => $this->product)), 'HOOK_PRODUCT_CONTENT' => Hook::exec('displayProductContent', array('product' => $this->product)), 'display_qties' => (int)Configuration::get('PS_DISPLAY_QTIES'), 'display_ht' => !Tax::excludeTaxeOption(), 'jqZoomEnabled' => Configuration::get('PS_DISPLAY_JQZOOM'), 'ENT_NOQUOTES' => ENT_NOQUOTES, 'outOfStockAllowed' => (int)Configuration::get('PS_ORDER_OUT_OF_STOCK'), 'errors' => $this->errors, 'body_classes' => array( $this->php_self.'-'.$this->product->id, $this->php_self.'-'.$this->product->link_rewrite, 'category-'.(isset($this->category) ? $this->category->id : ''), 'category-'.(isset($this->category) ? $this->category->getFieldByLang('link_rewrite') : '') ), 'display_discount_price' => Configuration::get('PS_DISPLAY_DISCOUNT_PRICE'), )); } if ($this->product->id_category_default == 10) $this->setTemplate(_PS_THEME_DIR_.'product-new.tpl'); else $this->setTemplate(_PS_THEME_DIR_.'product.tpl'); } } Note I did not tested this code but should be ok. And you need to add product-new.tpl in your theme directory with code you want. This could be extended further so you override setMedia function and add your new css and js files.
  11. Try maybe with this tutorial https://www.prestashop.com/forums/topic/351932-free-tutorial-how-to-add-hooks-to-prestashop-cms-pages/ but you will need some module that display that content. For hard coding you could try with {if $cms->id eq your_cms_page_id} ....content {/if} in theme cms.tpl file but as you mention some form then probably you will need override of Cmscontroller. These are just some ideas , hope something is useful to you.
  12. There could be different things that cause white page. What is your Prestashop version ,and is theme compatible ? Check this for turning debug mode on so you can see what is causing error and white page https://www.prestashop.com/forums/topic/224525-how-to-turn-on-error-reporting-for-debug-information-blank-page-500-internal-server-error/ And I just checked your website, seams you sorted issue ?
  13. Nice tutorial, hope it will be useful to a lot of people. Could you just add code tag to post.
  14. Hi Rob Just asked question on addons chat answer was V3. Note I do not use this module so not sure when it was running V2 or V3 . Does module you have works? If you have issues with module contact addon team or community manager.
  15. Like El Patron said it is ps_configuration table and it that table try to find values PS_SHOP_NAME and PS_SHOP_EMAIL. That I saw happened when Prestashop is auto installed from Cpanel.
  16. Think you should not worry that much if people know that is Prestashop. If you are worried about security you should know Prestashop is safe and better to concentrate of securing your computer and hosting. And you said you tried to remove meta but I still see <meta name="generator" content="PrestaShop"> Think that should be in header.tpl of your theme. But websites that check what CMS is, probably have bit more checks. For example folder structure people with enough expirience can easily determine what CMS is in question. So writing few rules that check that would not be hard, so removing meta tag maybe might not be enough.
  17. Looks good, without logo on product list for me. Same on product page. Try to clear your browser cache or use private/incognito window.
  18. Try with this, in that override/classes create new file Manufacturer.php with this code <?php class Manufacturer extends ManufacturerCore { public static function getManufacturers($get_nb_products = false, $id_lang = 0, $active = true, $p = false, $n = false, $all_group = false, $group_by = false) { if (!$id_lang) $id_lang = (int)Configuration::get('PS_LANG_DEFAULT'); if (!Group::isFeatureActive()) $all_group = true; $manufacturers = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' SELECT m.*, ml.`description`, ml.`short_description` FROM `'._DB_PREFIX_.'manufacturer` m '.Shop::addSqlAssociation('manufacturer', 'm').' INNER JOIN `'._DB_PREFIX_.'manufacturer_lang` ml ON (m.`id_manufacturer` = ml.`id_manufacturer` AND ml.`id_lang` = '.(int)$id_lang.') '.($active ? 'WHERE m.`active` = 1' : '') .($group_by ? ' GROUP BY m.`id_manufacturer`' : '' ).' ORDER BY m.`name` ASC '.($p ? ' LIMIT '.(((int)$p - 1) * (int)$n).','.(int)$n : '')); if ($manufacturers === false) return false; if ($get_nb_products) { $sql_groups = ''; if (!$all_group) { $groups = FrontController::getCurrentCustomerGroups(); $sql_groups = (count($groups) ? 'IN ('.implode(',', $groups).')' : '= 1'); } $results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' SELECT p.`id_manufacturer`, COUNT(DISTINCT p.`id_product`) as nb_products FROM `'._DB_PREFIX_.'product` p USE INDEX (product_manufacturer) '.Shop::addSqlAssociation('product', 'p').' LEFT JOIN `'._DB_PREFIX_.'manufacturer` as m ON (m.`id_manufacturer`= p.`id_manufacturer`) WHERE p.`id_manufacturer` != 0 AND product_shop.`visibility` NOT IN ("none") '.($active ? ' AND product_shop.`active` = 1 ' : '').' '.(Group::isFeatureActive() && $all_group ? '' : ' AND EXISTS ( SELECT 1 FROM `'._DB_PREFIX_.'category_group` cg LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_category` = cg.`id_category`) WHERE p.`id_product` = cp.`id_product` AND cg.`id_group` '.$sql_groups.' )').' GROUP BY p.`id_manufacturer`' ); $counts = array(); foreach ($results as $result) $counts[(int)$result['id_manufacturer']] = (int)$result['nb_products']; if (count($counts)) foreach ($manufacturers as $key => $manufacturer) if (array_key_exists((int)$manufacturer['id_manufacturer'], $counts)) $manufacturers[$key]['nb_products'] = $counts[(int)$manufacturer['id_manufacturer']]; else $manufacturers[$key]['nb_products'] = 0; } $total_manufacturers = count($manufacturers); $rewrite_settings = (int)Configuration::get('PS_REWRITING_SETTINGS'); for ($i = 0; $i < $total_manufacturers; $i++) $manufacturers[$i]['link_rewrite'] = ($rewrite_settings ? Tools::link_rewrite($manufacturers[$i]['name']) : 0); return $manufacturers; } } Clear cache in Advance Preferences > Preformance. If that does not work you probably have to next update where bug will be fixed. P.S. Please try not to make multiple topics for one issue.
  19. Looks like that bug is fixed. Check https://github.com/PrestaShop/PrestaShop/blob/1.6/classes/Manufacturer.php#L211 and use code from line 211 to 216 if (count($counts)) foreach ($manufacturers as $key => $manufacturer) if (array_key_exists((int)$manufacturer['id_manufacturer'], $counts)) $manufacturers[$key]['nb_products'] = $counts[(int)$manufacturer['id_manufacturer']]; else $manufacturers[$key]['nb_products'] = 0; instead of what you probably have now in classes/Manufacturer.php if (count($counts)) foreach ($manufacturers as $key => $manufacturer) $manufacturers[$key]['nb_products'] = $counts[(int)$manufacturer['id_manufacturer']];
  20. Sorry no other ides, still looks like Watermark module. Try to uninstall it, not just disable. Then clear cache and then regenerate images.
  21. Hmm strange but was a guess. Can you post link to your site ?
  22. You probably have Watermark module enabled. Try to disable and regenerate images again.
  23. @ isabella_brown Are you using Prestashop Cloud ? What is link to your store ? And maybe you can make screenshot of that error.
  24. @ isabella_brown You have same problem ? What module have you bought ?
  25. You need to have div with id center_column in your header.tpl because it is used in jQuery after button is clicked. Check https://github.com/PrestaShop/PrestaShop/blob/1.6/themes/default-bootstrap/header.tpl and https://github.com/PrestaShop/PrestaShop/blob/a2cd4dc5101eaa47c8399a5da7e20319fb1ef0bb/themes/default-bootstrap/js/authentication.js
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More