Author Topic: VM2.0.16 Products navigation  (Read 2968 times)

midnas

  • 3rd party VirtueMart Developer
  • Beginner
  • *
  • Posts: 27
VM2.0.16 Products navigation
« 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

Code: [Select]
$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

Code: [Select]
$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