I made some progress.
I focused on the mechanics behind my cart mod. I can't really edit x3.min.js for big things, therefore I had to resort to some quite brutal tricks to make it work (the refresh to take into account what is or is not in the cart after clicking add or remove). No doubt some talented people who coded X3
in the first place can do it much better.
I added a new option in the caption layout: buttons.
That allows the cart buttons ( kinda on/off switch, was to lazy to make a check box) to show in the thumbnails.
Bigger buttons are shown in the popup. But I can't really modify that: X3.min.js involved... I'm forced to duplicate the buttons in the description so they show up in the popup.
- Thumbnails: buttons OR description with buttons.
- Popup: description with buttons.
I wasn't happy with the colors and colors switch on mouse over for these icons, so I coded a very dirty lazy unclean thing to do it. It's working lol.
It is working in regular albums, search results and virtual albums, and obviously in the cart page.
I just had troubles with the columns layout all the other layouts behave well. Something related to <a> tags changing or not changing into span tags. I'll fix that later when i sober up. Also had trouble with the append code for the captions: decided to stop using it and hard code it instead.
J! I didn't think it would be so much fun to code again after more than 10 years.
I just remember I need a "clear cart" button somewhere.
demo:
https://www.did-art.fr
production site:
https://www.joseph-balson.com