Author Topic: Order by Creation Date: Error 404  (Read 3050 times)

shurikkan

  • Beginner
  • *
  • Posts: 5
Order by Creation Date: Error 404
« on: April 06, 2013, 10:24:28 am »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10118
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Order by Creation Date: Error 404
« Reply #1 on: April 07, 2013, 14:41:51 pm »
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

shurikkan

  • Beginner
  • *
  • Posts: 5
Re: Order by Creation Date: Error 404
« Reply #2 on: April 19, 2013, 07:42:37 am »
GJC Web Design, I don't understand where is solution of this problem  :(

I don't find where is this code in com_virtuemart:
Quote
case '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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10118
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Order by Creation Date: Error 404
« Reply #3 on: April 19, 2013, 09:00:19 am »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

shurikkan

  • Beginner
  • *
  • Posts: 5
Re: Order by Creation Date: Error 404
« Reply #4 on: April 22, 2013, 20:27:41 pm »
It is amazed me that there is no official solution!  ???

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10094
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Order by Creation Date: Error 404
« Reply #5 on: October 08, 2013, 17:26:24 pm »
This is really strange. I tested this on my localhost and it works fine, without URL rewriting. But not with URL rewriting, very strange.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jucedupp

  • Beginner
  • *
  • Posts: 4
Re: Order by Creation Date: Error 404
« Reply #6 on: November 12, 2013, 08:52:54 am »
"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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10094
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Order by Creation Date: Error 404
« Reply #7 on: November 14, 2013, 22:42:20 pm »
Is fixed in version 2.0.24a coming soon.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/