OpenCart में Asyntai AI चैटबॉट कैसे जोड़ें
OpenCart वेबसाइटों के लिए चरण-दर-चरण मार्गदर्शिका
The Easy Way: Install the Asyntai Extension
We publish a free extension on the OpenCart Marketplace. It puts the chatbot on your storefront and connects your account, and there is no code to copy and no template to edit. It works on OpenCart 3.x and 4.x.
- Download Asyntai - AI Chatbot from the OpenCart Marketplace
- In your admin panel, go to Extensions → Installer and upload the ZIP file
- Go to Extensions → Extensions, choose Modules in the list, find Asyntai AI Chatbot and press the green install button
- Press edit, then press Connect to Asyntai. A window opens where you sign in or create an account.
That is all. The chatbot is live on your storefront when the window closes.
Your products, prices and stock
When you connect, the extension also lets Asyntai read your catalogue. Your assistant then answers with the price you charge today and tells shoppers what is in stock, instead of repeating whatever your pages said when they were last read.
Asyntai reads your products through a read-only address on your own store. Every request is signed, and the reply carries the prices a shopper would actually pay, with your tax rules already applied. You can switch this off at any time on the extension's settings screen.
Updating from version 1.0.0? OpenCart clears a module's settings when you uninstall it, so press Connect to Asyntai once after the update. From this version on, updates keep your connection.
Or Add the Code Yourself
Prefer not to install an extension? The rest of this page shows how to add the chatbot by hand. You will not get the catalogue reading this way.
चरण 1: अपना एम्बेड कोड प्राप्त करें
First, go to your Asyntai Dashboard and scroll down to the "Embed Code" section. Copy your unique embed code which will look like this:
<script>(function(){var l=function(){var s=document.createElement("script");s.src="https://widget.asyntai.com/static/js/chat-widget.js";s.async=true;s.setAttribute("data-asyntai-id","YOUR_WIDGET_ID");document.head.appendChild(s)};if(document.readyState==="complete"){l()}else{window.addEventListener("load",l)}})();</script>
नोट: ऊपर दिया गया कोड केवल एक उदाहरण है। आपको अपने डैशबोर्ड से अपना अद्वितीय एम्बेड कोड कॉपी करना होगा क्योंकि इसमें आपकी व्यक्तिगत विजेट ID होती है।
Step 2: Edit Footer Template
चैटबॉट जोड़ने का सबसे सरल तरीका आपकी थीम के फुटर टेम्पलेट को संपादित करना है:
- FTP या फ़ाइल मैनेजर के माध्यम से अपनी OpenCart फ़ाइलों तक पहुँचें
- अपनी थीम के फुटर टेम्पलेट पर नेविगेट करें:
- OpenCart 3.x/4.x:
catalog/view/theme/YOUR_THEME/template/common/footer.twig - OpenCart 2.x:
catalog/view/theme/YOUR_THEME/template/common/footer.tpl
- OpenCart 3.x/4.x:
- संपादन के लिए फुटर फ़ाइल खोलें
- क्लोज़िंग
</body>टैग खोजें </body>टैग से ठीक पहले अपना Asyntai एम्बेड कोड पेस्ट करें- फ़ाइल सहेजें
- OpenCart कैश साफ़ करें: Dashboard → Blue gear icon (top right) → Refresh या
system/storage/cache/की सामग्री हटा दें
सुझाव: यदि आप डिफॉल्ट थीम का उपयोग कर रहे हैं, तो पाथ catalog/view/theme/default/template/common/footer.twig होगा। टेम्पलेट फ़ाइलों को संपादित करने से पहले हमेशा एक बैकअप बनाएं।
वैकल्पिक: थीम का कस्टम कोड विकल्प उपयोग करें
कई आधुनिक OpenCart थीम में कस्टम कोड के लिए एक इन-बिल्ट विकल्प शामिल होता है:
- अपने OpenCart एडमिन पैनल में लॉग इन करें
- Extensions → Themes (या Extensions → Extensions → Themes) पर जाएं
- अपनी सक्रिय थीम पर संपादित करें क्लिक करें
- \"Custom Code\", \"Footer Scripts\", या \"Custom JavaScript\" सेक्शन देखें
- अपना Asyntai एम्बेड कोड पेस्ट करें
- "सहेजें" पर क्लिक करें
- कैश साफ़ करें
नोट: सभी थीम में यह विकल्प नहीं होता है। यदि आपकी थीम में कस्टम कोड फ़ील्ड शामिल नहीं हैं, तो टेम्पलेट संपादन विधि का उपयोग करें या एक एक्सटेंशन इंस्टॉल करें।
वैकल्पिक: कस्टम कोड एक्सटेंशन का उपयोग
कस्टम स्क्रिप्ट जोड़ने के लिए आप OpenCart Marketplace से एक मुफ्त एक्सटेंशन इंस्टॉल कर सकते हैं:
- Go to the OpenCart Marketplace
- \"Custom Script\", \"Header Footer Scripts\", या \"Custom Code\" के लिए खोजें
- एक उपयुक्त एक्सटेंशन डाउनलोड और इंस्टॉल करें
- अपने एडमिन पैनल में, Extensions → Extensions → Modules पर जाएं
- कस्टम कोड मॉड्यूल खोजें और इंस्टॉल करें
- मॉड्यूल को कॉन्फ़िगर करें और अपने Asyntai एम्बेड कोड को फुटर सेक्शन में पेस्ट करें
- सहेजें और कैश साफ़ करें
महत्वपूर्ण: कोर फ़ाइलों को संपादित करने की तुलना में एक्सटेंशन का उपयोग करने की अनुशंसा की जाती है, क्योंकि वे OpenCart अपडेट के बाद भी बने रहते हैं। लोकप्रिय एक्सटेंशन में मार्केटप्लेस पर उपलब्ध \"Custom Script in Header & Footer\" शामिल है।
वैकल्पिक: addScript विधि का उपयोग (डेवलपर्स के लिए)
डेवलपर्स के लिए, OpenCart 3.x/4.x स्क्रिप्ट जोड़ने का एक प्रोग्रामेटिक तरीका प्रदान करता है:
catalog/controller/common/footer.phpखोलें- Add the following line before
$data['scripts'] = $this->document->getScripts('footer');:$this->document->addScript('https://asyntai.com/static/js/chat-widget.js', 'footer'); - डेटा एट्रिब्यूट के लिए, आपको इसे मैन्युअल रूप से शामिल करने के लिए footer.twig को संशोधित करना होगा, या स्क्रिप्ट लूप के बाद इनलाइन जावास्क्रिप्ट जोड़ना होगा
नोट: विजेट के डेटा एट्रिब्यूट के साथ ठीक से काम करने के लिए, टेम्पलेट विधि सरल है क्योंकि addScript विधि सीधे कस्टम एट्रिब्यूट का समर्थन नहीं करती है।
चरण 3: इंस्टॉलेशन सत्यापित करें
अपने परिवर्तनों को सहेजने और कैश साफ़ करने के बाद, एक नए ब्राउज़र टैब या इनकॉग्निटो विंडो में अपने स्टोर पर जाएं। आपको नीचे दाएं कोने में चैट विजेट बटन दिखाई देना चाहिए। यह सुनिश्चित करने के लिए इस पर क्लिक करें कि यह खुलता है और सही ढंग से काम करता है।
विजेट दिखाई नहीं दे रहा? OpenCart के कैश को साफ़ करना सुनिश्चित करें। अपने एडमिन पैनल पर जाएं, ऊपर दाएं कोने में नीले गियर आइकन पर क्लिक करें और रिफ्रेश बटन पर क्लिक करें। अपने ब्राउज़र कैश को साफ़ करने या इनकॉग्निटो विंडो में देखने का भी प्रयास करें। यदि आपने गलत टेम्पलेट फ़ाइल को संशोधित किया है, तो जांचें कि आपकी थीम उस फ़ाइल का उपयोग कर रही है जिसे आपने संपादित किया है।
Weebly