- Priority: 0
- Status: Closed
- Theme: Alysum
-
Assigned To:
Marek
- Private: No
- Open Date: 18.09.19, 13:02
- Opened by: Servilogi World Services
- Closed by: Marek
- Closed on: 01.11.19, 18:39
- Reason: No answer from a customer
- Comment: Glad to help!
Ticket #15616 - Module pk-isotope order
Hi
I wanna order products when we click any tab with last products added, by product id or created time.
Where we can set it?
Regards, Aaron
Comments
Hi, Servilogi World Services.
I suppose you need this option https://take.ms/Wvtf4
No, for example in your demo clasic.
I attach image: http://prntscr.com/p7vnzf
I want sort items in that module,as product id or date created. Seems that is random or something.
I don’t know how sort that module items or how can i set it.
I did it: http://prntscr.com/p7vqb9
We want show last products added to calatog as first items in that module.
I try my best english, sorry :P
No problem with english, it’s not my first language too.
As for your question, there is no such option in the module to change the order
I’m watching code, they get properties from “use PrestaShop\PrestaShop\Core\Product\Search\SortOrder;”
From lane 363 to 371 in file /modules/pk_isotope/pk_isotope.php put that lanes:
foreach ($uniqueListID as $k ⇒ $productID) {
if (Validate::isLoadedObject($product = new Product1)) {
$prdcts[”unsorted”][$k] = get_object_vars($product);
$prdcts[”unsorted”][$k][”id_product”] = $productID;
}
}
$products[”unsorted”] = $this→prepareBlocksProducts($prdcts[”unsorted”], $params[’hook’]);
Developer put unsorted and lanes 462 to 473 they put order by types, then would be any way to sort it.
It shouldn’t be very difficult for those who have created the template and the module.
Can you help me with that please
Try to change these variables (Line 377):
For example:
Available options:
Our support doesn’t cover code customizations
I will try and give you some info.
We have another two question, i give you url: (https://myshoplist.es/)
- Order as guest don’t run.
- Module appears on configuration page layout but isn’t in homepage. (module product list, would be appear before module pk_isotope)
Regards, Aaron
Any idea¿?
Order as guest don’t run - what do you mean? it works for me
Please make sure the module is configured correctly, maybe there is just no any products to show