1.0.3-alpha.1 • Published 4 years ago

@plasma-platform/live-chat v1.0.3-alpha.1

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
4 years ago

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

1) npm i @plasma-platform/live-chat 2) import { LiveChatReducer, setLiveChatConfig } from '@plasma-platform/live-chat'; 3) connect cartReducer in your redusers (liveChat: LiveChatReducer) 4) call setCartConfig({...}) in your project 5) 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, }

1.0.3-alpha.1

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.2.5-alpha.2

4 years ago

0.2.6-next.0

4 years ago

0.2.5-alpha.0

4 years ago

0.2.5-next.0

4 years ago

0.2.1-next.1

4 years ago

0.2.1-next.0

4 years ago

0.2.1

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.4

4 years ago

0.0.19-next.0

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago

0.0.18-next.0

4 years ago

0.0.17-next.0

4 years ago

0.1.0

4 years ago

0.0.17-next.3

4 years ago

0.0.17-next.2

4 years ago

0.0.16

4 years ago

0.0.16-next.1

4 years ago

0.0.15

4 years ago

0.0.14

4 years ago

0.0.12

4 years ago

0.0.13

4 years ago

0.0.10

4 years ago

0.0.11

4 years ago

0.0.8-next.6

4 years ago

0.0.8-next.5

4 years ago

0.0.8-next.4

4 years ago

0.0.8-next.3

4 years ago

0.0.8-next.2

4 years ago

0.0.8-next.1

4 years ago

0.0.7-next.11

4 years ago

0.0.7

4 years ago

0.0.7-next.9

4 years ago

0.0.7-next.10

4 years ago

0.0.7-next.8

4 years ago

0.0.7-next.7

4 years ago

0.0.7-next.6

4 years ago

0.0.7-next.5

4 years ago

0.0.7-next.4

4 years ago

0.0.7-next.3

4 years ago

0.0.7-next.2

4 years ago

0.0.7-next.1

4 years ago

0.0.7-next.0

4 years ago

0.0.6-next.0

4 years ago

0.0.5-next.0

4 years ago

0.0.4-next.0

4 years ago

0.0.2-next-2

4 years ago

0.0.2-next-1

4 years ago

0.0.3-next.0

4 years ago

0.0.2

4 years ago