VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: djold on October 15, 2016, 09:45:54 AM

Title: Sublayout products_horizon.php ordering
Post by: djold on October 15, 2016, 09:45:54 AM
Hi!

I made a sublayout based on products_horizon.php. My only problem that the product ordering is different than what I set on admin panel.

I think around row 21, there is a clue that ordering is set based on last visited items:

$Itemid = shopFunctionsF::getLastVisitedItemId();

How can I change this? (I investigate shopFunctionsF in the VM document, but it has not a function like to get Id other ways.)

Thank You for helping.
Title: Re: Sublayout products_horizon.php ordering
Post by: jenkinhill on October 15, 2016, 13:22:33 PM
Nothing to dp with getLastVisitedItemId

I suspect you have not set "Default product sort order" to ordering ascending in VM Configuration/Product Order Settings
Title: Re: Sublayout products_horizon.php ordering
Post by: djold on October 15, 2016, 13:29:13 PM
Hi!

I have 'Default product sort order' set to 'Ordering'. In other layouts like category view everything is in order.
Title: Re: Sublayout products_horizon.php ordering
Post by: djold on October 19, 2016, 13:46:34 PM
Anyone?  :)
Title: Re: Sublayout products_horizon.php ordering
Post by: djold on October 20, 2016, 09:46:15 AM
It was my fault. Hacked the php and made a mistake.

Topic could be be close or delete.