adding store name on product page
Posted: Fri Jul 11, 2014 4:07 pm
Can anybody help how to add the store name with a link to the store on the product page for a multistore installation?
thank you in advance
thank you in advance
OpenCart Community Forum - Discuss shopping cart and e-commerce solutions.
https://forum.opencart.com/
Code: Select all
$this->data['tab_description'] = $this->language->get('tab_description');
Code: Select all
$this->data['home'] = $this->url->link('common/home');
$this->data['name'] = $this->config->get('config_name');
Code: Select all
<a href="<?php echo $home; ?>"><?php echo $name; ?></a>
First, thank you for your help.Sure.
Edit catalog/controller/product/product.php. Before:
Code: Select all
$this->data['tab_description'] = $this->language->get('tab_description');
add
Code: Select all
$this->data['home'] = $this->url->link('common/home');
$this->data['name'] = $this->config->get('config_name');
Then edit your template/product/product.tpl. Insert where ever you want it:
Code: Select all
<a href="<?php echo $home; ?>"><?php echo $name; ?></a>
Code: Select all
$this->data['points'] = $product_info['points'];
Code: Select all
/* Lef 11.07.2014 -- load location for store link use */
$this->data['location'] = $product_info['location'];
/* end Lef 11.07.2014 */
Code: Select all
<span><?php echo $text_stock; ?></span> <?php echo $stock; ?></div>
Code: Select all
<span><?php echo $text_stock; ?></span> <?php echo $stock; ?><br />
<!-- Lef 11.07.2014 show store link -->
<span id="store_link"><?php echo "<a href=$location>$text_store_link</a>" ?></span></div>
Code: Select all
// Lef 11.07.2014 text used for store link
$_['text_store_link'] = 'Visit Store';
Code: Select all
$this->data['text_tags'] = $this->language->get('text_tags');
Code: Select all
$this->data['text_store_link'] = $this->language->get('text_store_link');
Code: Select all
#store_link a {
font-size: 14px;
font-style: bold;
color: navy;
}