Code Monkey home page Code Monkey logo

belco-magento2's Introduction

Belco extension for Magento 2

Installation

composer require forwarder/belco-magento2
php bin/magento setup:upgrade
php bin/magento setup:di:compile

If composer throws an error, run this command

composer config repositories.belco git https://github.com/forwarder/belco-magento2.git

or add this to your composer.json file manually

    "repositories": [
        "belco": {     
            "url":"https://github.com/forwarder/belco-magento2.git",
            "type": "git"
        }
    ]

Configuration

After installing do the following procedure:

  1. Go to the admin panel
  2. Navigate to Stores > Configuration.
  3. Navigate to Belco > Settings.
  4. Fill in the Shop id and API Secret and save.

Shop id and API Secret can be found within the belco app. Under: Settings > API keys

belco-magento2's People

Contributors

edwinkruis058 avatar imichaelv avatar pagebakers avatar peterjaap avatar smentink avatar wouter-toppy avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

belco-magento2's Issues

Curl error: Peer's Certificate issuer is not recognized.

Hi,

There appears to be a problem with the cabundle.crt certificate when connecting to https://api.belco.io/ with CURL through the Api class.

The Curl Error occurs here:
vendor/forwarder/belco-magento2/Model/Api.php:208 Belco\Widget\Model\Api::post
vendor/forwarder/belco-magento2/Model/Api.php:127 Belco\Widget\Model\Api::trackEvent
vendor/forwarder/belco-magento2/Model/Api.php:115 Belco\Widget\Model\Api::trackOrder
vendor/forwarder/belco-magento2/Observer/OrderPlacedHook.php:44 Belco\Widget\Observer\OrderPlacedHook::execute

This started occurring on December 21st and still occurs now for every order placed.

Module version: 0.3.2
Magento 2 version: 2.3.2
PHP version: 7.2

PHP 8.1 compatibility

We want to upgrade one of our clients' site to Magento 2.4.4 / PHP 8.1 but this extension isn't compatible with PHP 8.1, according to the composer.json.

However, the PHPCompatibility code sniffer says all is fine for PHP 8.1 so I guess it's just a question of updating the PHP constraint.

vendor/bin/phpcs -p belco-magento2 --standard=vendor/phpcompatibility/php-compatibility/PHPCompatibility --runtime-set testVersion 8.1
........... 11 / 11 (100%)


Time: 395ms; Memory: 12MB

Fire Event when Belco is ready

In some cases we want to know when the belco widget is ready so we can do something with it. (hide it for a cookie message as an example)

right now on the initial page load (DOMhtml) there is no belco element or something, so its not possible to check for that element.

fire an event when belco is ready will allow you to listen on that event and do something because you know there is an <div id="belco-container"></div> element.

Belco.once('ready', function() {
    document.dispatchEvent(new Event('Belco_Ready'));
})

You will be able to listen to the event with:

document.addEventListener(
    'Belco_Ready',
    function (e) {
        // $('#belco-container') is available
    },
    false
);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.