Top Left Text cha

Web & App Development

This is the 3rd bug fix I'm posting - even though I've probably fixed more than 20 or 30 bugs.  I'm now convinced that this is the worst Joomla e-commerce component I've ever used.  Complete ignorance when it comes to the coding involved with this component.  Virtuemart is better... but also a mess.  Virtuemart is just a mess because the way you do things (adding products, setting up the store) is very backwards and confusing.  And the cart functionality is garbage.  I'm leaning towards using Magento for store development in the future because Joomla just has nothing quality to offer for an e-commerce solution.

I found the code for the simple view is located in a file called view_ldesc.php.  And it does not work.  Because they're trying to echo something that they didn't load first.  Here's a snippet from it:
<div class="product-ldesc">
<?php echo $this->product->product_long_desc; ?>
</div>

But the long description works on the product browse pages.  Here's the snippet in that one that actually works.  I included the short description in this snippet so you can see how lazy these guys that coded it are.  They used the same class for the long description ('product-short-description')...

<?php if($this->params->get('list_show_short_desc', 1)): ?>
<div class="product-short-description"><?php echo $this->product->product_short_desc; ?></div>
<?php endif; ?>

<?php if($this->params->get('list_show_long_desc', 0)): ?>
<div class="product-short-description"><?php echo $this->product->product_long_desc; ?></div>
<?php endif; ?>

Actually, that's not the issue.  But, why not just leave it so people can see how careless the coding is.

Here's the next issue I found.  As you can see below, they load the short description and try to echo the long description from it...

<?php echo $this->loadTemplate('sdesc'); ?>
<div class="product-desc">
<?php echo $this->product->product_long_desc; ?>
</div>
Anyway, replace the garbage code with the code below an it will display both the short description (part before 'read more') and also the long description...
<?php echo $this->loadTemplate('sdesc'); ?>
<?php echo $this->loadTemplate('ldesc'); ?>
<div class="product-desc">
<?php echo $this->product->product_short_desc; ?>
<?php echo $this->product->product_long_desc; ?>
</div>
Oh, and if you used their product display module and had to use the other fix I mentioned, don't forget to also fix this in the core component files because the layout overrides also don't work correctly for links coming from the module.











Comment (0) Hits: 2712
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).

Comment (0) Hits: 3021
This took me like a couple hours to figure out.  Turns out it's very easy, but hard to figure out.  For some reason, if you set 'show regular price' to 'yes' and set 'show special price' to 'no', the price (regular price) does not show up.  Makes no sense, but you have to have 'show special price' to 'yes' or the regular price won't show.  This option is on the menu item's parameters.  Click the menu item (for product list) and you will find  this in the options.  It needs to be set on both the 'item view options' and also item 'item view options in category listings'.
Comment (0) Hits: 2563
X