Hi, when I click on the 'Creation date' or 'SKU' in the FE category view ("Sort by" combo-box) I get an error:
Not Found
/catalog/health-and-education/councils-of-the-kind-doctor/by,`p`.created_on was not found on this server.
or
The requested URL /catalog/health-and-education/councils-of-the-kind-doctor/by,`p`.product_sku was not found on this server.
When I switch off Joomla SEF flag, it works fine and url looks like
/index.php?option=com_virtuemart&view=category&virtuemart_category_id=28&Itemid=120&lang=ru&language=ru-RU&orderby=`p`.created_on
or
/index.php?option=com_virtuemart&view=category&virtuemart_category_id=28&Itemid=120&lang=ru&language=ru-RU&orderby=`p`.product_sku
For example look this: http://www.litera.spb.ru/catalog/health-and-education/councils-of-the-kind-doctor/
Here 'ISBN' = SKU and 'Дата выпуска' = creation_date
Hello,
Please check the sef ini translation file for the language you are using under language\en-GB\en-GB.com_virtuemart.sef.ini for example for English and check if the keys are translated.
key for created_on -> COM_VIRTUEMART_SEF_CREATED_ON
Regards
Tnx, I have checked this, now I am using standart set ru-RU translation files
So, you check the RU sef translation? Is it working?
Yes, but unsuccessfully. First of all I checked ru-RU.com_virtuemart.sef.ini, it is Ok: all keywords from en version are present and translated. Next I tried to replace ru version to the English
cp en-GB/en-GB.com_virtuemart.sef.ini ru-RU/ru-RU.com_virtuemart.sef.ini
Unfortunately it did not help, the situation has not changed :(
Hi,
Did you enable from the Joomla global configuration -> site -> SEO Settings -> Unicode Aliases ?
Regards
No (as default). Now I swiched "Unicode Aliases" to Enable and tested with original ru-RU.com_virtuemart.sef.ini: the situation has not changed. It is strange that the error occurs only when I specify "created_on" and SKU and is not dependent on the version of the file ru-RU.com_virtuemart.sef.ini
The only difference between the keywords of English and Russian versions of the file com_virtuemart.sef.ini is COM_VIRTUEMART_SEF_EDITSHIPPING (ru version) and COM_VIRTUEMART_SEF_EDIT_SHIPMENT (en)
Hi,
Could be something on the route, works for me but the translated strings are not right one for me also. Give a try also to enable translate string under configuration -> SEO
Regards
COM_VIRTUEMART_SEF_EDITSHIPPING is obsolete
Quote from: bytelord on December 03, 2012, 13:07:12 PM
Could be something on the route, works for me but the translated strings are not right one for me also.
What does not work? translated seo?
Yes, as i see the issue with the translated strings returns somehow, using en-gb and sef keys translated the url is by,`p`.created_on instead of the translated one.
The COM_VIRTUEMART_SEF_EDITSHIPPING is not there anymore as you mention, may lysov using old language files for ru-RU but as far as i know jjk have fixed all of them.
Ok, but another question: why dublicate tag 'ru' in the non-SEF url?
/index.php?option=com_virtuemart&view=category&virtuemart_category_id=28&Itemid=120&lang=ru&language=ru-RU&orderby=`p`.created_on
I have a similar issue I have posted for me this:
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?
Quote from: csimmo on December 04, 2012, 04:16:06 AM
I have a similar issue I have posted for me this:
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?
Hi, csimmo. What is your VM version? I have no problem to sort by manufacturers.
To bytelord (offtopic):
Probably have to fix router.php, can I hope to correct sql-query?
router.php line 971 from
$query = 'SELECT * FROM `#__menu` where `link` like "index.php?option=com_virtuemart%" and client_id=0 and published=1 and (language="*" or
language="'.$this->langTag.'")' ;
to
$query = 'SELECT * FROM `#__menu` where `link` like "index.php?option=com_virtuemart%" and client_id=0 and published=1 and (language="*" or
language LIKE "'.$this->langTag.'")';
Please see my explanation at http://forum.virtuemart.net/index.php?topic=99711.msg335341#msg335341
I noticed one important (perhaps) feature: if I change the default number of displayed products on the page (pagination), sorting works!
error http://www.litera.spb.ru/catalog/health-and-education/councils-of-the-kind-doctor/by,%60p%60.product_sku
works http://www.litera.spb.ru/catalog/health-and-education/councils-of-the-kind-doctor/by,%60p%60.product_sku/
works http://www.litera.spb.ru/catalog/health-and-education/councils-of-the-kind-doctor/by,%60p%60.product_sku/results,1-72
As a temporary solution I fixed function virtuemartBuildRoute(), but this is not a good solution because it changed urls of number of pages.
if ( isset($query['orderby']) ) {
$segments[] = $helper->lang('by').','.$helper->lang( $query['orderby']) .'/'; //<-- LYV #98 -->
unset($query['orderby']);
}
Any ideas on a more elegant solution?
Search on the other side, so that it works also without the additional /, please. I am not able to reproduce.
Update to 2.0.15f has not brought results. Which functions/places to pay my attention for finding solution?
That means it works in 2.0.15f?
Unfortunately it does not work in 2/0/15f
you fixed function virtuemartBuildRoute, just try to fix it from the otherside virtuemartParseRoute
Ok, I am meeting end of the world near the Ararat and after that try to test virtuemartParseRoute() :)
hahah Ararat, I was there one time,.. I think I was 10 years old or so.
I have many friends in this area (Erevan) and they now send you greetings :) :) :)
Great :-) Thank you,
Я думаю, что в ссылке, которая задает сортировку символов '`p`' не должно быть. Во всяком случае без этого префикса ссылка работает и выглядит лучше. Поискав по исходникам, нашел место где создаются ссылки, там в создаваемую ссылку передавался параметр сортировки вместе с префиксом. Чтобы починить сортировку нужно передавать ссылку с параметром сортировки без префикса. Для наглядности вот вывод git.
Google translator says:
I think the link that defines collation '`p`' should not be. In any case, without the prefix link works and looks better. Searching for the source code, found a place where you create links, create links there in the sort parameter passed along with a prefix. Sorting is necessary to fix the link to transfer to the collation without a prefix. For clarity's message git diff
$ git diff administrator/components/com_virtuemart/models/product.php
diff --git a/site/administrator/components/com_virtuemart/models/product.php b/site/administrator/components/com_virtuemart/models/product.php
index 5545673..6ad7546 100644
--- a/siteadministrator/components/com_virtuemart/models/product.php
+++ b/site/administrator/components/com_virtuemart/models/product.php
@@ -1904,7 +1904,7 @@ class VirtueMartModelProduct extends VmModel {
$link = JRoute::_ ($fieldLink . $manufacturerTxt);
}
else {
- $link = JRoute::_ ($fieldLink . $manufacturerTxt . '&orderby=' . $field);
+ $link = JRoute::_ ($fieldLink . $manufacturerTxt . '&orderby=' . $fieldWithoutPrefix);
}
$orderByLink .= '<div><a title="' . $text . '" href="' . $link . '">' . $text . '</a></div>';
}
Solution is:
administrator/components/com_virtuemart/models/product.php
near line 1908 put code:
if ($field=='`p`.created_on') $field='created_on';
it must be before line
$link = JRoute::_ ($fieldLink . $manufacturerTxt . '&orderby=' . $field);
now it works!
For which version is this fix? The problem is imho solved.
Quote from: artmasterpro on June 28, 2013, 17:08:53 PM
Solution is:
administrator/components/com_virtuemart/models/product.php
near line 1908 put code:
if ($field=='`p`.created_on') $field='created_on';
it must be before line
$link = JRoute::_ ($fieldLink . $manufacturerTxt . '&orderby=' . $field);
now it works!
I've made remake. I added
$link = str_replace('%60p%60.', '', str_replace('`p`.', '', $link));
before
$orderByList = '<div class="orderlistcontainer"><div class="title">' . vmText::_ ('COM_VIRTUEMART_ORDERBY') . '</div><div class="activeOrder"><a title="' . $orderDirTxt . '" href="' . $link . '">' . vmText::_ ('COM_VIRTUEMART_SEARCH_ORDER_' . $orderby) . ' ' . $orderDirTxt . '</a></div>';
and now it works by evething order ;)