olly79 Posted August 25, 2010 Share Posted August 25, 2010 Hi all,I have recently purchased a templateOn this template they have manufactues as the menu tabs i.e.CLAVIN KLIEN | CASIO | CITIZENWhat I want to do is change this for HOME | ABOUT US | NEWS | CONTACT US etc; however, I see that the the menu at present has the manufactures block in the header.Being new to Prestashop can someone please guide me as to how I can change the links in the menu tab to relate to the static page mentioned above.Many thanks Link to comment Share on other sites More sharing options...
Radu Posted August 25, 2010 Share Posted August 25, 2010 because this is not a standard prestashop and me personally I don't have the theme code to check exactly it will be hard to guide you.try to see if the menu is built as a module and then, if yes, check the module code to hardcode the links instead letting the manufacturers there. Link to comment Share on other sites More sharing options...
olly79 Posted August 25, 2010 Author Share Posted August 25, 2010 Hi, Yes, this is a block and here is the code for this Module which is made up of blockmanufacturer.php and blockmanufacturer.tpl :blockmanufacturer.php code: <?php class BlockManufacturer extends Module { function __construct() { $this->name = 'blockmanufacturer'; $this->tab = 'Blocks'; $this->version = 1.0; parent::__construct(); $this->displayName = $this->l('Manufacturers block'); $this->description = $this->l('Displays a block of manufacturers/brands'); } function install() { parent::install(); $this->registerHook('top'); Configuration::updateValue('MANUFACTURER_DISPLAY_TEXT', true); Configuration::updateValue('MANUFACTURER_DISPLAY_TEXT_NB', 5); Configuration::updateValue('MANUFACTURER_DISPLAY_FORM', true); } function hooktop($params) { global $smarty, $link; $smarty->assign(array( 'manufacturers' => Manufacturer::getManufacturers(), 'link' => $link, 'text_list' => Configuration::get('MANUFACTURER_DISPLAY_TEXT'), 'text_list_nb' => Configuration::get('MANUFACTURER_DISPLAY_TEXT_NB'), 'form_list' => Configuration::get('MANUFACTURER_DISPLAY_FORM'), )); return $this->display(__FILE__, 'blockmanufacturer.tpl'); } function getContent() { $output = ''.$this->displayName.''; if (Tools::isSubmit('submitBlockManufacturers')) { $text_list = intval(Tools::getValue('text_list')); $text_nb = intval(Tools::getValue('text_nb')); $form_list = intval(Tools::getValue('form_list')); if ($text_list AND !Validate::isUnsignedInt($text_nb)) $errors[] = $this->l('Invalid number of elements'); elseif (!$text_list AND !$form_list) $errors[] = $this->l('Please activate at least one system list'); else { Configuration::updateValue('MANUFACTURER_DISPLAY_TEXT', $text_list); Configuration::updateValue('MANUFACTURER_DISPLAY_TEXT_NB', $text_nb); Configuration::updateValue('MANUFACTURER_DISPLAY_FORM', $form_list); } if (isset($errors) AND sizeof($errors)) $output .= $this->displayError(implode(' ', $errors)); else $output .= $this->displayConfirmation($this->l('Settings updated')); } return $output.$this->displayForm(); } public function displayForm() { $output = ' <form action="'.$_SERVER['REQUEST_URI'].'" method="post"> _path.'logo.gif" alt="" title="" />'.$this->l('Settings').' '.$this->l('Use a plain-text list').' <input type="radio" name="text_list" id="text_list_on" value="1" '.(Tools::getValue('text_list', Configuration::get('MANUFACTURER_DISPLAY_TEXT')) ? 'checked="checked" ' : '').'/> l('Enabled').'" title="'.$this->l('Enabled').'" /> <input type="radio" name="text_list" id="text_list_off" value="0" '.(!Tools::getValue('text_list', Configuration::get('MANUFACTURER_DISPLAY_TEXT')) ? 'checked="checked" ' : '').'/> l('Disabled').'" title="'.$this->l('Disabled').'" /> '.$this->l('Display').' <input type="text" size="2" name="text_nb" value="'.intval(Tools::getValue('text_nb', Configuration::get('MANUFACTURER_DISPLAY_TEXT_NB'))).'" /> '.$this->l('elements').' '.$this->l('To display manufacturers in a plain-text list').' '.$this->l('Use a drop-down list').' <input type="radio" name="form_list" id="form_list_on" value="1" '.(Tools::getValue('form_list', Configuration::get('MANUFACTURER_DISPLAY_FORM')) ? 'checked="checked" ' : '').'/> l('Enabled').'" title="'.$this->l('Enabled').'" /> <input type="radio" name="form_list" id="form_list_off" value="0" '.(!Tools::getValue('form_list', Configuration::get('MANUFACTURER_DISPLAY_FORM')) ? 'checked="checked" ' : '').'/> l('Disabled').'" title="'.$this->l('Disabled').'" /> '.$this->l('To display manufacturers in a drop-down list').' <input type="submit" name="submitBlockManufacturers" value="'.$this->l('Save').'" class="button" /> </form>'; return $output; } } ?> Link to comment Share on other sites More sharing options...
olly79 Posted August 25, 2010 Author Share Posted August 25, 2010 and blockmanufacturer.tpl code: <!-- Block manufacturers module --> {if $manufacturers} {if $text_list} {foreach from=$manufacturers item=manufacturer name=manufacturer_list} {if $smarty.foreach.manufacturer_list.iteration <= $text_list_nb} getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)}" title="{l s='More about' mod='blockmanufacturer'} {$manufacturer.name}">{$manufacturer.name|escape:'htmlall':'UTF-8'} {/if} {/foreach} {/if} {else} {l s='No manufacturer' mod='blockmanufacturer'} {/if} <!-- /Block manufacturers module --> Hope that helps Link to comment Share on other sites More sharing options...
Radu Posted August 25, 2010 Share Posted August 25, 2010 so it's easy just change: > {if $manufacturers} {if $text_list} </pre> <ul> {foreach from=$manufacturers item=manufacturer name=manufacturer_list} {if $smarty.foreach.manufacturer_list.iteration <= $text_list_nb} getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)}" title="{l s='More about' mod='blockmanufacturer'} {$manufacturer.name}">{$manufacturer.name|escape:'htmlall':'UTF-8'} {/if} {/foreach} </ul> <br> {/if}<br>{else}<br><p>{l s='No manufacturer' mod='blockmanufacturer'}</p> <br>{/if to > </pre> <ul> menu 1 menu 2 menu 3 </ul> Link to comment Share on other sites More sharing options...
olly79 Posted September 6, 2010 Author Share Posted September 6, 2010 Fantastic help and I cannot thank you enough! Link to comment Share on other sites More sharing options...
Patric Posted September 6, 2010 Share Posted September 6, 2010 If your problem is solved, please add [solved] at the beginning of your topic's title by editing your first post !Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now