Post by muddysmurf » Tue Jun 28, 2011 5:09 am

In the older version, I could add an image to my Subcategories, and when someone would click the parent category of that sub cat, You would see a listing of just those images with the "title" of that sub category.

In this version, I go to the Parent Category, but instead of seeing images of a listing of my sub categories, I see a "Refine Search" and a text link of my sub category. I have an image attached to just the sub category. Do you know if there is a way to make this like it once was?

Thanks!

Newbie

Posts

Joined
Tue Jun 28, 2011 5:06 am

Post by Miguelito » Tue Jun 28, 2011 5:34 am

Noticed this one also when comparing to 1.4.9.x. Anyone (Q/Daniel) with a solution for this one?

The Finnish OpenCart Forum
"Real programmers don't document. If it was hard to write, it should be hard to understand."


Active Member

Posts

Joined
Sun Jan 10, 2010 10:11 pm

Post by Xsecrets » Tue Jun 28, 2011 5:51 am

yeah unfortunately there's no quick solution. It involves some coding. I did it for one customer already. I may release a vqmod when I get a break.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by muddysmurf » Thu Jun 30, 2011 1:46 am

I would love for this to be a mod -- or for someone to point me in the right direction on how to code it. This will help my store out!

Newbie

Posts

Joined
Tue Jun 28, 2011 5:06 am

Post by teratyke » Tue Jul 05, 2011 7:27 pm

Hi
Here is my attempt at changing the display- there is a bit of extra css in there which isn't used in the default install.
This changes the list to divs and puts in the images.

Probably a much better way of doing this than I have here, but its the best I can manage - improvements welcome!
This is for 1.5.0.5
Thanks
Rob

Attachments

re-uploaded so uses default template


Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm

Post by muddysmurf » Wed Jul 06, 2011 2:16 am

teratyke:

Took a little work on my part (lot more work on your part though), but I got it working. Thank you so much!!

Newbie

Posts

Joined
Tue Jun 28, 2011 5:06 am

Post by iamandy » Thu Jul 14, 2011 8:16 pm

I'd highly suggest adding a </div> in there.. as the footer appears in the product table because it hasn't been closed off!

New member

Posts

Joined
Wed Jun 22, 2011 11:19 pm

Post by teratyke » Thu Jul 14, 2011 8:43 pm

Thanks for the feedback. I can't find a missing </div> nor do I see the error you mention when I browse my site (sorry its not live). Its possible I have made some other edit to the category.tpl file, that is hiding it from me, but I don't think so. I just checked the vqmod cached file and all the divs seem to match up. I'm using the base install of 1.5.05, no svn's applied.
Any ideas?

Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm

Post by iamandy » Tue Jul 19, 2011 6:32 pm

I see.

I've also ran into another problem.. I have one product on my site, but when you click on the sub cat for the product, it doesn't load up.. Any ideas?

New member

Posts

Joined
Wed Jun 22, 2011 11:19 pm

Post by teratyke » Tue Jul 19, 2011 10:03 pm

iamandy wrote:I see.
Sorry, I don't follow...
I've also ran into another problem.. I have one product on my site, but when you click on the sub cat for the product, it doesn't load up.. Any ideas?
Is your site live? Posting a link would make it easier to help, or even what is happening when you click the product. Don't have a lot to go on at the moment.

Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm

Post by iamandy » Thu Jul 21, 2011 6:40 pm

Yes, I do..

Footballs is the main one it does it on. Check Adidas, Mitre and Nike.

http://firstsportsdirect.co.uk/equipment/footballs

New member

Posts

Joined
Wed Jun 22, 2011 11:19 pm

Post by teratyke » Thu Jul 21, 2011 7:35 pm

Perhaps try turning SEO urls off, then test.
Its odd.
I wonder if your SEO urls aren't unique, or something like that.

Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm

Post by iamandy » Thu Jul 21, 2011 9:41 pm

Yeah, that seemed to have done the trick! Thanks

New member

Posts

Joined
Wed Jun 22, 2011 11:19 pm

Post by spitos » Wed Jul 27, 2011 12:02 am

The code seems to have changed a fair bit in 1.5.1, does anyone know how to get this to work?

Image
Google Analytics Expert - Advanced e-commerce tracking, Product & options reporting, transaction/conversion reporting, Google Adwords conversion & profit reporting, goal & funnel reporting, event tracking, site search tracking, multi-store compatibility, EU Cookie Law compliance and works with any theme or checkout! Easy vqmod install. Get it here


User avatar
Active Member

Posts

Joined
Mon May 23, 2011 6:19 pm
Location - UK

Post by teratyke » Wed Jul 27, 2011 12:09 am

Do you mean how to get the VQmod to work? For me at least it does work in 1.5.1.1. What problem are you having?

Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm

Post by spitos » Wed Jul 27, 2011 12:27 am

I've installed the vqmod but all i got was a blank category page.

I looked at the xml file and compared it against the file that gets changed but the code cannot be found:

Code: Select all

