Page 1 of 1
Product Info Text Box
Posted: Fri Jan 21, 2022 6:08 pm
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
Re: Product Info Text Box
Posted: Sat Jan 22, 2022 10:27 am
by LeeFoster
I've created the input, see attached. I just need to figure out how to add it to the session/cart now.
Re: Product Info Text Box
Posted: Sat Jan 22, 2022 1:53 pm
by LeeFoster
@burt,
@ecartz
Can one of you point me to how/where the
[cart] => shoppingCart Object
part of a session is built/added?
Re: Product Info Text Box
Posted: Sat Jan 22, 2022 2:41 pm
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.
Re: Product Info Text Box
Posted: Sat Jan 22, 2022 2:43 pm
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