@plasma-platform/live-chat v1.0.3-alpha.1
Full documentation
install:npm i @plasma-platform/cart -S
Short documentation
Table of Contents
- rateLiveChat
- getProductsByIds
- loadPage
- buttonAvatar
- toggleWindow
- handleChatWindowBlur
- Main
- customInternalVendors
- customInternalProducts
rateLiveChat
RateForm Live Chat
Parameters
$0Object$0.rate(optional, default'none')$0.comment(optional, default'')
ratestring user rate ('none' | 'good' | 'bad')commentstring user comment
getProductsByIds
Get product in the user cart
Parameters
$0Object$0.templateIds$0.locale(optional, default'en')
templateIdsarray id templateslocalestring 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
paramsObject services URLs
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, }
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago