php - Opencart: Adding Buy Now Button in Opencart Product Page -


I'm adding a Buy Now button to the opencart product page (also add to cart) < P> Edit me first to list / view / topic / mytheme / template / product / product.tpl (Buy Now button in product page)

  ; '; Echo ""; Echo '& lt; Input type = "button" value = "buy now" id = "button-cart-buy" category = "button-product-page" />; '; } Else {echo & lt; Input type = "button" value = "out of stock" category = "button-product-page" /> '; }? & Gt;   

And after that, in product.tpl, I created a new function (button-cart-buy) Buy Now Button is similar to Cart Function, but I for Jason ['Success'] Buy now as below:

  if (json ['success']) {window.location =' index.php? Route = checkout / checkout '; }   

When we work with the link as click on Buy Now () on the product page, but if it does not work, then we can browse products from categories Then click on Buy Now Ie then I am getting the URL but this product is being added to the cart.

This issue is mainly in IE and sometimes it is also in Mozilla.

I also tried copying the addoCart function in add.Cs. But still is not working.

Am I missing something or change ..? Please

A word for thanks for Gilford:

Thank you for your response.

This answer helps solve 5-6 OpenCart forums on Open Threads.

This is because you are not using a full URL path. If you have found this JavaScript then you can use it only

  {json ['success']) {window.location =' & lt; Php} & gt; url-> Link ('checkout / checkout', '', 'SSL'); ? & Gt; '; }    

Comments

Popular posts from this blog

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -