Can I integrate "add to cart button" in a HTML5 landing page?

Merchant
Från India
Medlem sedan nov. 2022

First off I want to say a very big thanks to Tim for a simply fantastic product. It is fast, functional and very actively supported. Above all it is open source.. superlative!

Secondly, I want to know if I buy this add on, and I host my landing pages in my own domain, will this help me to jump from the CTA button in landing page to checkout?

Hope it is not a stupid question

Thanks!
Balaji Shankar

tim
Founder
Från Sweden
Medlem sedan maj 2013
tim

Thank you so much for showing appreciation of my work. ❤️

You can change the destination URL for your cart form post where form_draw_form_begin() is drawn and set the link to document::ilink('checkout'). If you host the button in an external place outside the platform simply copy the <form> block of elements with the full URL to your store

<form name="add_to_cart_form" method="post" action="https://yoursite.com/checkout">

The HTML is found in includes/templates/default.catalog/(pages|views)/.

tim
Founder
Från Sweden
Medlem sedan maj 2013
tim

That form contains no changes. To redirect to the checkout page

Replace line 116
https://github.com/litecart/litecart/blob/2.5.1/public_html/includes/templates/default.catalog/views/box_product.inc.php#L116

With this
<?php echo functions::form_draw_form_begin('buy_now_form', 'post', document::ilink('checkout')); ?>

From outside litecart:
<form name="add_to_cart_form" method="post" action="https://yoursite.com/checkout">
  <input name="product_id" value="1" />
  <input name="quantity" value="1" />
  <button type="submit" name="add_cart_product">Buy</button>
</form>

Du
Denna webbplats använder inga kakor och ingen spårningsteknik från tredje part . Vi tror att vi kan göra det bättre än andra och tänker verkligen på din integritet.