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.
Product Info Text Box
-
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
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
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
@burt, @ecartz
Can one of you point me to how/where the
Can one of you point me to how/where the
part of a session is built/added?[cart] => shoppingCart Object
-
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
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.
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
This crossed my mind but I wouldn't even know where to startecartz 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.