Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2020-03-21 05:54:24

chumby
Member
Registered: 2014-10-23
Posts: 188

Cart: Item name

Hi there,

I notice the item name or "Filename" is passed through to the cart.

Is there anyway I can access this name (via a {} token for instance) in orfer to use the filename in some javascript located in the desciption box to ascertain other properties of the file such as size etc?

Or is there another way to present the files dimensions, size etc in the cart?

Cheers,
Chumby.

Offline

#2 2020-03-21 06:35:53

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Cart: Item name

Item name comes from the Title metadata field. If that's empty, then it defaults to filename.

Where did you want the metadata to show up? In the album's metadata fields, or in the add-to-cart box, or in the cart itself.

If it's the album metadata fields, you can already access dimensions with metadata tokens. I don't see a token for file size though.

You could use a Lightroom plugin like LR/Transporter to first populate the Title field with information from other metadata fields.
https://www.photographers-toolbox.com/p … porter.php


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#3 2020-03-21 11:21:23

chumby
Member
Registered: 2014-10-23
Posts: 188

Re: Cart: Item name

Hi Rod,

Thanks for that...

In the cart itself - in the descripton box.  I notice that you can use (md) in here but was thinking we could add javascript {script} and tokens {} as well to work out filesize, dimensionsand other information. (perhaps dpi?)

Cheers
Chumby

Offline

#4 2020-03-21 13:19:47

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Cart: Item name

I don’t see a “description” box. Can you be more specific?

You can get some of that info using a custom image loop: http://community.theturninggate.net/vie … hp?id=9142

Not sure how you’d get that info into the cart though


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#5 2020-03-21 14:08:35

chumby
Member
Registered: 2014-10-23
Posts: 188

Re: Cart: Item name

Hi Rod,

The description box is at:

Backlight - Cart - Products - (My product name) - Edit

then you can put in a description for a product.  So in the box I would like to include image specific detaiils.

Thanks
Chumby

Offline

#6 2020-03-21 22:40:16

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Cart: Item name

That is something for Ben. Or maybe Daniel.

Backend structure isn’t open to phplugins so I can’t imagine a way of dynamically changing that field.

But maybe adding html to the front-end cart is possible, and using something like the examples Daniel shows here: https://lab.danielleu.com/blog/customiz … page-view/

But there would still be the challenge of passing that info on to customer emails.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#7 2020-03-22 01:01:52

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: Cart: Item name

Phplugins doesn't have a cart support API. I never looked how the cart handling is done in javascript. But I don't advocate to modify/hack the backlight files. So I would look at another approach:

Your best bet is to create categories based on image size (eg, dimensions). This could be a range of dimensions. You could use Lr smart albums to group identical/similar sized images together and then apply the same category to all of them. Now in the cart you could use a common text for all of them.


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#8 2020-03-22 06:30:02

chumby
Member
Registered: 2014-10-23
Posts: 188

Re: Cart: Item name

Ok thanks Rod and Daniel,

Would definately not be hacking any code!  Even if I wanted, my skill level would stop me smile

I'm not using lightroom so will investigate if I can actual image size written at the IPTC / metadata level for each image as it is exported.  Don't know if this is possible though...  Thanks for the lightroom tip also.

Cheers,
Martin

Offline

Board footer

Powered by FluxBB