Getting data from product_description to orders_products

Open to all! Ask other shopowners for help.
Xpajun
Contributor
Posts: 187
Joined: Thu Mar 04, 2021 1:18 pm
Phoenix Version: v1.0.9.0
Has thanked: 3 times
Been thanked: 6 times

Re: Getting data from product_description to orders_products

Post by Xpajun »

ecartz wrote: Tue Feb 20, 2024 1:36 am templates/xpajun/includes/hooks/shop/checkout_process/parts.php with the class named hook_shop_checkout_process_parts
Thank you Matt - that works a treat
Current Store is now running 1.0.9.0 - php 8.2.18
Now working on taking a short rest :D - php 8.2.18


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
burt
Core Team
Posts: 4557
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Getting data from product_description to orders_products

Post by burt »

Now it's sorted, I'll post what I was going to earlier, but didn't because I didn't want to confuse matters;

Hooks in a template may stop working if the shopowner changes to a different template.

For this reason, only hooks that are specifically for the template should go into this structure;
templates/{template_name}includes/hooks/shop/

Otherwise stick them in the main hooks structure;
/includes/hooks/shop/

I suspect that this hook is not just for this template, so would be (in my opinion) better placed in the main hooks structure. Then if you ever change templates, you don't have to think about why your "parts" hook stopped working.
Xpajun
Contributor
Posts: 187
Joined: Thu Mar 04, 2021 1:18 pm
Phoenix Version: v1.0.9.0
Has thanked: 3 times
Been thanked: 6 times

Re: Getting data from product_description to orders_products

Post by Xpajun »

burt wrote: Tue Feb 20, 2024 11:16 am Now it's sorted, I'll post what I was going to earlier, but didn't because I didn't want to confuse matters;

Hooks in a template may stop working if the shopowner changes to a different template.

For this reason, only hooks that are specifically for the template should go into this structure;
templates/{template_name}includes/hooks/shop/

Otherwise stick them in the main hooks structure;
/includes/hooks/shop/

I suspect that this hook is not just for this template, so would be (in my opinion) better placed in the main hooks structure. Then if you ever change templates, you don't have to think about why your "parts" hook stopped working.
Understood Gary - I'll bear that in mind if I ever change my template (if I remember :roll: )
Current Store is now running 1.0.9.0 - php 8.2.18
Now working on taking a short rest :D - php 8.2.18


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