Top Left Text cha

Website Development Services

I noticed right away there's a bug in the product display module for j2store.  They link to [for example] /component/j2store/products/mnc-shield.  I think it's because the use of JRoute has been changed since Joomla 2.5 but was never updated here.  Anyway, you will find two instances of broken links.  One on the item's title and one on the item image.  

To fix the link in the title, go to the modules template folder and find the following line in default.php:
href="<?php echo JRoute::_( $product->module_display_link ); ?>"

Change that to:
href="/index.php?option=com_j2store&view=products&task=view&id=<?php echo $product->j2store_product_id; ?>" rel="nofollow"
Then, to fix the image link, do a similar thing in the file, default_images.php as follows... find this code:
<a href="/<?php echo $product->product_link; ?>" title="<?php echo $product->product_name; ?>">
And change it to:
<a href="/index.php?option=com_j2store&view=products&task=view&id=<?php echo $product->j2store_product_id; ?>" rel="nofollow">
Yea, what a pain... broken module now fixed.  It's important that you have the extra attribute (rel="nofollow").  Otherwise it can effect your Google index because they will index the SEF URL and also the non-SEF URL without that.

NOTE:

Unfortunately, when the system follows these new links that now work, it won't use template overrides. So, any edits you did in overrides inside your template will be ignored and you'll have to overrite the component core files.

Honestly, I recommend not using this module and hard-coding the items and links. It's just a total piece of junk (not just the module, but the whole component).

  • No comments found

Leave your comments

Post comment as a guest

0
Your comments are subjected to administrator's moderation.
X