# vaimo/module-custobar

> Custobar magento connector

`composer require vaimo/module-custobar`

Canonical URL: https://packagento.com/vaimo/module-custobar

## At a glance

- **Vendor**: Vaimo (https://packagento.com/vaimo.md)
- **Latest version**: 2.1.1 — released 2022-12-14
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/vaimo/module-custobar and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require vaimo/module-custobar:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Custobar magento connector

## README

Custobar_CustoConnector
=========

CustoConnector is used to send usage statistics from the Magento installation to the Custobar API

### Release Information

*CustoConnector for M2*

### System Requirements

* PHP 7, 8.1
* Magento 2

NOTE: Module requires that the Magento [cron](http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-cron.html) is correctly configured and running 

### Installation

Add a `repositories` object to the `composer.json`
 
         "repositories": [
            {
                "type": "git",
                "url": "https://github.com/Custobar/magento2-plugin"
            }
         ]


Add requirement `custobar/custobar_m2_custoconnector`

        {
            "require": {
                "custobar/custobar_m2_custoconnector": "dev-master"
            }
        }
        
Run `php bin/magento module:enable Custobar_CustoConnector` and `php bin/magento setup:upgrade`            

#### After installing 

Go to `Stores / Settings / Configuration / Custobar / CustoConnector / Configuration` to setup the module.

Input the supplied `Client identifier` and `Api key`. 

At least one `Allowed websites to send data from` needs to be selected. 

You can also add the `Custobar tracking script` what can be generated at `https://clientidentifier.custobar.com/tracking-script/`.

Copy and paste the code *without* the following lines:

```js
// remove these
cstbrConfig.productId = 'place_product_id_here';
cstbrConfig.customerId = 'place_customer_id_here';
```
Remember to flush Magento's caches after changing the values. 

Go to `System / Custobar / Custobar Status` to view the status or start an initial scheduling.

Magento crons run above the /pub folder so If you are running Magento frontend from the pub folder and get media urls with "pub" and they can't be accessed then update settings:
 
- Under Stores / Settings / Configuration / General / Web / Base Urls and Base Urls (Secure):

  Change the `Base URL for User Media Files` to: 
 
  `{{unsecure_base_url}}media/`
  
  Change the `Secure Base URL for User Media Files` to: 
  
  `{{secure_base_url}}media/`


### Update notices

#### 2.1.1:
- Add compatibility with Magento 2.4.5 & PHP 8.1

#### 2.1.0:
- Fixed issue where entities that were restricted to certain websites still got scheduled for export
for all websites
- Added possibility to specify field mappings per store view in admin
- Added possibility to automatically add domain on field mappings
- Fixed issue where applying/expiring special prices would not automatically cause product to be scheduled
for export 

#### 2.0.0:
- Module refactored to better follow Magento standards and improve general code quality
- Admin view for logs added
- Tracked models admin config removed and replaced with a more straightforward solution

#### 1.1.1:

- fixes null product issue
- remove urls for product that aren't visible by them self as magento gives a non nice url for them

#### 1.1.0: 

- Maps select/dropdown attribute labels to Custobar correctly

  Example `manufacturer>brand` 
  
- New fields for Magento\Catalog\Model\Product>products 

  custobar_child_ids>mage_child_ids and custobar_parent_ids>mage_parent_ids
  
  Update tracked models with (remember to keep your own modifications)
  
  ```
  Magento\Catalog\Model\Product>products:
    name>title;
    sku>external_id;
    custobar_minimal_price>minimal_price;
    custobar_price>price;
    type_id>mage_type;
    configurable_min_price>my_configurable_min_price;
    custobar_attribute_set_name>type;
    custobar_category>category;
    custobar_category_id>category_id;
    custobar_image>image;
    custobar_product_url>url;
    custobar_special_price>sale_price;
    description>description;
    custobar_language>language;
    custobar_store_id>store_id;
    custobar_child_ids>mage_child_ids;
    custobar_parent_ids>mage_parent_ids,
   Magento\Customer\Model\Customer>customers:
    firstname>first_name;
    lastname>last_name;
    id>external_id;
    email>email;
    custobar_telephone>phone_number;
    custobar_street>street_address;
    custobar_city>city;
    custobar_postcode>zip_code;
    custobar_country_id>country;
    custobar_created_at>date_joined;
    store_id>store_id,
   Magento\Customer\Model\Address>*Magento\Customer\Model\Customer:
    customer_id>id,
   Magento\Sales\Model\Order>sales:
    custobar_state>sale_state;
    increment_id>sale_external_id;
    customer_id>sale_customer_id;
    custobar_created_at>sale_date;
    customer_email>sale_email;
    store_id>sale_shop_id;
    custobar_discount>sale_discount;
    custobar_grand_total>sale_total;
    custobar_payment_method>sale_payment_method;
    custobar_order_items>magento__items,
   Magento\Newsletter\Model\Subscriber>events:
    subscriber_email>email;
    customer_id>customer_id;
    custobar_status>type;
    custobar_date>date;
    store_id>store_id
   ```

## Recent Versions

| Version | Released |
|---|---|
| 2.1.1 | 2022-12-14 |
| 2.1.0 | 2022-01-18 |
| 2.0.0 | 2021-04-16 |

## Dependencies

### Require

| Package | Constraint |
|---|---|
| magento/framework | >=100.0.0 |

## Quality

Latest release (2.1.1) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | 1 | – |
| 2.4.9 | – | – | 1 | 1 |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Fail | 102 | 8 errors, 94 warnings (ruleset: Magento2) — 25 auto-fixable with phpcbf |
| PHPMD | Warning | 6 | 6 rule violations (TooManyPublicMethods:3, UnusedLocalVariable:1, UnusedFormalParameter:1, ExcessiveMethodLength:1) |
| Cpd | Pass | 0 |  |
| Composer validate | Info | 2 | valid; 2 advisory notes (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 121 | 121 | – | – |
| 2.4.8 | – | 121 | 135 | – |
| 2.4.9 | – | – | 135 | 135 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Error | Error | – | – |
| 2.4.8 | – | Error | Error | – |
| 2.4.9 | – | – | Error | Error |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["vaimo/module-custobar"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

Vaimo is a Magento 2 vendor on Packagento. See https://packagento.com/vaimo.md for their full catalogue.

