Viewing 6 replies - 1 through 6 (of 6 total)
  • Mirko P.

    (@rainfallnixfig)

    Hi @itsmemidhuz ??

    I need help with creating direct checkout that users can complete the checkout from the free listing on google
    https://example.com/cart?item_id={id}

    I understand you’re looking to create a direct checkout
    for your customers using the link from the free listing on Google, so when customers click on a link from your Google listing,
    they are taken directly to the checkout page with the item already placed in their cart.

    A common issue that might be causing the cart to
    appear empty could be that the product ID specified in the URL is incorrect or the string is not being recognized correctly by WooCommerce. Please double-check it first, and here is a useful post on how to build a WooCommerce direct checkout link.

    Do reach out if you require further assistance with this, or any other questions related to your WooCommerce store.

    Cheers.

    Thread Starter itsmemidhuz

    (@itsmemidhuz)

    Thanks very much for your response. I see that the cart comes empty because of it’s format

    when user click checkout button the url identify the item id and add the product to cart. But here the product id are completely different from what appear in the merchant shopping.

    Example if a product that comes with id 9238 and when the link tried to add to cart, it automatically add gla_ to the item if. It works if it doesn’t comes without gla_ in the url.

    https://example.com/checkout/?add-to-cart=item_id={gla_id}

    Above is an example of the link found after we clicked on checkout button in free listing.

    As i checked the gla added automatically to all the products add to the merchant center

    Please find a possibile solution on this

    Regards, Midhun

    Hi there @itsmemidhuz ??

    if a product that comes with id 9238 and when the link tried to add to cart, it automatically add gla_ to the item if. It works if it doesn’t comes without gla_ in the url.

    From what I gather, you’d like to remove the gla_ prefix from synced products. Feel free to take a look here, on how to do so.

    I trust that points you in the right direction, but if you have more questions, let us know.

    We’re happy to help.

    Thread Starter itsmemidhuz

    (@itsmemidhuz)

    Thanks for providing relevant solution

    Thread Starter itsmemidhuz

    (@itsmemidhuz)

    Could you please tell me where the code needs to be added

    Hi @itsmemidhuz,

    Thanks for providing relevant solution. Could you please tell me where the code needs to be added

    From what I understand, you’re looking for guidance on where to add the custom code for removing the ‘gla_’ prefix from your product IDs.

    You should add this code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, like the Code Snippets plugin. Please note that it’s not advisable to add custom code directly to your parent theme’s functions.php file. Doing so could lead to the code being erased when the theme is updated.

    ?? Just a quick reminder: Before you make any changes, we strongly recommend that you create a backup of your full site and database. This is a crucial step to ensure that in case anything goes wrong, you can easily restore your site to its previous, functioning state.

    I hope this information is helpful! If you have any other questions or need further assistance, please don’t hesitate to ask.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to enable direct checkout’ is closed to new replies.