Custom Add to Cart button does’t add product to cart

This topic has 12 replies, 3 voices, and was last updated 1 weeks, 2 days ago ago by Tony Rodriguez

  • Avatar: Bas_Kling
    Bas Kling
    Participant
    October 29, 2025 at 22:59

    Hi,

    When adding a custom Add to Cart button in a product page, the product doesn’t seem to get added to the cart.
    We’ve tried this with 2 separate buttons:
    1) The bespoke Add to cart widget in Elementor Pro and
    2) A standard button, then using the Dynamic Tag option where a link can be defined, selecting the “Add to basket” tag.

    The first button does absolutely nothing: the page just refreshes.
    The second one generates a slug with ?add-to-cart=[current product ID], however, also adds a redirect link, resulting in loading the home page. Upon investigation (refreshing the cart page) it seems we get an error saying: “Choose product options via [specific product page]. This is very strange, because despite this being a variable product, all the primary/standard variations are preselected.

    Please help us troubleshoot

    Please, contact administrator
    for this information.
    11 Answers
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    October 30, 2025 at 08:13

    Hello @Bas Kling,

    As this product is variable and you would like to manually set the URL with specific arguments, please note that you also need to include an additional parameter, such as variation_id (refer to the private content for details).

    Could you please describe the solution you would like to implement? Since you are using Elementor to create the single product templates, you can add the Sticky Cart widget, which already includes the appropriate buttons and configuration.

    Best regards,
    Jack Richardson
    8Theme Team

    Please contact administrator
    for this information.
    Avatar: Bas_Kling
    Bas Kling
    Participant
    October 30, 2025 at 21:13

    Hi Jack,

    Unfortunately, we’re unable to locate the Sticky Cart widget: https://imgur.com/HNioQZI (looking for “sticky cart” doesn’t yield any result)
    Also: the example you gave still redirects to the home page as the slug before the ?add-to-cart is the home page’s address.

    The solution we’re trying to create is a sticky-footer with a cart button that pops up to offer the customer to add the product of the current page to the shopping cart. The sticky footer pops up after scrolling 15% down. The sticky footer should also disappear again after scrolling all the way to the top, because of the standard add to cart button coming back into view. After clicking the sticky footer cart button, the customer should stay on the same product page, not get sent to the home page…

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    October 31, 2025 at 07:25

    Hello @Bas Kling,

    If you do not see certain elements in your Elementor panel, could you please check whether the corresponding widget is active in your Elements Manager table: https://elementor.com/help/element-manager/?

    We have a Sticky Cart widget (https://prnt.sc/aXUq-dOiHYPT) that appears only after you scroll past the “Add to Cart” area on a single product page, which seems to be what you are looking for.

    If you need something different, could you please clarify which elements or content you would like to modify in this widget? We may be able to provide you with some code snippets to adjust it, if such an option is available.

    Best regards,
    Jack Richardson
    8Theme Team

    Avatar: Bas_Kling
    Bas Kling
    Participant
    October 31, 2025 at 09:58

    Hi Jack,

    Thanks for your guidance. The problem appeared to be two-fold:
    The element was disabled in the Elements Manager, so we fixed that. Second, the widget only appears in the left side widget panel on a single product page, not on any other page, so while using the pop-up template builder, we couldn’t find the widget.
    It’s implemented, and it works, so we’re halfway there.

    The second part of the problem is that we’re unable to ‘copy’ the same functionality to an add-to-cart button in the cross-sell section, and I was hoping that the code snippet you suggested might fix that as well?

    Please contact administrator
    for this information.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    October 31, 2025 at 11:10

    Hello @Bas Kling,

    This widget is designed exclusively for use on Single Product templates and cannot be applied to other templates, such as simple pages or popup builders. The Sticky Cart feature functions based on the data of the current product, which is why it is only displayed within such templates.

    If you would like to have a similar widget on other templates, you may try the following adjustment; however, please note that it may not display correctly, and we cannot guarantee its proper functionality. To apply this adjustment, open the web inspector using the developer tools (https://prnt.sc/gpblRXRP-EF3) and add the following CSS:

    .elementor-element-wrapper:has(.eight_theme-elementor-icon.et-elementor-sticky-cart) {
        display: block !important;
    }
    
    .elementor-element-wrapper .elementor-element:has(.eight_theme-elementor-icon.et-elementor-sticky-cart) {
        pointer-events: all !important;
        opacity: 1 !important;
    }

    Alternatively, we recommend requesting additional customization, as we are unable to create custom widgets due to our support policy. Please note that even the default Elementor “Add to Cart” button does not function correctly in your custom-built layout, which indicates that the issue is not related to our theme but rather to the specific customizations made beyond Elementor’s standard template functionality.

    Best regards,
    Jack Richardson
    8Theme Team

    Avatar: Bas_Kling
    Bas Kling
    Participant
    October 31, 2025 at 11:30

    Hi Jack,

    I think you may have misunderstood:

    If you would like to have a similar widget on other templates

    The screenshot I shared is of a cross-sell section on the same single product page. The product image is retrieved just fine, but the add-to-cart button doesn’t pick up the corresponding product. You mean to say there’s no way to solve this, other than to request a feature? I would think that, because of the existing hook for the product image,, an ?add-to-cart slug with the relevant product-ID wouldn’t be much of an extra stretch…
    Let me know if this clarifies things a bit more. If not, I’ll proceed with the feature request.

    Please contact administrator
    for this information.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    October 31, 2025 at 13:19

    Hello @Bas Kling,

    We have thoroughly tested the issue and would like to highlight the following points:

    You are using the Elementor Loop Item feature provided by the Elementor PRO plugin. Within the content of each loop item, there is a Button widget with dynamic content set to “Add to cart” (see: https://prnt.sc/rdrxMm1KVYXX). However, the dynamic tag URL that is provided by the Elementor plugin is not displayed correctly for products that are product variations.

    This functionality needs to be corrected within the Elementor plugin’s code. Therefore, we recommend contacting the Elementor support team with this request. Please note that we can only provide support for bugs or issues related to our theme, and we have explained why this particular issue should be resolved in the Elementor PRO plugin’s code.

    We hope our explanation is clear.

    Best regards,
    8Theme Team

    Avatar: Bas_Kling
    Bas Kling
    Participant
    October 31, 2025 at 15:50

    Hi Jack,

    Thank you for all the thorough feedback. Your support is amazing, as always.
    I’ll take this up with the Elementor team.

    Thanks again!

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    October 31, 2025 at 19:38

    Hello @Bas Kling,

    Thank you very much for your detailed feedback. We truly appreciate your continued cooperation.
    We will forward your comments from the Elementor team feedback for further review.

    Best Regards,
    Jack Richardson
    8Theme’s Team

    Avatar: Bas_Kling
    Bas Kling
    Participant
    December 3, 2025 at 12:32

    Thanks for the support! My topic “Custom Add to Cart button does’t add product to cart” has been successfully resolved.

    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff
    December 3, 2025 at 12:32

    Dear Bas Kling,

    We really appreciate your time and engagement within the WordPress & WooCommerce community

    Your feedback drives every improvement we make in XStore — helping us deliver a smoother and more flexible experience with each update.

    Your input makes a real difference.

    Topic closed.
    The 8Theme Team

  • Viewing 12 results - 1 through 12 (of 12 total)

The issue related to '‘Custom Add to Cart button does’t add product to cart’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.