Giter VIP home page Giter VIP logo

ras-idosell-plugin's Introduction

Ras

This project contains javascript for IdoSell widget.

Reqs

Node: v20.8.1 (https://nodejs.org/dist/v20.8.1/docs/api/) Yarn: v1.22.19

Scripts

yarn build - builds minified js (code is bundled to dist/bundle.js file)
yarn eslint - checks for eslint errors

Config

Key Type Description
tagLabel string Text for sponsored tag in product card
productsListing object Configuration object for product listing
isLoaderVisible boolean Define whether the loader should be displayed
pageDetails object Configuration object for product details page
mainPage object Configuration object for main page
basketPage object Configuration object for basket page

Configuration object for product listing, products details, main page and basket page

Key Type Description
isEnabled boolean Specifies whether the product should be visible
zone string Specify zone where product should appear. See available zones below
productsCount object Specifies the number of products injected into the list

Zones

Listing Zones
productsListing PRODUCT_LISTING, PRODUCT_LISTING_HOTSPOT
pageDetails PRODUCT_DETAILS_ASSOCIATED_ONE, PRODUCT_DETAILS_ASSOCIATED_TWO, PRODUCT_DETAILS_ASSOCIATED_THREE, PRODUCT_DETAILS_ASSOCIATED_FOUR
mainPage MAIN_PAGE_HOTSPOT_ONE, MAIN_PAGE_HOTSPOT_TWO, MAIN_PAGE_HOTSPOT_THREE, MAIN_PAGE_HOTSPOT_FOUR
basketPage BASKET_PAGE_HOTSPOT

Example Config

The configuration object should be assigned to the sponsoredProductConfig key in the window object before the script initialization.

window.sponsoredProductConfig = {
  tagLabel: 'SPONSORED',
  isLoaderVisible: true,

  productsListing: {
    zone: 'PRODUCT_LISTING_HOTSPOT',
    isEnabled: true,
    productsCount: 2,
  },
  pageDetails: {
    isEnabled: true,
    zone: 'PRODUCT_DETAILS_ASSOCIATED_ONE',
    productsCount: 5,
  },
  mainPage: {
    isEnabled: true,
    zone: 'MAIN_PAGE_HOTSPOT_FOUR',
    productsCount: 2,
  },
  basketPage: {
    isEnabled: true,
    zone: 'BASKET_PAGE_HOTSPOT',
    productsCount: 2,
  },
};

ras-idosell-plugin's People

Contributors

przemyslawczachor-fingoweb avatar skoklowski avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.