News:

Support the VirtueMart project and become a member

Main Menu

Order by Creation Date: Error 404

Started by shurikkan, April 06, 2013, 10:24:28 AM

Previous topic - Next topic

shurikkan

Good day.

I have a problem with Virtuemart 2.0.20b:

Components -> Virtuemart -> Configuration -> Configuration -> Product Order Settings -> Available Sort-by fields: Creation Date


When I select Sort by Creation Date (`created_on`) on category page, I have an error 404.

The right page address for order-by created date:
http://*****.ru/category/by,created_on

But I have:
http://*****.ru/category/by,`p`.product_name

This error is in all shops, where Virtuemart 2.0.20b is used.

Please, help me to find the right solution!

__________________
System Information:

PHP Built On:                             FreeBSD smurf.z8.ru 8.3-RELEASE-p5 FreeBSD 8.3-RELEASE-p5 #0: Fri Nov 30 14:38:36 MSK 2012 root@build8-3.z8.ru:/usr/src/sys/amd64/compile/VH_8.3_64 amd64
Database Version:                    5.0.77-log
Database Collation:                  utf8_general_ci
PHP Version:                             5.3.13
Web Server:                             Apache/2.2.22 (FreeBSD) PHP/5.3.13
WebServer to PHP Interface:   apache2handler
Joomla! Version:                       Joomla! 2.5.9 Stable [ Ember ] 4-February-2013 14:00 GMT
Joomla! Platform Version:         Joomla Platform 11.4.0 Stable [ Brian Kernighan ] 03-Jan-2012 00:00 GMT
User Agent:                              Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0


PHP Settings:

Safe Mode: Off
Open basedir: None
Display Errors: Off
Short Open Tags: On
File Uploads: On
Magic Quotes: On
Register Globals: Off
Output Buffering: Off
Session Save Path: /home/shurikkan/tmp/
Session Auto Start: 0
XML Enabled: Yes
Zlib Enabled: Yes
Native ZIP Enabled: Yes
Disabled Functions: None
Mbstring Enabled: Yes
Iconv Available: Yes



GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

shurikkan

#2
GJC Web Design, I don't understand where is solution of this problem  :(

I don't find where is this code in com_virtuemart:
Quotecase 'latest':
                  $date = JFactory::getDate (time () - (60 * 60 * 24 * $latest_products_days));
                  $dateSql = $date->toMySQL ();
                  $where[] = 'p.`' . $latest_products_orderBy . '` > "' . $dateSql . '" ';
                  $orderBy = 'ORDER BY p.`' . $latest_products_orderBy . '`';
                  $this->filter_order_Dir = 'DESC';
                  break;

This bug on the official Virtuemart site!
http://extensions.virtuemart.net/import-export/
Try to sort by "Creation Date"

Why not publication a official correct update??

P.S.: I'm sorry, but I don't have a interpreter today, and it is rather difficult to read and write here correct :-\

GJC Web Design

the solution to http://forum.virtuemart.net/index.php?topic=114543.msg385847#msg385847  is the 8th post on that topic -
but after looking at your code snippet I don't think this is related to your problem.

The above created_on problem is in the frontend product object -
the snippet is getting the created_on directly from the DB which isn't over-written -

administrator\components\com_virtuemart\models\product.php ~ line 415
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

shurikkan

It is amazed me that there is no official solution!  ???

Milbo

This is really strange. I tested this on my localhost and it works fine, without URL rewriting. But not with URL rewriting, very strange.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jucedupp

"This is really strange. I tested this on my localhost and it works fine, without URL rewriting. But not with URL rewriting, very strange."

And?  has anyone come up with a solution?

I am sitting with this:

"http://www.mywebsite.com/manufacturer/wow/by,`p`.created_on?filter_product="

This does not work, since Joomla ? VM sef does not know what to do with the '`' (backtick)

Even if I replace the string to look like: "http://www.mywebsite.com/manufacturer/wow/by,p.created_on?filter_product=" (without the backticks) I still get a 404.  I think it is the dot.

Where can I find the original query to alias it or something?

Thanks

JG

Milbo

Is fixed in version 2.0.24a coming soon.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/