<file name="catalog/controller/product/category.php">
<operation>
<search position="after"><![CDATA[
$product_total = $this->model_catalog_product->getTotalProducts(array('filter_category_id' => $result['category_id']));
]]></search>
<add><![CDATA[
$image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_category_width'), $this->config->get('config_image_category_height'));
]]></add>
</operation>

Image
Google Analytics Expert - Advanced e-commerce tracking, Product & options reporting, transaction/conversion reporting, Google Adwords conversion & profit reporting, goal & funnel reporting, event tracking, site search tracking, multi-store compatibility, EU Cookie Law compliance and works with any theme or checkout! Easy vqmod install. Get it here


User avatar
Active Member

Posts

Joined
Mon May 23, 2011 6:19 pm
Location - UK

Post by spitos » Wed Jul 27, 2011 12:32 am

Should've mentioned that i downloaded the latest SVN today to fix some bugs, just looked at my old 1.5.1.1 file and the code is in there. The SVN version of the file has it formatted differently.

In the file before i updated to the SVN, the code is this:

Code: Select all

$this->data['categories'] = array();
			
			$results = $this->model_catalog_category->getCategories($category_id);
			
			foreach ($results as $result) {
				$product_total = $this->model_catalog_product->getTotalProducts(array('filter_category_id' => $result['category_id']));
				
				$this->data['categories'][] = array(
					'name'  => $result['name'] . ' (' . $product_total . ')',
					'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url)
				);
			}
But the latest version has the code like this:

Code: Select all

$this->data['categories'] = array();
			
			$results = $this->model_catalog_category->getCategories($category_id);
			
			foreach ($results as $result) {
				$data = array(
					'filter_category_id'  => $result['category_id'],
					'filter_sub_category' => true	
				);
							
				$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)
				);
			}
Any ideas?

Image
Google Analytics Expert - Advanced e-commerce tracking, Product & options reporting, transaction/conversion reporting, Google Adwords conversion & profit reporting, goal & funnel reporting, event tracking, site search tracking, multi-store compatibility, EU Cookie Law compliance and works with any theme or checkout! Easy vqmod install. Get it here


User avatar
Active Member

Posts

Joined
Mon May 23, 2011 6:19 pm
Location - UK

Post by teratyke » Wed Jul 27, 2011 12:38 am

The problem with the VQmod I made is it finds a line and replaces it and the next 22 line. That might need adjusted for this new version. I've just lost ftp access to my host so I can't check at the moment. I'll get back to you as soon as I sort this ftp problem out.

THanks

Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm

Post by teratyke » Wed Jul 27, 2011 12:59 am

Ah ok I just checked the svn - try this - dont forget to rename the old vqmod first - might be handy to keep both, but only enable one..

Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm

Post by spitos » Wed Jul 27, 2011 4:24 pm

Thanks for the quick reply, I was unable to test properly until this morning.

I tried with the new file you sent but still couldn't get it to work and just had a blank page, so I made a few changes and managed to get it working properly.

I changed the search position and search text in the first operation, as well as what it adds so what used to be this:

Code: Select all

<file name="catalog/view/theme/default/template/product/category.tpl">
<operation>
<search position="replace" 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 box-subcat">
			<?php foreach ($categories as $category) { ?>
			<div>
				<?php if ($category['thumb']) { ?>
				<div class="image"><a href="<?php echo $category['href']; ?>"><img src="<?php echo $category['thumb']; ?>" alt="<?php echo $category['name']; ?>" /></a></div>
				<?php } ?>
				<div class="name subcatname"><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></div>
			</div>
			<?php } ?>
		</div>
	</div>
  </div>
  <?php } ?>
]]></add>
</operation>	
</file>
Is now:

Code: Select all

<file name="catalog/view/theme/default/template/product/category.tpl">
<operation>
<search position="replace" offset="24"><![CDATA[<h2><?php echo $text_refine; ?></h2>]]></search>
<add><![CDATA[
  <div class="box">
	<div class="box-heading"><?php echo $text_refine; ?></div>
	<div class="box-content">
		<div class="box-product box-subcat">
			<?php foreach ($categories as $category) { ?>
			<div>
				<?php if ($category['thumb']) { ?>
				<div class="image"><a href="<?php echo $category['href']; ?>"><img src="<?php echo $category['thumb']; ?>" alt="<?php echo $category['name']; ?>" /></a></div>
				<?php } ?>
				<div class="name subcatname"><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></div>
			</div>
			<?php } ?>
		</div>
	</div>
  </div>
]]></add>
</operation>	
</file>
Thanks for the pointers.
You can test my version here, definitely works for me:

Image
Google Analytics Expert - Advanced e-commerce tracking, Product & options reporting, transaction/conversion reporting, Google Adwords conversion & profit reporting, goal & funnel reporting, event tracking, site search tracking, multi-store compatibility, EU Cookie Law compliance and works with any theme or checkout! Easy vqmod install. Get it here


User avatar
Active Member

Posts

Joined
Mon May 23, 2011 6:19 pm
Location - UK
Who is online

Users browsing this forum: No registered users and 85 guests