Web Developer ( & Firefighter)
Web Development, Web Content Management, Mobile Web Design, Android Apps
www.webdesign-plus.co.uk
Tested on 1.5.2.1?
You can see it at http://www.definitivedesign.co.za/mall/ ... ry&path=65
The error is:
Notice: Undefined index: thumb in /home/definit1/public_html/mall/vqmod/vqcache/vq2-catalog_view_theme_default_template_product_category.tpl on line
I do have Fido-X Store Manager installed which uses a lot of Vqmods, if this is the case, is there a way around it?
Thanks
Web Developer ( & Firefighter)
Web Development, Web Content Management, Mobile Web Design, Android Apps
www.webdesign-plus.co.uk
I used this:
Edit: ../catalog/controller/product/category.php
Find (around line 136):
REPLACE WITH:$product_total = $this->model_catalog_product->getTotalProducts($data); $this->data['categories'][] = array( 'name' => $result['name'] . ' (' . $product_total . ')', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url) ); }
Save and upload.$product_total = $this->model_catalog_product->getTotalProducts($data); $image = $this->model_tool_image->resize($result['image'], 60, 60); $this->data['categories'][] = array( 'name' => $result['name'] . ' (' . $product_total . ')', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url), 'thumb' => $image ); }
Edit: ../catalog/view/theme/YOURTHEME/template/product/category.tpl
Find:
REPLACE WITH:<?php if ($categories) { ?> <h2><?php echo $text_refine; ?></h2> <div class="category-list"> <?php if (count($categories) <= 5) { ?> <ul> <?php foreach ($categories as $category) { ?> <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></li> <?php } ?> </ul> <?php } else { ?> <?php for ($i = 0; $i < count($categories);) { ?> <ul> <?php $j = $i + ceil(count($categories) / 4); ?> <?php for (; $i < $j; $i++) { ?> <?php if (isset($categories[$i])) { ?> <li><a href="<?php echo $categories[$i]['href']; ?>"><?php echo $categories[$i]['name']; ?></a></li> <?php } ?> <?php } ?> </ul> <?php } ?> <?php } ?> </div> <?php } ?>
Save the file and upload.<?php if ($categories) { ?> <div class="box"> <div class="box-heading"><?php echo $text_refine; ?></div> <div class="box-content"> <div class="box-product"> <?php foreach ($categories as $category) { ?> <div> <?php if ($category['thumb']) { ?> <div class="image" style="text-align: center"> <a href="<?php echo $category['href']; ?>"><img src="<?php echo $category['thumb']; ?>" alt="<?php echo $category['name']; ?>" /></a> </div> <?php } ?> <div style="text-align: center"><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></div></div> <?php } ?> </div> </div> </div> <?php } ?>
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
Not yetGoncharenko wrote:Tested on 1.5.2.1?
Web Developer ( & Firefighter)
Web Development, Web Content Management, Mobile Web Design, Android Apps
www.webdesign-plus.co.uk
p.s. Have a 30-50 subcategories whith images, add
Code: Select all
<div class="pagination"><?php echo $pagination; ?></div>
any ideas or this is bug ?
I have cleared the vqmod cache, but no changes - any ideas?

Jimmy
YesGoncharenko wrote:Tested on 1.5.2.1?
Web Developer ( & Firefighter)
Web Development, Web Content Management, Mobile Web Design, Android Apps
www.webdesign-plus.co.uk
Notice: Undefined variable: j in /home/*mysite*/public_html/opencart/vqmod/vqcache/vq2-catalog_view_theme_sellegance_template_product_category.tpl on line 90Notice: Undefined variable: i in /home/*mysite*/public_html/opencart/vqmod/vqcache/vq2-catalog_view_theme_sellegance_template_product_category.tpl on line 90
I've tried to attach the sellegance category.tpl file that contains the variables this error refers to (but it was rejected so I can post separately if anyone has any ideas!). Any help would be greatly appreciated as Sellegance doesn't seem to allow for category images in its skinning options!
Steve
Yes, just use http://forum.opencart.com/viewtopic.php ... 60#p268278 guideThuNderGr wrote:Does this mod work on 1.5.4.1?
CART.lt - custom opencart development, import and export systems, migrations to opencart
I have a problem with subcategory images and I hope that someone could help me. I use OC version 1.5.4.1 and I upload subcat_image.xml (you can see code bellow) file through vQmod, bat this module doesn't work properly because it doesn't show images. I view the source code of tha page and src of img tag is actualy empty. I think that $category['thumb'] doesn't work properly.
subcat_image.xml:
Code: Select all
<modification>
<id>Subcategory Images</id>
<version>1.0</version>
<vqmver>1.2.3</vqmver>
<author>vger.co.uk</author>
<file name="catalog/controller/product/category.php">
<operation>
<search position="replace" index="1" offset="6"><![CDATA[
$product_total = $this->model_catalog_product->getTotalProducts($data);
]]></search>
<add><![CDATA[
$product_total = $this->model_catalog_product->getTotalProducts($data);
$image = $this->model_tool_image->resize($result['image'], 60, 60);
$this->data['categories'][] = array(
'name' => $result['name'] . ' (' . $product_total . ')',
'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url),
'thumb' => $image
);
}
]]></add>
</operation>
</file>
<file name="catalog/view/theme/*/template/product/category.tpl">
<operation>
<search position="replace" index="1" offset="22"><![CDATA[
<?php if ($categories) { ?>
]]></search>
<add><![CDATA[
<?php if ($categories) { ?>
<div class="box">
<div class="box-heading"><?php echo $text_refine; ?></div>
<div class="box-content">
<div class="box-product">
<?php foreach ($categories as $category) { ?>
<div>
<?php if ($category['thumb']) { ?>
<div class="image" style="text-align: center">
<a href="<?php echo $category['href']; ?>"><img src="<?php echo $category['thumb']; ?>" alt="<?php echo $category['name']; ?>" /></a>
</div>
<?php } ?>
<div style="text-align: center"><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></div></div>
<?php } ?>
</div>
</div>
</div>
<?php } ?>
]]></add>
</operation>
</file>
</modification>
Thanks,
I
I Know this Is Removed but I don't know how to re implemented back in can someone help me out please thank you
Code: Select all
<?php if (count($categories) <= 5) { ?>
With difficulty.dodokids wrote:Is it possible to insert subcategorie images without resize?
Why would you want to do this? Resized images are reused so it only does it once (until you clear the cache).
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
Users browsing this forum: No registered users and 103 guests