News:

Support the VirtueMart project and become a member

Main Menu

Product module sorting by ID

Started by copyman, February 12, 2020, 11:40:15 AM

Previous topic - Next topic

copyman

Hello,
I have a problem sorting the products in the module. My site has been migrated from another site and has some unknown date issues or something, but sorting by latest products doesn't work. With products in categories, etc. I solved the problem by sorting them by ID. Everything works fine, but sorting in the Product Display module does not have the ability to sort by ID. I searched and tried many modules but no one sorted by ID, anyone knew what problem could be solved?

I work with the latter Joomla 3.9.15 and Virtuemart 3.6.10 10211


    Regards

    Milen

PRO

do you have the database of the old site?

if so, the date is in there

copyman

#2
Hello,

Thanks for the reply, unfortunately and with the old site I had a similar problem, the only data in the old database was "modified_on"  However, this data does not work for me, so I'm looking for an ID sort option. The old site is 10 years old, with great effort I pulled the data from it and the new one is already finished, I do not want to start all over again...

PRO



So you are wanting to show latest products?

How many products do you have? and why not just set the ones you want as latest?

copyman

Hi,

I have about 1000 old products all with database entry 00:00:00:00 and none new so far ...

GJC Web Design

if the date is 00:00:00:00 then how could sort by latest products possibly work?

Obviously lost in migration -- try importing / updating with csv or whatever just the pid & date from the old install
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

copyman

How does sorting by latest work? Simply ... it doesn't work, I sorted by date of change in the old site. I wrote above that for some reason years ago the date of creation was not recorded in the old database. Sort by date of modification I don't want to use it because every change in the product makes it new. So I'm looking for a way to sort by ID and I only need in the product module. The shop has the ability to sort by ID.

PRO

why don't you just put what you want on feature?

You can export the products, sort by ID, then add feature to the latest ones.

Its better to fix this now somehow that is scaleable.
You can add a date in the database based on id

copyman

I know the problem will not go away, the good thing is that it will not continue - the date on the new site is correctly recorded. However, here we are talking about database manipulation that exceeds my competence threshold  :)