Jump to content

Robnola

Members
  • Posts

    15
  • Joined

  • Last visited

Profile Information

  • Activity
    Developer

Robnola's Achievements

Newbie

Newbie (1/14)

0

Reputation

2

Community Answers

  1. Okay, authentication.tpl was the file. Thank you very much for your time. I was able to modify it and get the format I wanted
  2. login?back=my-account#account-creation On this page, I would like to put the order for date of birth from day/month/year to month/day/year Then I would like to remove the following: Sign up for our newsletter! Receive special offers from our partners! What .tpl file has this? or should I do it another way?
  3. What did you mean by this "That format is reserved for the controllers. You'd have to create a new controller and have that include the module's file."? By controllers, are you referring to my /public_html/shop/controllers/front/ folder? or the /public_html/shop/modules/mywordpress/controllers/front folder? Can you give me an example of a file in the demo that does this so I can take a look at it?
  4. By controllers, are you referring to my /public_html/shop/controllers/front/ folder? or the /public_html/shop/modules/mywordpress/controllers/front folder?
  5. I have a module that I call just fine like this: http://shop.myshop.com/index.php?fc=module&module=mywordpress&controller=myfeed Is there a way I can change this so I can just provide the link: http://shop.myshop.com/en/myfeed for instance on your demo you have: http://fo.demo.prestashop.com/en/new-products I would like a better URL format like that for call of my module, but am unsure how to do this.
  6. When I originally run my page and click Contact Us link it works: The url looks like this: http://shop.myshop.com/contact-us when I click the about us page it shows like this form with /content/about-us: http://shop.myshop.com/content/about-us then I click on contact us again and get file not found with format /content/contact-us http://shop.myshop.com/content/contact-us How can I get it to stop adding the /content/ to my contact-us link after someone clicks about us then clicks on contact us? I am running this on a local host so the URLs will not work.
  7. I have enabled the right bar, just thrown up a search block. If you notice it has messed up the content pages, the plus sign was pushed down and to the left, the "add to cart" is no longer centered. What is the best way to fix these issues? Is this normal when the sidebars are enabled?
  8. Oh silly me, it was this line of code, had to remove that condition so the js and css got loaded on other pages than index. if ($this->page_name == 'index') { $this->context->controller->addJS(($this->_path).'blockfacebook.js'); $this->context->controller->addCSS($this->_path.'css/mysidebar.css', 'all'); }
  9. Whenever I click "more" on a product from the main page or login I lose my #right_column custom modules php and css link. The tpl is still there because the HTML is generated. Here is my PHP code. How can I keep my right side bar module when switching from the main page to a sub page? <?php if (!defined('_PS_VERSION_')) exit; class MySidebar extends Module { public function __construct() { $this->name = 'mysidebar'; $this->tab = 'front_office_features'; $this->version = '1.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 Sidebar'); $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('leftColumn') && $this->registerHook('header') && Configuration::updateValue('MYMODULE_NAME', 'my friend'); } public function uninstall() { if (!parent::uninstall() || !Configuration::deleteByName('MYMODULE_NAME')) return false; return true; } public function hookDisplayLeftColumn($params) { if (!$this->isCached('mysidebar.tpl', $this->getCacheId())) { $facebookurl = Configuration::get('blockfacebook_url'); if (!strstr($facebookurl, 'facebook.com')) $facebookurl = 'https://www.facebook.com/'.$facebookurl; $this->context->smarty->assign('facebookurl', $facebookurl); } if (Tools::getValue('search_query') || !$this->isCached('mysidebar.tpl', $this->getCacheId())) { $this->calculHookCommon($params); $this->smarty->assign(array( 'blocksearch_type' => 'block', 'search_query' => (string)Tools::getValue('search_query') ) ); } Media::addJsDef(array('blocksearch_type' => 'block')); return $this->display(__FILE__, 'mysidebar.tpl', Tools::getValue('search_query') ? null : $this->getCacheId()); } public function hookDisplayRightColumn($params) { return $this->hookDisplayLeftColumn($params); } public function hookDisplayHeader() { $this->page_name = Dispatcher::getInstance()->getController(); if ($this->page_name == 'index') { $this->context->controller->addJS(($this->_path).'blockfacebook.js'); $this->context->controller->addCSS($this->_path.'css/mysidebar.css', 'all'); } } private function calculHookCommon($params) { $this->smarty->assign(array( 'ENT_QUOTES' => ENT_QUOTES, 'search_ssl' => Tools::usingSecureMode(), 'ajaxsearch' => Configuration::get('PS_SEARCH_AJAX'), 'instantsearch' => Configuration::get('PS_INSTANT_SEARCH'), 'self' => dirname(__FILE__), )); return true; } public function getContent() { $html = ''; // If we try to update the settings if (Tools::isSubmit('submitModule')) { Configuration::updateValue('blockfacebook_url', Tools::getValue('blockfacebook_url')); $html .= $this->displayConfirmation($this->l('Configuration updated')); $this->_clearCache('mysidebar.tpl'); Tools::redirectAdmin('index.php?tab=AdminModules&configure='.$this->name.'&token='.Tools::getAdminTokenLite('AdminModules')); } $html .= $this->renderForm(); $facebookurl = Configuration::get('blockfacebook_url'); if(!strstr($facebookurl, "facebook.com")) $facebookurl="https://www.facebook.com/".$facebookurl; $this->context->smarty->assign('facebookurl', $facebookurl); $this->context->smarty->assign('facebook_js_url', $this->_path.'blockfacebook.js'); $this->context->smarty->assign('facebook_css_url', $this->_path.'css/mysidebar.css'); $html .= $this->context->smarty->fetch($this->local_path.'views/admin/_configure/preview.tpl'); return $html; } public function renderForm() { $fields_form = array( 'form' => array( 'legend' => array( 'title' => $this->l('Settings'), 'icon' => 'icon-cogs' ), 'input' => array( array( 'type' => 'text', 'label' => $this->l('Facebook link (full URL is required)'), 'name' => 'blockfacebook_url', ), ), 'submit' => array( 'title' => $this->l('Save') ) ), ); $helper = new HelperForm(); $helper->show_toolbar = false; $helper->table = $this->table; $lang = new Language((int)Configuration::get('PS_LANG_DEFAULT')); $helper->default_form_language = $lang->id; $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0; $this->fields_form = array(); $helper->identifier = $this->identifier; $helper->submit_action = 'submitModule'; $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name; $helper->token = Tools::getAdminTokenLite('AdminModules'); $helper->tpl_vars = array( 'fields_value' => $this->getConfigFieldsValues(), 'languages' => $this->context->controller->getLanguages(), 'id_language' => $this->context->language->id ); return $helper->generateForm(array($fields_form)); } public function getConfigFieldsValues() { return array( 'blockfacebook_url' => Tools::getValue('blockfacebook_url', Configuration::get('blockfacebook_url')), ); } } ?>
  10. I simply wanted to display the mymodule tutorial in my nav bar in the default theme. It displays there, but the CSS is not applied. <?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'; $this->author = 'Firstname Lastname'; $this->need_instance = 0; $this->ps_versions_compliancy = array('min' => '1.6', 'max' => '1.6'); $this->dependencies = array('blockcart'); 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('displayTop') && $this->registerHook('displayNav') && $this->registerHook('displayHeader')); } public function uninstall() { if (!parent::uninstall() || !Configuration::deleteByName('MYMODULE_NAME')) return false; return true; } public function hookDisplayTop($params) { if (!$this->active) return; $this->context->smarty->assign( array( 'my_module_name' => Configuration::get('MYMODULE_NAME'), 'my_module_link' => $this->context->link->getModuleLink('mymodule', 'display') ) ); return $this->display(__FILE__, 'mymodule.tpl'); } public function hookDisplayHeader($params) { $this->context->controller->addCSS($this->_path.'css/mymodule.css', 'all'); } public function hookDisplayNav($params) { return $this->display(__FILE__, 'mymodule.tpl'); } } ?> TPL file <!-- Block mymodule --> <div id="mymodule_block_left" class="block"> <div class="block_content"> <p>Hello, {if isset($my_module_name) && $my_module_name} {$my_module_name} {else} World {/if} ! </p> <ul> <li><a href="{$my_module_link}" title="Click this link">Click me!</a></li> </ul> </div> </div> <!-- /Block mymodule --> css: div#mymodule_block_left p { font-size: 150%; font-style:italic; color: Red; } any ideas why the css is not displaying? thank you for your help.
  11. Okay solved it. You have to go to modules->set it to installed modules-> then click the configure button and disable it. You can also change the image there if you like and keep it enabled.
  12. I went into modules->positions and unhooked blockbanner from the header. I also went into live edit mode and clicked the garbage can and hit save. I also tried modifying .banner CSS to display: none (which doesn't feel like a good way) Block banner is still showing this image: /blockbanner/img/sale70.png how can I make it so block banner doesn't show up at all? I tried to add display: none, but I don't want to do it on the .row class since it is used in many places. I looked in the admin for sale70.png and couldn't find it anywhere.
×
×
  • Create New...