Socket
Book a DemoInstallSign in
Socket

@plasma-platform/live-chat

Package Overview
Dependencies
Maintainers
8
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@plasma-platform/live-chat

Scripts for live chat

latest
npmnpm
Version
1.0.3-alpha.1
Version published
Maintainers
8
Created
Source

version nextVersion downloads license dependency

Full documentation
install:
npm i @plasma-platform/cart -S

Short documentation

Table of Contents

rateLiveChat

RateForm Live Chat

Parameters

  • $0 Object
    • $0.rate (optional, default 'none')
    • $0.comment (optional, default '')
  • rate string user rate ('none' | 'good' | 'bad')
  • comment string user comment

getProductsByIds

Get product in the user cart

Parameters

  • $0 Object
    • $0.templateIds
    • $0.locale (optional, default 'en')
  • templateIds array id templates
  • locale string current locale

Returns array

loadPage

On the load page show avatar and tooltip

buttonAvatar

Get ref of avatar button

Parameters

  • refButton

toggleWindow

Toggle chat window

handleChatWindowBlur

Close chat window on click outside

Parameters

  • event

Main

Start

  • npm i @plasma-platform/live-chat
  • import { LiveChatReducer, setLiveChatConfig } from '@plasma-platform/live-chat';
  • connect cartReducer in your redusers (liveChat: LiveChatReducer)
  • call setCartConfig({...}) in your project
  • import and use: Actions: toggleWidget - open liveChat window; Components: LiveChat - <LiveChat {...props} />

setLiveChatConfig

set init config for cart actions

Parameters

Examples

setCartConfig({
storefrontURL: '//www.templatemonsterdev.com/',
cookiesRoot: '.templatemonsterdev.com',
consulURL: '//api.templatemonsterdev.com/',
ticketSystem: '//support.template-help.com/index.php',
services: {
products: '//api.templatemonsterdev.com/products/v2/',
orders: '//api.templatemonsterdev.com/orders/v2/',
locales: '//api.templatemonsterdev.com/locales/v1/',
users: '//api.templatemonsterdev.com/users/v1/',
vendors: '//api.templatemonsterdev.com/authors/v1/',
chat: '//chat.templatemonsterdev.com/api/',
tickets: '//api.templatemonsterdev.com/tickets/v1/',
},
iconsUrl: '/plasmaIcons.svg',
defaultTabChat: 3,
liveChatLicense: 10307407,
liveChatMotoLicense: 10255897,
});

customInternalVendors

customInternalVendors = { Zemez: 831, Zemezjet: 2406, WT: 927, RockThemes: 2036, };

customInternalProducts

WordPress: { wpThemes: 50125, wpPlugins: 211308, woocommerceThemes: 61529, drupalTemplate: 50127, jigoshopThemes: 50119, } eCommerce: { magentoThemes: 50115, openCartTemplates: 50122, prestaShopThemes: 50116, osCommerceTemplates: 50120, zenCartTemplates: 50121, shopifyThemes: 67280, prestaShopModules: 211307, } HTML: { websiteTemplates: 50108, joomlaTemplates: 50126, virtueMartTemplates: 50118, afterEffectsIntros: 50146, afterEffectsLogoReveals: 50147, flashTemplates: 50109, landingPageTemplates: 168633, bundles: 666573, }

Keywords

live-chat

FAQs

Package last updated on 09 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts