Product Info Text Box

Open to all! Ask other shopowners for help.
Post Reply
LeeFoster
Contributor
Posts: 263
Joined: Sun Feb 28, 2021 9:41 pm
Phoenix Version: v1.0.8.20
Has thanked: 1 time
Been thanked: 5 times

Product Info Text Box

Post by LeeFoster »

Anyone interested in working on a PI module to add a text box to the product info page?

This will just be a simple text box that can be added to all products and passes the details with the order. Think something similar to a message you might add to a cake or card like the iced message box below.
cake.PNG
You do not have the required permissions to view the files attached to this post.


Join The Code Co-op to get access to your library in the Code Co-op Forum
LeeFoster
Contributor
Posts: 263
Joined: Sun Feb 28, 2021 9:41 pm
Phoenix Version: v1.0.8.20
Has thanked: 1 time
Been thanked: 5 times

Re: Product Info Text Box

Post by LeeFoster »

I've created the input, see attached. I just need to figure out how to add it to the session/cart now.
You do not have the required permissions to view the files attached to this post.
LeeFoster
Contributor
Posts: 263
Joined: Sun Feb 28, 2021 9:41 pm
Phoenix Version: v1.0.8.20
Has thanked: 1 time
Been thanked: 5 times

Re: Product Info Text Box

Post by LeeFoster »

@burt, @ecartz

Can one of you point me to how/where the
[cart] => shoppingCart Object
part of a session is built/added?
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Product Info Text Box

Post by ecartz »

https://github.com/CE-PhoenixCart/Phoen ... .sql#L1128
https://github.com/CE-PhoenixCart/Phoen ... on.php#L38

Note that if you want to change the cart class behavior, you are probably better off overriding the cart class than changing how it is loaded.

You also might consider if it would be easier to change prior to the action processing instead. For example, by creating a fake attribute value with the value of your text box. Because if you modify from a text attribute to a numeric attribute, you can change less of the processing overall.
LeeFoster
Contributor
Posts: 263
Joined: Sun Feb 28, 2021 9:41 pm
Phoenix Version: v1.0.8.20
Has thanked: 1 time
Been thanked: 5 times

Re: Product Info Text Box

Post by LeeFoster »

ecartz wrote: Sat Jan 22, 2022 2:41 pm You also might consider if it would be easier to change prior to the action processing instead. For example, by creating a fake attribute value with the value of your text box. Because if you modify from a text attribute to a numeric attribute, you can change less of the processing overall.
This crossed my mind but I wouldn't even know where to start


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply