Linking to Brand page

  • Posts: 209
  • Thank you received: 18
11 years 11 months ago #78673

Hi, I have modified the show_block_custom_main product view to give me a table of products specifications as shown in the attached pic, however when I click on the product's Brand I get taken to a blank page. At some point I deleted the Brands Listing Module that was created when I installed Hikashop. My problem is I can't see how to recreate this module or get the brand hyperlink to correctly show all the products in that brand.

Any help would be enormously appreciated!



this is the code of my show_block_custom_main and I have set the switch "Display the manufacturer" to no (so that it does not duplicate)
<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.0.0
 * @author	hikashop.com
 * @copyright	(C) 2010-2012 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><div id="hikashop_product_custom_info_main" class="hikashop_product_custom_info_main">
	<h4><?php echo JText::_('SPECIFICATIONS');?></h4>
	<table width="100%">
	<?php
	$this->fieldsClass->prefix = '';
	foreach ($this->fields as $fieldName => $oneExtraField) {
		$value = '';
		if(empty($this->element->$fieldName) && !empty($this->element->main->$fieldName))$this->element->$fieldName = $this->element->main->$fieldName;
		if(isset($this->element->$fieldName))
			$value = trim($this->element->$fieldName);
		if (!empty ($value)) {
		?>
			<tr class="hikashop_product_custom_<?php echo $oneExtraField->field_namekey;?>_line">
				<td class="key">
					<span id="hikashop_product_custom_name_<?php echo $oneExtraField->field_id;?>" class="hikashop_product_custom_name">
						<?php echo $this->fieldsClass->getFieldName($oneExtraField);?>
					</span>
				</td>
				<td>
					<span id="hikashop_product_custom_value_<?php echo $oneExtraField->field_id;?>" class="hikashop_product_custom_value">
						<?php echo $this->fieldsClass->show($oneExtraField,$value); ?>
					</span>
				</td>
			</tr>



<tr><td>
    <strong><?php echo JText::_('Product code');?></strong></td><td>
    <?php echo $this->element->product_code;?>
</td></tr>


<tr><td>
    <strong><?php echo JText::_('Brand');?></strong></td><td>
    <?php
    {
	$class = hikashop_get('class.category');
	$manufacturer = $class->get($this->element->product_manufacturer_id);
	global $Itemid;
	$app =& JFactory::getApplication();
	if(method_exists($app,'stringURLSafe')){
		$alias = $app->stringURLSafe(strip_tags($manufacturer->category_name));
	}else{
		$alias = JFilterOutput::stringURLSafe(strip_tags($manufacturer->category_name));
	}
	echo '<a href="'.hikashop_completeLink('category&task=listing&cid='.$manufacturer->category_id.'&name='.$alias.'&Itemid='.$Itemid).'">'.$manufacturer->category_name.'</a>';
}
    ?>
</td></tr>



<tr><td>
    <strong><?php echo JText::_('Shipping weight (kgs)');?></strong></td>
    <td><?php echo $this->element->product_weight;?>
</td></tr>

<tr><td>
    <strong><?php echo JText::_('Info sheet');?></strong></td>
    <td><?php echo $this->element->product_url;?></td></tr>
		<?php
		}
	}
	?>
	</table>
</div>

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26152
  • Thank you received: 4027
  • MODERATOR
11 years 11 months ago #78701

Hi,

Brand listing is a classical category listing.
You can re-create it by making a new HikaShop category listing menu.
The main difference is the "type of content" which is "Brand" and not "Category" (in the HikaShop content menu part).

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.061 seconds
Powered by Kunena Forum