Hi There,
I am using V 1.5.1.3 and I would like when you select a category for it to display the pictures on the sub category.
Is this possible?
http://www.thepumpkinpatch.ca
Thanks
Lisa
I am using V 1.5.1.3 and I would like when you select a category for it to display the pictures on the sub category.
Is this possible?
http://www.thepumpkinpatch.ca
Thanks
Lisa
Last edited by pumpkinpatch on Mon Nov 14, 2011 9:04 am, edited 1 time in total.
Do you mean the 'Refine Search'? If so then click link below.
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
I altered for you the catalog/controller/catalog.php and the catalog.tpl
It shows the category image with the name as link to the subcategory.
Please backup the existing files before you upload the ones in the archive.
It shows the category image with the name as link to the subcategory.
Please backup the existing files before you upload the ones in the archive.
Attachments
Extract and upload after backup of existing
Works with 1.5.2.1 as well as I have just used it again!
Created XML file for vQmod v2.1.5 from the work by pprmkr. Tested on OpenCart v1.5.1.3.
Going by jontycasson's post above it should also work with v1.5.2.1 as well.
Going by jontycasson's post above it should also work with v1.5.2.1 as well.
With vQmod in subcategory
Notice: Undefined variable: result in mystore/vqmod/vqcache/vq2-catalog_controller_product_category.php on line 164
Notice: Undefined variable: result in mystore/vqmod/vqcache/vq2-catalog_controller_product_category.php on line 164
Without knowing exactly if the following will fix the $result error message but what can be noticed is a bug from the XML:
for:
Code: Select all
<file name="catalog/controller/product/category.php">
<operation>
<search position="after">
Code: Select all
<file name="catalog/controller/product/category.php">
<operation>
<search position="after" index="1">
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
@Straightlight: you are correct, I added the same file to a different OpenCart install today (same version) and the error noted by gennady appeared. Adding index="1" resolves this but unsure why the error is not apparent on the first install I applied this to. Could be a combination of other vQmod files removing the second instance of the search term before this mod is parsed.
As I explained on other few topics, VQMod can be full of surprises while one or a few thinks there are actually no problems with the core. Most definitely, the quoted question sentence above is correct; there are currently no way - full proof - of knowing how or when a contribution could get or be conflicted with another contribution at this time nor there is a real reliable event tracker other than the VQMod logs or the OC logs from the admin which is still a non-proof method to track 'each' contributions when a conflict is involved which is the definite cause and started issues on why OC merchants wonders of the dis-functionality of distributors contribution most of the time when it isn't about coding issues.Could be a combination of other vQmod files removing the second instance of the search term before this mod is parsed.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
The default them also floats the .category_info .image to the left.
Did you put the extra <div> around the category info?
Did you put the extra <div> around the category info?
Code: Select all
<?php foreach ($categories as $category) { ?>
<div>
<div class="image">
<?php if ( $category['image']){?>
<a href="<?php echo $category['href']; ?>"><img src="<?php echo $category['image'];?>" /></a>
<?php } ?>
</div>
<div class="name">
<a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
</div>
</div>
<?php } ?>
I'm not good at this stuff so not sure where in the code you mean?
Here is the section from my existing XML fille
Here is the section from my existing XML fille
Code: Select all
<?php foreach ($categories as $category) { ?>
<div>
<div class="image">
<?php if ( $category['image']){?>
<a href="<?php echo $category['href']; ?>"><img src="<?php echo $category['image'];?>" /></a>
<?php } ?>
</div>
<div class="name">
<a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
</div>
</div>
<?php } ?>
</div>
<?php } ?>]]>
Yes, it works in 1.5.3
In the controller
In the template:
In the controller
Code: Select all
$product_total = $this->model_catalog_product->getTotalProducts($data);
if ($result['image']) {
$image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_category_width'), $this->config->get('config_image_category_height'));
} else {
$image = false;
}
$this->data['categories'][] = array(
'name' => $result['name'] . ' (' . $product_total . ')',
'image' => $image,
'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url)
);
Code: Select all
<?php if ($categories) { ?>
<h2><?php echo $text_refine; ?></h2>
<div>
<?php foreach ($categories as $category) { ?>
<div style="width: 130px; display: inline-block; vertical-align: top; margin-right: 20px; margin-bottom: 15px;">
<div class="image">
<?php if ( $category['image']){?>
<a href="<?php echo $category['href']; ?>"><img src="<?php echo $category['image'];?>" /></a>
<?php } ?>
</div>
<div class="name">
<a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
</div>
</div>
<?php } ?>
</div>
<?php } ?>
Who is online
Users browsing this forum: edkny and 113 guests