Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
Joseph_balson
Experienced
Topic Author
Posts: 73
Joined: 08 Mar 2021, 05:35

I got a working cart over all folders

23 Jun 2021, 16:12

I call that a cart, but it's actually just a page displaying all the photos you selected anywhere in X3, with a mail form to ask whatever you think of about that list of photos, could be a global quotation, telling the photog that is the selection  you want him to edit for you, or just some appreciation message. Or anything else I didn't think of.

You can play with it on my demo X3: https://www.did-art.fr/

It's quite simple, nothing fancy, and there is lot of room for improvement but it does the job. It's also a quite easy mod to install on any X3.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: I got a working cart over all folders

24 Jun 2021, 00:14

Good job  :clap:
 
pede
Experienced
Posts: 60
Joined: 08 Apr 2019, 06:03

Re: I got a working cart over all folders

24 Jun 2021, 09:28

Very good solution! :thumbsup:
I could use both functions very well. :wink:
 
metallissimus
Experienced
Posts: 331
Joined: 17 Oct 2019, 06:54

Re: I got a working cart over all folders

24 Jun 2021, 13:32

That looks very promising! There's some small details I am missing or don't like, but the basic functionality fits my need pretty well.
You say about your mods that they are tailored to your needs (of course, I would say), are you open to suggestions anyway? Either way I'd be happy to try to make this run on my own website.
www.danielbollinger.de – corporate photography
hochzeiten.danielbollinger.de – wedding photography
 
User avatar
Joseph_balson
Experienced
Topic Author
Posts: 73
Joined: 08 Mar 2021, 05:35

Re: I got a working cart over all folders

24 Jun 2021, 15:19

sure, I'd be glad
 
User avatar
Joseph_balson
Experienced
Topic Author
Posts: 73
Joined: 08 Mar 2021, 05:35

Re: I got a working cart over all folders

25 Jun 2021, 14:51

Update:
- I made the process smoother for the visitor.
- I inverted the positions of the form (or any content in the page that could be there) with the list of photos in the selection.
- the initial setup is more automated.


Update:
- a button to clear all the images in the selection
 
metallissimus
Experienced
Posts: 331
Joined: 17 Oct 2019, 06:54

Re: I got a working cart over all folders

01 Jul 2021, 13:03

I know too little about web-technology, so I don't know what could be possible with this mod.

Some observations/ideas/problems:
I already managed to add the "add to selection" button not only in the popup but also in caption overlay in the gallery, so visitors can add to selection directly from there. This doesn't work in the cart though, it seems not all the gallery settings made to the showcart page do reflect there. (I also noticed many layouts, e.g. columns or grid, not working properly.)

Unfortunately I don't know how to prevent that clicking on the button in caption overly also opens the underlying image in popup.

Ideally the button could reflect if an image is already in the selection and change to "remove".
www.danielbollinger.de – corporate photography
hochzeiten.danielbollinger.de – wedding photography
 
User avatar
Joseph_balson
Experienced
Topic Author
Posts: 73
Joined: 08 Mar 2021, 05:35

Re: I got a working cart over all folders

01 Jul 2021, 15:01

I already managed to add the "add to selection" button not only in the popup but also in caption overlay in the gallery, so visitors can add to selection directly from there. 
I didn't think of that. Great idea!

Unfortunately I don't know how to prevent that clicking on the button in caption overly also opens the underlying image in popup.
That is going to be a tough one, because the image box is what registers all clicks in image list display. 
I'm going to look into it.

This doesn't work in the cart though, it seems not all the gallery settings made to the showcart page do reflect there. (I also noticed many layouts, e.g. columns or grid, not working properly.)
Yes, I am aware of that. The showcart is based on the search results display, which is what I focused on. More layouts work properly with search results, and in a couple days I will modify the showcart accordingly and send you replacement files (nothing else to do for you but just replace the old files)


Ideally the button could reflect if an image is already in the selection and change to "remove".
That I thought of, but didn't YET find a proper way of doing it.
 
User avatar
Joseph_balson
Experienced
Topic Author
Posts: 73
Joined: 08 Mar 2021, 05:35

Re: I got a working cart over all folders

01 Jul 2021, 17:41

So, I adapted the layouts.
BUT due to the nature of X3, the JS script adjusting the style for the column layout doesn't work in search results and cart..

I'm trying to figure that out.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: I got a working cart over all folders

02 Jul 2021, 01:26

Just to crash the party, I have already confirmed that I will likely be looking into an official lightbox/cart system for next X3 release, and working directly from the X3 source / design has advantages of course. I am certainly following this post. A few concepts I have in mind:
  • Instead of "Your selection of photos" link in topbar, there would be an obvious CART icon button bottom right corner of screen, indicating the amount of items in cart. This button can be clicked to display items in cart, edit/remove items and ultimately "place order" (email).
  • I would be storing "selected items" in browser Javascript localStorage, which means the items are still selected if they refresh page and/or return later.
  • For selecting images, I would probably like to have some clear [] Checkbox element available, also directly in gallery layouts (not only popup). I'd prefer to avoid having buttons with long text "add to selection", but instead make it obvious visually.
 
User avatar
Joseph_balson
Experienced
Topic Author
Posts: 73
Joined: 08 Mar 2021, 05:35

Re: I got a working cart over all folders

02 Jul 2021, 05:12

working directly from the X3 source / design has advantages of course. 
Knowing your own baby is an even bigger advantage than the source only. 

I am certainly following this post. A few concepts I have in mind:
Instead of "Your selection of photos" link in topbar, there would be an obvious CART icon button bottom right corner of screen, indicating the amount of items in cart. This button can be clicked to display items in cart, edit/remove items and ultimately "place order" (email).
I would be storing "selected items" in browser Javascript localStorage, which means the items are still selected if they refresh page and/or return later.
For selecting images, I would probably like to have some clear [] Checkbox element available, also directly in gallery layouts (not only popup). I'd prefer to avoid having buttons with long text "add to selection", but instead make it obvious visually.
Sounds great!
 
User avatar
Joseph_balson
Experienced
Topic Author
Posts: 73
Joined: 08 Mar 2021, 05:35

Re: I got a working cart over all folders

03 Jul 2021, 19:59

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
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: I got a working cart over all folders

04 Jul 2021, 02:53

:clap: :thumbsup:
 
User avatar
Joseph_balson
Experienced
Topic Author
Posts: 73
Joined: 08 Mar 2021, 05:35

Re: I got a working cart over all folders

04 Jul 2021, 07:14

Decided to bypass cdn and modify x3.min.js. 
Mixing buttons and descriptions didn't do it. 
Buttons are separated from description. I could set an option to show them in the popup but since they are basically always to be at least displayed here it doesn't make any sense.

- Thumbnails: the normal caption options work, with one more option: buttons.
- Popup: the normal popup options work but buttons are always displayed.

gonna do the same with keywords. Then fix that refresh thing in JS.