VirtueMart Forum

VirtueMart 2 + 3 + 4 => Frontend Modules => Topic started by: copyman on February 12, 2020, 11:40:15 AM

Title: Product module sorting by ID
Post by: copyman on February 12, 2020, 11:40:15 AM
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
Title: Re: Product module sorting by ID
Post by: PRO on February 12, 2020, 20:28:32 PM
do you have the database of the old site?

if so, the date is in there
Title: Re: Product module sorting by ID
Post by: copyman on February 12, 2020, 23:13:15 PM
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...
Title: Re: Product module sorting by ID
Post by: PRO on February 13, 2020, 14:20:08 PM


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?
Title: Re: Product module sorting by ID
Post by: copyman on February 13, 2020, 16:19:35 PM
Hi,

I have about 1000 old products all with database entry 00:00:00:00 and none new so far ...
Title: Re: Product module sorting by ID
Post by: GJC Web Design on February 13, 2020, 19:01:02 PM
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
Title: Re: Product module sorting by ID
Post by: copyman on February 13, 2020, 19:23:29 PM
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.
Title: Re: Product module sorting by ID
Post by: PRO on February 13, 2020, 21:39:10 PM
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
Title: Re: Product module sorting by ID
Post by: copyman on February 13, 2020, 22:09:14 PM
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  :)