### Upgrade Adobe Commerce Setup Source: https://support.yotpo.com/docs/adobe-commerce-2-installing-yotpo-reviews-extension-245-330 Run this command to upgrade the Adobe Commerce setup after installing or updating modules. ```shell php bin/magento setup:upgrade ``` -------------------------------- ### Yotpo Reviews Widget Example Source: https://support.yotpo.com/docs/generic-other-platforms-installing-yotpo-reviews-v1 An example of the Reviews Widget code after replacing placeholder data with actual product information. ```html
``` -------------------------------- ### Construct Token for Verification (Ruby Example) Source: https://support.yotpo.com/docs/implementing-a-free-products-module-on-a-custom-or-generic-platform This example demonstrates how to construct the SHA256 hash for token authentication. Ensure the `message` object includes all required parameters and that the API key is kept secret. ```ruby message = { guid: 'Vgac_4JUiNaTECxpLCt3zg', api_key: '35wqrYQDbvkOfasK17HxMQtt', cart_id: 123456, variant_id: 222, customer_email: 'example@gmail.com', point_redemption_id: 243 } digest = OpenSSL::Digest.new('sha256') OpenSSL::HMAC.hexdigest(digest, '35wqrYQDbvkOfasK17HxMQtt', message.to_json) ``` -------------------------------- ### Install Yotpo Reviews Extension with Composer Source: https://support.yotpo.com/docs/adobe-commerce-2-installing-yotpo-reviews-extension-400 Run these commands in your Adobe Commerce 2 installation directory to install the Yotpo combined module. Ensure you run them sequentially. ```shell composer require yotpo/module-yotpo-combined --no-update composer update 'yotpo/*' php bin/magento maintenance:enable php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy php bin/magento maintenance:disable php bin/magento cache:flush ``` -------------------------------- ### Web Pixel Installation Source: https://support.yotpo.com/docs/generic-yotpo-sms-email-web-pixel-installation-guide Place this HTML script tag within your `` to install the Yotpo SMS & Email web pixel. ```APIDOC ## Installation To install the web pixel, place the following HTML script tag within your ``: ```html ``` ``` -------------------------------- ### Create Redemption API Call Example Source: https://support.yotpo.com/docs/implementing-redemptions-via-api This is an example of an API call to create a redemption. It includes details like coupon code, discount amount, currency, and customer email. Ensure 'delay_point_deduction' is set to true if you want points deducted later. ```json { "coupon_code": "YW74IFB8", "discount_amount": 10, "discount_amount_cents": 1000, "currency": "USD", "customer_email": "test@yotpo.com" } ``` -------------------------------- ### Install Yotpo SMS & Email Web Pixel Source: https://support.yotpo.com/docs/generic-yotpo-sms-email-web-pixel-installation-guide Place this script tag within your `` section to install the web pixel. ```html ``` -------------------------------- ### Enable Maintenance Mode Source: https://support.yotpo.com/docs/adobe-commerce-2-installing-yotpo-reviews-extension-245-330 Before running setup commands, enable maintenance mode to prevent errors during the upgrade process. ```shell php bin/magento maintenance:enable ``` -------------------------------- ### Compliant Double Opt-in Sign-up Process Example Source: https://support.yotpo.com/docs/sms-double-opt-insms-double-opt-in-information-for-us-shoppers Illustrates a compliant double opt-in process, showing the initial confirmation request and the subsequent welcome message. ```text Message #1: {SiteName}: Reply Y to confirm your subscription to recurring automated marketing msgs & cart reminders. Msg & data rates may apply. (Customer replies with “Y” (Yes)) Message #2: {SiteName}: Welcome! Msg & data rates may apply. Recurring msg frequency varies. Reply HELP for help, STOP to cancel. ``` -------------------------------- ### Shopify Custom Action Earning Rule API Call Example Source: https://support.yotpo.com/docs/setting-up-custom-action-earning-rules-on-shopify This is a sample code snippet format for triggering a Custom Action earning rule via API. Replace placeholders with your specific action name, GUID, and API key. Ensure API calls are made server-side. ```javascript const url = "https://api.yotpo.com/loyalty/v1/custom_actions/CustomAction/events"; const apiKey = "x-api-key"; const guid = "guid"; fetch(url, { method: "POST", headers: { "Content-Type": "application/json", "X-Yotpo-Api-Key": apiKey, "X-Yotpo-App-Key": guid }, body: JSON.stringify({ "email": "customer@example.com", "event_properties": { "key": "value" } }) }); ``` -------------------------------- ### Install Yotpo Reviews Widget Source: https://support.yotpo.com/docs/bigcommerce-blueprint-installing-yotpo-on-blueprint Insert this code into the ProductDetails.html file to display the main Yotpo Reviews widget on product pages. If the widget doesn't appear, try adding it to ProductDescription.html instead. ```html ``` -------------------------------- ### Install Star Ratings on BigCommerce Quickview (BigCommerce Blueprint) Source: https://support.yotpo.com/docs/bigcommerce-blueprint-installing-the-yotpo-star-rating-on-blueprint Add this JavaScript and HTML to QuickViewContent.html. Remember to replace ###APP_KEY### with your actual Yotpo API Key. ```javascript ```