Behavioral configs
Some store configuration settings allow you to change how Ecwid works on the website. These settings are useful when you integrate Ecwid storefront to a custom-built website.
Redirect after purchase
Use this config to redirect customers to a custom URL instead of the default "Thank you for purchase" page after a successful online payment.
Code example:
This method only works for online payment methods. If an order is paid with an offline payment method, customers won't be redirected to a specified URL.
Custom scroll behavior
This method allows you to set up a custom scroll position, disable auto-scroll, and create custom scroll behavior on your website. Check out the code examples below.
Set up a custom scroll position in px from page top:
Disable auto-scroll on the page:
Apply custom scroll behavior:
Set main store URL for widgets
This method is useful when you have a custom website with Ecwid storefront widgets on different pages. By default, these pages have independent carts, which is not convenient for customers.
Set one base URL for Ecwid widgets across all "secondary" pages on your website. As a result, all widgets will point to the checkout on the main store page.
Code example:
Use case examples:
Create a one /store page and several pages showcasing specific products.
Integrate different categories from your store onto different website pages.
Set storefront language for search engine crawlers
Ecwid allows several translations for the same page, which helps with creating multilanguage websites.
However, search engines could get distracted by similar-looking pages. To help them index your website better, use our configs for automatic generation of the hreflang
meta tags.
Force auto-generation of meta tags for the storefront by adding theenableHreflangTags
and internationalPages
configs.
enableHreflangTags
enables generation of thehreflang
meta tag.internationalPages
sets URLs for storefront translations. Google Search Engine recommendations on 'locale' values.
Config example:
Last updated
Was this helpful?