One product on a page ("Buy Now" button)

Last updated

If you're selling one or only a few items, you can insert them alone without embedding the whole catalog. Ecwid offers two ways to implement it. In both cases, you will still have all features to place orders online: tax and shipping calculation, payment methods, checkout pages, etc.

Embed HTML product code

Every product in Ecwid has its own HTML code that you can insert on your site. Check out your Ecwid control panel → Catalog → Products → product page → tab "Buy Now button". When you insert this code to any page, the following product information appears: 
  • thumbnail
  • title
  • price
  • options
  • quantity
  • the "Add to cart" button

Ecwid_Control_Panel_2017-11-17_21-10-01.png
HTML code of a single product is a recommended way if you want to design your own product page with description, pictures, etc. That's why this code has only few elements which are most necessary. It's assumed that you add all the other elements yourself.

 
So the instruction is as follows:
  • Create a new page on your site.
  • Insert an HTML code of the necessary product to it. Add a description. When your customers visit this page, they will be able to purchase a product from it.

  We have a technical name for this feature - single product widget.

Open the product page right away

It is possible to open your store page with a certain product – this will work great if you have one product, or you want to draw your customers' attention to this particular item. To achieve this use a slightly modified product browser code – you need to add the following option to it:

 

defaultProductId=%productId%

 

where PRODUCT_ID is the id of your product (you can get it from the address bar of your browser).
 
Here is an example, this code will open Caffeine Molecule product page in our demo store:

<div> <script type='text/javascript' src='https://app.ecwid.com/script.js?1003'></script> <script type='text/javascript'>  xProductBrowser("categoriesPerRow=3","views=grid(3,3) list(10) table(20)","categoryView=grid","searchView=list","style=","defaultProductId=4007"); </script> </div>
Was this article helpful?
54 out of 71 found this helpful
Questions?
Get help
  • Forums

    Join the Ecwid community. Discuss support topics and store ideas with other Ecwid users.

  • Contact us

    Still have questions about Ecwid? Let us know! We will be glad to help you with your Ecwid store.

  • Status Monitor

    Get real time status updates on Ecwid services here, 24/7