Post by zedrally » Mon May 21, 2018 8:24 am

I've got a nagging error in the Best Seller & Latest Module.
The Modules render OK but the error logs show Undefined Index:Minimum in Line 19, </div> second from bottom.
I've looked at the files, but don't see any reason as to why it returns an error?
Any ideas?

Code: Select all

<h3><?php echo $heading_title; ?></h3>
<div class="row">
  <?php foreach ($products as $product) { ?>
  <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
    <div class="product-thumb transition">
      <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" title="<?php echo $product['name']; ?>" class="img-responsive" /></a></div>
      <div class="caption">
        <h4><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></h4>
        <p><?php echo $product['description']; ?></p>
        <?php if ($product['rating']) { ?>
        <div class="rating">
          <?php for ($i = 1; $i <= 5; $i++) { ?>
          <?php if ($product['rating'] < $i) { ?>
          <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span>
          <?php } else { ?>
          <span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i class="fa fa-star-o fa-stack-2x"></i></span>
          <?php } ?>
          <?php } ?>
 </div>
    <?php } ?>

Active Member

Posts

Joined
Mon Sep 29, 2014 12:12 pm

Post by OSWorX » Mon May 21, 2018 6:58 pm

Guess you are using a custom template.

Image


User avatar
Expert Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by zedrally » Tue May 22, 2018 6:42 am

^^^
No, it's all standard.

Active Member

Posts

Joined
Mon Sep 29, 2014 12:12 pm

Post by OSWorX » Tue May 22, 2018 7:46 am

zedrally wrote:
Tue May 22, 2018 6:42 am
^^^
No, it's all standard.
Then post a link to the shop, because your description and the posted code says nothing.

Image


User avatar
Expert Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by zedrally » Tue May 22, 2018 1:07 pm

www.blackcatcontrolsystems.com.au

The error has now moved to line 39 of the default tpl which is the start of the code.

Code: Select all

[code]
 <button type="button" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md"><?php echo $button_cart; ?></span></button>
       <?php } else { ?>
       <button type="button" onclick="cart.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md"><?php echo $button_cart; ?></span></button>
       <?php }  ?>
[/code]

Attachments

Clipboard01.jpg

Clipboard01.jpg (48.19 KiB) Viewed 564 times


Active Member

Posts

Joined
Mon Sep 29, 2014 12:12 pm

Post by OSWorX » Tue May 22, 2018 2:23 pm

zedrally wrote:
Tue May 22, 2018 6:42 am
^^^
No, it's all standard.
If it would be really all standard, the error would not be there.
As far as I can see, you are using Extensions.
And in the original code - bestseller and lastest - is no

Code: Select all

<?php echo $product['minimum']; ?>
So, this must come from one or your installed extensions.

Image


User avatar
Expert Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by zedrally » Wed May 23, 2018 7:17 am

Thank you very much for your help, it now works as it should.

Active Member

Posts

Joined
Mon Sep 29, 2014 12:12 pm

Post by OSWorX » Wed May 23, 2018 11:08 am

zedrally wrote:
Wed May 23, 2018 7:17 am
Thank you very much for your help, it now works as it should.
And what was the reason - just to help others here if such problem come up again ..

Image


User avatar
Expert Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by zedrally » Wed Jun 06, 2018 12:22 pm

^^^
I can't give you a reason as I have no idea what modified the .tpl
The obvious is that it was a Extension that I installed, but which one?

Active Member

Posts

Joined
Mon Sep 29, 2014 12:12 pm
Who is online

Users browsing this forum: No registered users and 7 guests