Jump to content

mechworm

Members
  • Posts

    7
  • Joined

  • Last visited

Profile Information

  • First Name
    Bugra
  • Last Name
    Ciftcioglu

mechworm's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I have created a module that is hooked to DisplayProductExtraContent. I want to show some text and an image in the product page tabs with this module. I am able to show the text stored in mymodule.tpl file which is located in \views\templates\hook. However, I can't display the image. I tried {html_image file='myimage.jpg'} in the tpl file but it didn't work. I copied the myimage.jpg to every sub folder of the module and it didn't work neither. How can I display an image in module front office? Thanks for your help!
  2. I want to create a module that shows the product price in the product page tab. With my limited coding and prestashop structure knowledge, I created the module below. Currently, this module works fine and the simple txt html code in "mymodule.tpl" appears in my product page tabs. The next two steps are 1-Calling product price from database in mymodule.php 2-Printing this variable through the mymodule.tpl. ( Call productprice variable from mymodule.php and print it). The problem is that I don't know how to do both. I tried hard but couldn't find a solution. Can someone please help me? Thanks in advance! ---------------------------------------------------------------------------------------------------- <?php if (!defined('_PS_VERSION_')) { exit; } class MyModule extends Module { public function __construct() { $this->name = 'mymodule'; $this->tab = 'front_office_features'; $this->version = '1.0.0'; $this->author = 'Firstname Lastname'; $this->need_instance = 0; $this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_); $this->bootstrap = true; parent::__construct(); $this->displayName = $this->l('My Module'); $this->description = $this->l('Description of my module.'); $this->confirmUninstall = $this->l('Are you sure you want to uninstall?'); if (!Configuration::get('MYMODULE_NAME')) $this->warning = $this->l('No name provided'); } public function install() { if (Shop::isFeatureActive()) Shop::setContext(Shop::CONTEXT_ALL); return parent::install() && $this->registerHook('displayAdminProductsExtra')&& $this->registerHook('displayProductExtraContent')&& $this->registerHook('ActionProductUpdate') && Configuration::updateValue('MYMODULE_NAME', 'my friend'); } public function uninstall() { if (!parent::uninstall() || !Configuration::deleteByName('MYMODULE_NAME') ) return false; return true; } public function hookDisplayProductExtraContent($params) { $content = $this->display(__FILE__, 'mymodule.tpl'); $array[] = (new PrestaShop\PrestaShop\Core\Product\ProductExtraContent()) ->setTitle('My New Tab Title') ->setContent($content); return $array; } } --------------------------------------------------------------------------------------------------------------------------------
  3. Merhabalar, Localization ayarlarında country identifier'ı tr yapınca front office'de tüm sayfalarda şu hatayı alıyorum. Fatal error: Class 'Smarty_Internal_Write_File' not found in /home/abc/public_html/tools/smarty/sysplugins/smarty_internal_cacheresource_file.php on line 109 Başka ülke yapınca sorun çözülüyor. Nasıl halledebilirim bu problemi?
  4. To be more specific the changing country identifier causes the problem. By trial and error, I found that the language identifier doesn't cause any trouble.
  5. I found the cause but still have no solution. I made a clean installation without the theme. I changed the language identifier and country identifier from Localization->Localization, which is en and uk by default. After the change front office doesn't work. Do you have any idea for solution?
  6. Hi everyone, Can you help me to figure out this major problem? I get the following error in every page (frontoffice, backoffice etc,..). I tried everything but couldn't end up with a solution. Fatal error: Class 'Smarty_Internal_SmartyTemplateCompiler' not found in /home/xxx/public_html/tools/smarty/sysplugins/smarty_internal_template.php on line 713
×
×
  • Create New...