Skip to content

Instantly share code, notes, and snippets.

@makfruit
makfruit / amazon_requests_examples.txt
Last active February 5, 2022 00:15
Amazon MWS requests examples
REQUEST #1
POST /Products/2011-10-01?AWSAccessKeyId=<removed>
&Action=ListMatchingProducts
&SellerId=<removed>
&MWSAuthToken=<removed>
&SignatureVersion=2
&Timestamp=2019-05-27T09%3A20%3A51Z
&Version=2011-10-01
&Signature=<removed>
@makfruit
makfruit / product_filters_response.js
Last active October 23, 2018 07:03
Sample response from Ecwid Product Filters API
{
"filters": {
"attribute_Brand": {
"values": [
{
"title":"Toyota",
"productCount": 10
},
{
@makfruit
makfruit / preload.html
Last active February 28, 2018 09:51
Preconnect/Prefetch/Preload Ecwid resources
<link href="https://d201eyh6wia12q.cloudfront.net" rel="preconnect" crossorigin />
<link href="https://d3fi9i0jj23cau.cloudfront.net" rel="preconnect" crossorigin />
<link href="https://dqzrr9k4bjpzk.cloudfront.net" rel="preconnect" crossorigin />
<link href="https://ecwid-static-ru.gcdn.co" rel="preconnect" crossorigin />
<link href="https://ecwid-images-ru.gcdn.co" rel="preconnect" crossorigin />
<link href="https://app.multiscreenstore.com" rel="preconnect" crossorigin />
<link rel="prefetch" href="https://app.multiscreenstore.com/script.js?<storeid>" />
<link rel="prerender" href="<store page address>" />
// Выбор даты самовывоза, несколько пунктов самовывоза
ec.order.extra_fields.ecwid_pickup_time = {
'key': 'ecwid_pickup_time', // Ключ поля в базе.
'title': '_msg_schedule_pickup_time',
'required': true,
'type': 'date',
'checkout_display_section': 'pickup_customer_info',
'datepicker_options': {
'limit_maximum_date_interval_days': 14,
'show_time': true, // Показывать ли селектор времени
ec.order = ec.order || {};
ec.order.extraFields = ec.order.extraFields || {};
// A text input that asks a buyer how to sign the package
ec.order.extraFields.wrapping_box_signature = {
'title': 'How should we sign the package?',
'textPlaceholder': 'Package sign',
'type': 'text',
'tip': 'We will put a label on a box so the recipient knows who it is from',
'required': false,
@makfruit
makfruit / ecwid_clean_urls_setup_examples.md
Last active December 14, 2022 12:20
Setting up SEO friendly clean URLs in Ecwid (Examples)

Setting up SEO friendly clean URLs in Ecwid (Examples)

This is a followup on the Ecwid blog post about the new SEO friendly clean URLs available for Ecwid stores. If you have your Ecwid store installed on a platform or sitebuilder including Wordpress, Wix, Adobe Muse or Ecwid Starter Site, you should have the clean URLs enabled automatically (see the blog post for the details). On the other hand, if you run a custom made web site, you will need to adjust your site setup a bit to enable the clean URLs as explained in the Ecwid API docs.

Below are examples of clean URLs setup on custom made websites.

@makfruit
makfruit / ecwid_expand_wholesale_prices_by_default.html
Last active February 7, 2017 07:38
An HTML/JS snippet for Ecwid to display wholesale pricing block (bulk pricing) explanded by default on the product detail pages
<!--
An HTML/JS snippet for Ecwid to display wholesale pricing block (bulk pricing) explanded by default on the product detail pages
Put this code after Ecwid integration code on your site
-->
<script src="https://code.jquery.com/jquery-1.11.3.js"></script>
<script type="text/javascript">
Ecwid.OnPageLoaded.add(function(page){
if (page.type == "PRODUCT") {
setTimeout(
function () {
@makfruit
makfruit / ecwid_move_cat_descr_and_subcats_below_products.html
Created April 8, 2015 18:33
An HTML/JS snippet for Ecwid to move category description and subcategories under the subcategories/products listing
<!--
An HTML/JS snippet for Ecwid to move category description and subcategories under the subcategories/products listing
https://gist.github.com/makfruit/8f55e57945de9089a014
Put this code after Ecwid integration code on your site
-->
<script src="//code.jquery.com/jquery.min.js"></script>
<script>
Ecwid.OnPageLoaded.add(function(page) {
if (page.type == 'CATEGORY') {
@makfruit
makfruit / ecwid_add_product.js
Last active August 29, 2015 14:05 — forked from genee19/new_gist_file
A simple JS snippet to add product to the cart using Ecwid Javascript API
var product = {
id: 10,
quantity: 3,
options: {
someTextOption: "optionVal",
someDateOption: new Date().getTime().toString(),
someRadioOption: "optionVal",
someDropDownOption: "optionVal",
someCheckboxOption: ["optionVal1", "optionVal2"]
},
@makfruit
makfruit / ecwid_move_cat_descr_below_products.html
Last active February 29, 2016 18:16
An HTML/JS snippet for Ecwid to move category description under the subcategories/products listing
<!--
An HTML/JS snippet for Ecwid to move category description under the subcategories/products listing
https://gist.github.com/makfruit/11148226
Put this code after Ecwid integration code on your site
-->
<script src="//code.jquery.com/jquery.min.js"></script>
<script>
Ecwid.OnPageLoaded.add(function(page) {
if (page.type == 'CATEGORY') {