News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Sort by manufacturers

Started by csimmo, November 30, 2012, 00:06:36 AM

Previous topic - Next topic

csimmo

I have a bug, I must have missed some thing when I was moding the template. When I try to sort by Manufacturer or Product name, I get an empty page back.
http://www2.abtsystems.com.au/services/computer-assembly.html
Can someone let me know where the code for this is in the original template? I am sure I can figure it out from there.

bytelord

Hello,

You did not mention your joomla, php and vm2 versions you are using.

To your issue, seems that this sef language keys is not translated, try to disable SEF and report back. Also please check if the file language\en-GB\en-GB.com_virtuemart.sef.ini exists and if exists please check if those keys exist
COM_VIRTUEMART_SEF_MF_NAME="manufacturer_name"
COM_VIRTUEMART_SEF_PRODUCT_NAME="name"

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

csimmo

I keep doing that!!
VM 2.0.14/joomla 2.5.8/PHP 5.4.9.1

Those files were there just fine.
Turning off SEF or SEO made no difference. I have just tested the demo website for the template I was running, and it is broken there too. I am checking with their support too.

bytelord

Hello,

Please try without template overrides ...

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

csimmo

#4
That was surprising. I deleted the html folder in the template, but it did not correct the issue. I actually expected it would!!!
Is there no over ride I could just put in to the template file itself to do as its told? Which section of code on what file actually has that sort field?

It might also be worth noting that the template was not sold on its own (hotjoomla templates - drugstore). But ruther had Virtuemart 2.0.8 and Joomla 2.5.8 all together. I have since updated to 2.0.14 and added the code changes manually to the template.

Like I said though, I am sure I can figure out how to fix it if someone just points me to the right files and code areas

bytelord

Hello,

So is worked without template overrides? Wasn't clear on your response.

The orderby code is located under joomla_folder\components\com_virtuemart\views\category\tmpl\default.php
The overrided file is located under: your_joomla_folder\templates\your_joomla_template\html\com_virtuemart\category\default.php

Line 175 on the original template files:

<div class="width70 floatleft">
      <?php echo $this->orderByList['orderby']; ?>
      <?php echo $this->orderByList['manufacturer']; ?>
</div>

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

csimmo

#6
It didn't work with the override deleted.
The template opverride was missing this line:       
<?php echo $this->orderByList['manufacturer']; ?>

But adding it has made no difference. Manufacturer is a reference right? which file is the reference in?

Its a bit weired, sort by manufacturer works here:
http://www2.abtsystems.com.au/services/format/html/view/category/start/8/orderby/m.mf_name/virtuemart_manufacturer_id/13.html
but not here:
http://www2.abtsystems.com.au/services/computer-assembly.html

Cold the pagination and the sort by issues be related?

csimmo

This is my last bug. I have turned off all the virtuemart search modules, do any of them have to be on?

Please help me, Last bug!!!!!!!!!!

csimmo

if the pagination issues was solved with the extra lines added to the product.php  file, could something be wrong in the same file for sort by? from line 1717? Is anyone else having issues?

csimmo

#9
I just got this error: for sort by product
vmError: exeSortSearchListQuery Unknown column 'p.product_name' in 'order clause' SQL=SELECT SQL_CALC_FOUND_ROWS l.`virtuemart_product_id` FROM `in162_virtuemart_products_en_gb` as l JOIN `in162_virtuemart_products` AS p using (`virtuemart_product_id`) LEFT JOIN `in162_virtuemart_product_categories` ON p.`virtuemart_product_id` = `in162_virtuemart_product_categories`.`virtuemart_product_id` LEFT JOIN `in162_virtuemart_categories_en_gb` as c ON c.`virtuemart_category_id` = `in162_virtuemart_product_categories`.`virtuemart_category_id` LEFT JOIN `in162_virtuemart_product_shoppergroups` ON p.`virtuemart_product_id` = `in162_virtuemart_product_shoppergroups`.`virtuemart_product_id` LEFT OUTER JOIN `in162_virtuemart_shoppergroups` as s ON s.`virtuemart_shoppergroup_id` = `in162_virtuemart_product_shoppergroups`.`virtuemart_shoppergroup_id` WHERE ( p.`published`="1" AND `in162_virtuemart_product_categories`.`virtuemart_category_id` > 0 AND ( s.`virtuemart_shoppergroup_id`= "1" OR s.`virtuemart_shoppergroup_id`= "2" OR s.`virtuemart_shoppergroup_id`= "3" OR s.`virtuemart_shoppergroup_id`= "4" OR s.`virtuemart_shoppergroup_id` IS NULL ) ) group by p.`virtuemart_product_id` ORDER BY p.product_name ASC LIMIT 0, 16
and this on sort by manufacturer
vmError: exeSortSearchListQuery Unknown column 'm.mf_name' in 'order clause' SQL=SELECT SQL_CALC_FOUND_ROWS l.`virtuemart_product_id` FROM `in162_virtuemart_products_en_gb` as l JOIN `in162_virtuemart_products` AS p using (`virtuemart_product_id`) LEFT JOIN `in162_virtuemart_product_categories` ON p.`virtuemart_product_id` = `in162_virtuemart_product_categories`.`virtuemart_product_id` LEFT JOIN `in162_virtuemart_categories_en_gb` as c ON c.`virtuemart_category_id` = `in162_virtuemart_product_categories`.`virtuemart_category_id` LEFT JOIN `in162_virtuemart_product_shoppergroups` ON p.`virtuemart_product_id` = `in162_virtuemart_product_shoppergroups`.`virtuemart_product_id` LEFT OUTER JOIN `in162_virtuemart_shoppergroups` as s ON s.`virtuemart_shoppergroup_id` = `in162_virtuemart_product_shoppergroups`.`virtuemart_shoppergroup_id` WHERE ( p.`published`="1" AND `in162_virtuemart_product_categories`.`virtuemart_category_id` > 0 AND ( s.`virtuemart_shoppergroup_id`= "1" OR s.`virtuemart_shoppergroup_id`= "2" OR s.`virtuemart_shoppergroup_id`= "3" OR s.`virtuemart_shoppergroup_id`= "4" OR s.`virtuemart_shoppergroup_id` IS NULL ) ) group by p.`virtuemart_product_id` ORDER BY m.mf_name ASC LIMIT 0, 16


It is repeatable here:
http://www2.abtsystems.com.au/shop/0/by,p.product_sku.html

bytelord

Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

csimmo

COM_VIRTUEMART_SEF_MF_NAME="manufacturer_name"
COM_VIRTUEMART_SEF_PRODUCT_NAME="name"
COM_VIRTUEMART_SEF_CREATED_ON="creation_date"

Seem to be there.
I think it is worth noting that when I turned off SEO the error disappeared, though the sort didn't work, then turning on SEO again made the error still stay away, but didn't fix the issue

bytelord

Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!


csimmo

I found a fix, but I need help applying it
This does not work:
http://www2.abtsystems.com.au/services/shop-servicing/by,m.mf_name.html
But if I delete the m. and make it like this:
http://www2.abtsystems.com.au/services/shop-servicing/by,mf_name.html
it works fine!!!

How do I apply it?