How can I add an extra cost selection to the cart total on my ecommerce site?

Topic summary

A developer is trying to implement a feature that allows customers to add optional extra costs to their cart total through checkboxes or select dropdowns. For example, if the cart total is 100, customers could choose to add 10, 20, or other amounts.

Current Challenge:

  • Unable to access the order amount from the cart file
  • Seeking guidance on how to add these extra costs to the total

Status:
The question remains unanswered. Another user has followed up asking if a solution was found, indicating ongoing interest but no resolution yet.

Summarized with AI on October 31. AI used: claude-sonnet-4-5-20250929.

Hi!

I am needing to implement a functionality in which on the cart page, through a checkbox, select or similar, it is possible to add a cost that is added to the total of the order. For example: If the total of the order is 100, there is a checkbox or select that allows you to add 10, another 20 and so on …

I am not finding a way to access the order amount from the cart file, and then add the extra cost there.

Could someone give me a hint?

Thanks!

@ghuerta did you get the solution for this ???