Skip to main content
remove unnecessary question about adding buttons
Source Link

I'm looking for the best way to add a 'Send Cart Link' button to the Order entry view in Commerce 4/Craft 4.

Currently the 'Share Cart' link is behind the cog in the top right of the order view. This then opens a popup with the URL to the cart.

What I would like to do is add a new button to the top right of the order view that would take the customer email and trigger an email to be sent to the customer with the cart URL.

On the site that this would be for, the company often make bespoke carts/orders for clients and would like a more streamlined way of sending these to the client rather than clicking the button, copying and pasting the link and sending it manually via an email.

This also opens up the possibility of using a nice branded HTML template to send the cart link to the customer.

Also, there seems to be a discrepancy between adding buttons to an Order vs an Entry. In Craft 4 there is the EVENT_DEFINE_ADDITIONAL_BUTTONS hook but in the Commerce docs it is using the 'older' cp.commerce.order.edit.details template hook that seems to be no longer used in Craft. Has anyone got any experience with this?

I'm looking for the best way to add a 'Send Cart Link' button to the Order entry view in Commerce 4/Craft 4.

Currently the 'Share Cart' link is behind the cog in the top right of the order view. This then opens a popup with the URL to the cart.

What I would like to do is add a new button to the top right of the order view that would take the customer email and trigger an email to be sent to the customer with the cart URL.

On the site that this would be for, the company often make bespoke carts/orders for clients and would like a more streamlined way of sending these to the client rather than clicking the button, copying and pasting the link and sending it manually via an email.

This also opens up the possibility of using a nice branded HTML template to send the cart link to the customer.

Also, there seems to be a discrepancy between adding buttons to an Order vs an Entry. In Craft 4 there is the EVENT_DEFINE_ADDITIONAL_BUTTONS hook but in the Commerce docs it is using the 'older' cp.commerce.order.edit.details template hook that seems to be no longer used in Craft. Has anyone got any experience with this?

I'm looking for the best way to add a 'Send Cart Link' button to the Order entry view in Commerce 4/Craft 4.

Currently the 'Share Cart' link is behind the cog in the top right of the order view. This then opens a popup with the URL to the cart.

What I would like to do is add a new button to the top right of the order view that would take the customer email and trigger an email to be sent to the customer with the cart URL.

On the site that this would be for, the company often make bespoke carts/orders for clients and would like a more streamlined way of sending these to the client rather than clicking the button, copying and pasting the link and sending it manually via an email.

This also opens up the possibility of using a nice branded HTML template to send the cart link to the customer.

Source Link

How to add a 'Share Cart' button to send email to customer with cart link

I'm looking for the best way to add a 'Send Cart Link' button to the Order entry view in Commerce 4/Craft 4.

Currently the 'Share Cart' link is behind the cog in the top right of the order view. This then opens a popup with the URL to the cart.

What I would like to do is add a new button to the top right of the order view that would take the customer email and trigger an email to be sent to the customer with the cart URL.

On the site that this would be for, the company often make bespoke carts/orders for clients and would like a more streamlined way of sending these to the client rather than clicking the button, copying and pasting the link and sending it manually via an email.

This also opens up the possibility of using a nice branded HTML template to send the cart link to the customer.

Also, there seems to be a discrepancy between adding buttons to an Order vs an Entry. In Craft 4 there is the EVENT_DEFINE_ADDITIONAL_BUTTONS hook but in the Commerce docs it is using the 'older' cp.commerce.order.edit.details template hook that seems to be no longer used in Craft. Has anyone got any experience with this?