VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: midnas on December 27, 2012, 10:24:21 AM

Title: VM2.0.16 Products navigation
Post by: midnas on December 27, 2012, 10:24:21 AM
Hi,

I found some problems with getNeighborProducts () (product model). It's not working as expected.

Problem is

$q .= ' and `slug` ' . $op . ' "' . $product->slug . '" ';

Let me give you example:

Default orderins is product_sku so if my product skus are {A1, A2, A3, A4, A5} and slug {B2, B3, B4, B5, B1}, the "back" product will always be product_sku = A5, cause it's slug is smaller and it has biggest sku.

So you need to change code that it will use default ordering, for my example

$q .= ' and `product_sku` ' . $op . ' "' . $product->product_sku . '" ';

I don't know where this default order comes from and where can I get which field to use so I cannot give you final solution.

Hope you understand.

Regards,
Sandi