Xlite counterpath
Author: f | 2025-04-24
Bria Solo Free is also the renamed and updated version of XLite. Users of XLite will now have to upgrade to Bria Solo as well as provide CounterPath the details of their session
Counterpath Xlite Soft Phone and the IPitomy PBX
Is a guide explaining how to add new property to product.Basic plan to this task is:change DTO class \XLite\Model\DTO\Product\Info;change \XLite\View\FormModel\Product\Info class that renders product details form.We decorate \XLite\Model\DTO\Product\Info class, so we create the classes/XLite/Module/XCExample/ImageWidgetDemo/Model/DTO/Product/Info.php file with the following content: // vim: set ts=4 sw=4 sts=4 et:namespace XLite\Module\XCExample\ImageWidgetDemo\Model\DTO\Product;/** * Abstract widget */abstract class Info extends \XLite\Model\DTO\Product\Info implements \XLite\Base\IDecorator{ protected function init($object) { parent::init($object); $secondaryImages = $object->getSecondaryImages(); $dtoImages = [ 0 => [ 'delete' => false, 'position' => '', 'alt' => '', 'temp_id' => '', ] ]; foreach ($secondaryImages as $image) { $dtoImages[$image->getId()] = [ 'delete' => false, 'position' => '', 'alt' => '', 'temp_id' => '', ]; } $this->default->secondary_images = $dtoImages; } public function populateTo($object, $rawData = null) { parent::populateTo($object, $rawData); $object->processFiles('secondaryImages', $this->default->secondary_images); }}We implement two methods in this class:init() is used to populate data-transfer object (DTO) with secondary images' data;populateTo() is used to apply changes to product object based on submitted data. In this case, all needed routines for handling images are defined in processFiles() method, so we just call it with first parameter as name of our product's property (secondaryImages) and with second parameter as data submitted in the form ($this->default->secondary_images).Now we should apply changes to our product details' form. We decorate \XLite\View\FormModel\Product\Info class and create the classes/XLite/Module/XCExample/ImageWidgetDemo/View/FormModel/Product/Info.php file with the following content:// vim: set ts=4 sw=4 sts=4 et:namespace XLite\Module\XCExample\ImageWidgetDemo\View\FormModel\Product;/** * Product form model */abstract class Info extends \XLite\View\FormModel\Product\Info implements \XLite\Base\IDecorator{ protected function defineFields() { $schema = parent::defineFields(); $product = \XLite\Core\Database::getRepo('XLite\Model\Product')->find($this->getDataObject()->default->identity); $secondaryImages = []; if ($product) { $secondaryImages = $product->getSecondaryImages(); } $schema[self::SECTION_DEFAULT]['secondary_images'] = [ 'label' => static::t('Secondary Images'), 'type' => 'XLite\View\FormModel\Type\UploaderType', 'imageClass' => 'XLite\Module\XCExample\ImageWidgetDemo\Model\Image\Product\SecondaryImage', 'files' => $secondaryImages, 'multiple' => true, 'position' => 350, ]; return $schema; }}Essentially, we only have one defineFields() method here and inside it we define our 'secondary_images' field as follows:$schema[self::SECTION_DEFAULT]['secondary_images'] = [ 'label' => static::t('Secondary Images'), 'type' => 'XLite\View\FormModel\Type\UploaderType', 'imageClass' => 'XLite\Module\XCExample\ImageWidgetDemo\Model\Image\Product\SecondaryImage', 'files' => $secondaryImages, 'multiple' => true, 'position' => 350,];label of this field is 'Secondary Images';widget used for rendering this field is \XLite\View\FormModel\Type\UploaderType;this widget will work with images of \XLite\Module\XCExample\ImageWidgetDemo\Model\Image\Product\SecondaryImage class;existing secondary images are passed into 'files' parameter;this widget allows to specify multiple images for a product, not a single one ('multiple' => true).Besides that, we need to display secondary images in store-front. For that we create a template that will be shown on product details page. We createskins/customer/modules/XCExample/ImageWidgetsDemo/product/details/secondary-images.twig template with the following content: {## # @ListChild (list="product.details.page", weight="80") #} Secondary images {% for
How to setup and configure VoIP Xlite by Counterpath Very
GetSecondaryImages(){ return $this->secondaryImages;}public function addSecondaryImages($image){ $this->secondaryImages[] = $image; return $this;} Creating SecondaryImage classWe create the classes/XLite/Module/XCExample/ImageWidgetDemo/Model/Image/Product/SecondaryImage.php file with the following content: // vim: set ts=4 sw=4 sts=4 et:namespace XLite\Module\XCExample\ImageWidgetDemo\Model\Image\Product;/** * @Entity * @Table (name="product_secondary_images") */class SecondaryImage extends \XLite\Model\Base\Image{ /** * @Column (type="integer") */ protected $orderby = 0; /** * @ManyToOne (targetEntity="\XLite\Model\Product", inversedBy="secondary_images") * @JoinColumn (name="product_id", referencedColumnName="product_id") */ protected $product; /** * @Column (type="string", length=255) */ protected $alt = '';}Let us have a look at each important moment of this SecondaryImage class:The directive: means that this class defines a new entity.We define the name of the table where info about these objects will be stored: @Table (name="product_secondary_images")In our case, this table will be 'xc_product_secondary_images', assuming you have not changed table prefix in config.We create our SecondaryImage class based on standard \XLite\Model\Base\Image image class: class SecondaryImage extends \XLite\Model\Base\ImageOur image class will have three additional properties: $orderby field for sorting, $product property as a link to parent product's object and $alt field that will define a text for HTML's 'alt' property.Implementation of $orderby and $alt properties is quite straight-forwart, while $product is more complex: /** * @ManyToOne (targetEntity="\XLite\Model\Product", inversedBy="secondaryImages") * @JoinColumn (name="product_id", referencedColumnName="product_id") */We create a backward relation to \XLite\Model\Product class similar to $secondaryImages property in \XLite\Module\XCExample\ImageWidgetDemo\Model\Product class.We define $product property as @ManyToOne, because one secondary image can be assigned to one and only one product, while a product can have multiple secondary images assigned. Then we link $product property to $secondaryImages property of the \XLite\Model\Product class:@ManyToOne (targetEntity="\XLite\Model\Product", inversedBy="secondaryImages") We also specify that MySQL table, where secondary images are stored must contain the product_id column with value of parent image's ID in order to create this relation: @JoinColumn (name="product_id", referencedColumnName="product_id")Now it is time to create the repository class that will handled requests to database about SecondaryImage objects. We create the classes/XLite/Module/XCExample/ImageWidgetDemo/Model/Repo/Image/Product/SecondaryImage.php file with the following content: // vim: set ts=4 sw=4 sts=4 et:namespace XLite\Module\XCExample\ImageWidgetDemo\Model\Repo\Image\Product;class SecondaryImage extends \XLite\Model\Repo\Base\Image{ /** * Returns the name of the directory within '/images' where images are stored */ public function getStorageName() { return 'product_secondary'; }}We extend the standard \XLite\Model\Repo\Base\Image repository class and use it as a template: class SecondaryImage extends \XLite\Model\Repo\Base\ImageWe also define that secondary image files will be stored in /images/product_secondary/ directory:public function getStorageName(){ return 'product_secondary';}We are done with creating SecondaryImage entity.Tweaking design of admin and customer interfacesFirst, we need to allow merchant to upload secondary images for a product on product details page in admin area. ThereHow do I setup xlite by counterpath, netphone online
Of use: Policy: IMPORTANT VOIP OVER MOBILE/CELLULAR DATA NOTICESome mobile network operators may prohibit or restrict the use of VoIP functionality over their network and may also impose additional fees, or other charges in connection with VoIP. You agree to learn and abide by your cellular carrier's network restrictions. CounterPath Corporation will not be held liable for any charges, fees or liability imposed by your carrier for use of VoIP over Mobile/Cellular Data.Emergency CallsCounterPath's Bria mobile products provide handling designed to redirect emergency calls to the Native Cellular Dialer when possible on a best reasonable commercial efforts basis, however this functionality is also dependent on the operating system of the mobile phone which is outside of our control and subject to change at any time. As a result, the official position of CounterPath is that CounterPath’s Bria product is not intended, designed, or fit for placing, carrying or supporting Emergency Calls. CounterPath will not be liable for any costs or damages arising either directly or indirectly from the use of the software for Emergency Calls.. Bria Solo Free is also the renamed and updated version of XLite. Users of XLite will now have to upgrade to Bria Solo as well as provide CounterPath the details of their session Users of XLite will now have to upgrade to Bria Solo as well as provide CounterPath the details of their session initiation protocol or SIPFrSky announces the TWIN XLite and TWIN XLite S
IntroductionThis article describes how developers can create a new page in X-Cart. For instance, we want to create a page in admin area (admin.php?target=tony_custom) that will show some specific information. This guide explains how to achieve this task.Before get startedFirst thing to do is to create an empty module. We are creating a module with developer ID Tony and module ID PageDemo.Creating page in admin areaFor the sake of example, our task is to create the page which will be available at admin.php?target=tony_custom address and will display Hello world! text.Create new controller class. Since we want our page to be opened at admin.php?target=tony_custom, the controller class must be named TonyCustom. If you need more info about how controllers work in X-Cart, look at Controllers article.We create the classes/XLite/Module/Tony/PageDemo/Controller/Admin/TonyCustom.php file with the following content: namespace XLite\Module\Tony\PageDemo\Controller\Admin;class TonyCustom extends \XLite\Controller\Admin\AAdmin{}As you can see, it is pretty empty, but since no data should be processed from the request, we do not need any extra methods here.Create new viewer class that will manage the data output. This viewer class should sit in the classes/XLite/Module/Tony/PageDemo/View/Page/Admin/ directory and have the same as controller class. This is just an agreement and all page viewer classes follow the same principle. We are creating the classes/XLite/Module/Tony/PageDemo/View/Page/Admin/TonyCustom.php file with the following content: 5.2.x and earlier5.3.xnamespace XLite\Module\Tony\PageDemo\View\Page\Admin;/** * @ListChild (list="admin.center", zone="admin") */class TonyCustom extends \XLite\View\AView{ public static function getAllowedTargets() { return array_merge(parent::getAllowedTargets(), array('tony_custom')); } protected function getDefaultTemplate() { return 'modules/Tony/PageDemo/page/tony_custom/body.tpl'; }}As you can see this implementation has only few differences:namespace XLite\Module\Tony\PageDemo\View\Page\Customer;namespace is a bit different;/** * @ListChild (list="center") */We use this @ListChild directive in order to insert this viewer class into central area of customer area, instead of admin one;5.2.x and earlier5.3.xprotected function getDefaultTemplate(){ return 'modules/Tony/PageDemo/page/tony_custom/body.tpl';}The template for this viewer sits in other location. Aside from that, the implementation is theCounterPath Terms of Use I CounterPath
IntroductionThis article explains how to use image selection widget in X-Cart. And also, how to attach images to an entity. For the sake of example, we will create a mod that adds 'Secondary images' field to a product. Merchant will be able to assign any number of secondary images to a product and these images will be shown on product details page in customer area.ImplementationCreating an empty moduleFirst of all, we create an empty module with developer ID XCExample and module ID ImageWidgetDemo.Decorating Product classInside this module, we decorate the \XLite\Model\Product class as we want to add a new property secondaryImages to it: // vim: set ts=4 sw=4 sts=4 et:namespace XLite\Module\XCExample\ImageWidgetDemo\Model;abstract class Product extends \XLite\Model\Product implements \XLite\Base\IDecorator{ /** * @OneToMany (targetEntity="XLite\Module\XCExample\ImageWidgetDemo\Model\Image\Product\SecondaryImage", mappedBy="product", cascade={"all"}) * @OrderBy ({"orderby" = "ASC"}) */ protected $secondaryImages; public function __construct(array $data = array()) { parent::__construct($data); $this->secondaryImages = new \Doctrine\Common\Collections\ArrayCollection(); } public function getSecondaryImages() { return $this->secondaryImages; } public function addSecondaryImages($image) { $this->secondaryImages[] = $image; return $this; }}Let us have a closer look at this implementation.We add a new property to a product object: /** * @OneToMany (targetEntity="XLite\Module\XCExample\ImageWidgetDemo\Model\Image\Product\SecondaryImage", mappedBy="product", cascade={"all"}) * @OrderBy ({"orderby" = "ASC"}) */ protected $secondaryImages;We define it as OneToMany, which means that one product can have many secondary images, while a secondary image always belongs to a single product.The secondary image object is defined by the \XLite\Module\XCExample\ImageWidgetDemo\Model\Image\Product\SecondaryImage class:targetEntity="XLite\Module\XCExample\ImageWidgetDemo\Model\Image\Product\SecondaryImage"This class does not exist yet, so we will have to create it as a next step. Then, we specify that each record about SecondaryImage object must contain a reference to its product object: Learn more about mappedBy in Doctrine documentation. Also, using mappedBy directive in Product class means that we will have to use inversedBy directive in SecondaryImage class in order to create bidirectional relation. This way we will be able to access SecondaryImage object from Product object $product->getSecondaryImages() as well as access Product object from SecondaryImage object $secondaryImage->getProduct(). This cascade directive defines that SecondaryImage objects are associated with its Product object and if we remove or clone Product entity, the same will happen to SecondaryImage objects linked to it. Learn more about cascade in Doctrine documentation. The @OrderBy directive means that SecondaryImage objects will be ordered by SecondaryImage's orderby field. @OrderBy ({"orderby" = "ASC"})We also change constructor method a bit: public function __construct(array $data = array()){ parent::__construct($data); $this->secondaryImages = new \Doctrine\Common\Collections\ArrayCollection();}and tell Product class that secondaryImages property is an array.Finally, we add getter/setter methods:public functionXlite 4 For Mac - uploads.strikinglycdn.com
You can add your CSS/JS resources to your viewer class (more about this in Working with viewer classes), by creating two specific methods in this viewer class: getCSSFiles() and getJSFiles().getCSSFiles()Widget registers its CSS files via this method. During the initialization of viewer classes these CSS files are collected into the static storage.The method must return the array of the CSS file paths and because any viewer class extends \XLite\View\AView, the best practice is to merge your files with parent result. Typical implementation looks like this:public function getCSSFiles(){ return array_merge( parent::getCSSFiles(), array( 'modules///style.css', // ... ) );}You can also add the less resources alongside with the CSS ones. The LESS resources will be compiled into CSS. However, you can merge your LESS resource with another one using merge parameter. It must contain the file path to the parent LESS file, in this case the resources will be linked into one LESS file with the @import LESS instruction.Please note that right now only one parent is supported, so you cannot link the resources in LESS chain. The best practice is to merge LESS resources with bootstrap/css/bootstrap.less file.LESS examplepublic function getCSSFiles(){ return array_merge( parent::getCSSFiles(), array( array( 'file' => 'modules///style.less', 'media' => 'screen', // We use the bootstrap LESS instructions 'merge' => 'bootstrap/css/bootstrap.less', ), ), );}getJSFiles()The widget registers its JS files via this method. During the initialization of viewer classes these JS files are collected into the static storage.This method must return the array of the JS file paths and because any viewer class extends \XLite\View\AView, the best practice is to merge your files with parent result. Typical implementation looks like this:public function getJSFiles(){ return array_merge( parent::getJSFiles(), array( 'modules///script.js', // ... ) );}You should not add the widget as a list child of body view list, because it does not have its CSS and JS resources loaded that way.That happens because resources container is a child of body view list itself, and in such case your widget will be added later.Use layout.main or layout.footer view lists instead. Also, you can use another method to load your resources, which is described in the following section.Alternative way of adding JS/CSS filesThere is an alternative way to add a new JS/CSS file to the layout and it requires you to decorate \XLite\View\AView class in your module.Create View/AView.php file in your module with the following content: classes/XLite/Module///View/AView.phpnamespace XLite\Module\\\View;abstract class AView extends \XLite\View\AView implements \XLite\Base\IDecorator{ protected function getThemeFiles($adminZone = null) { $list = parent::getThemeFiles($adminZone); // example of internal JS file $list[static::RESOURCE_JS][] = 'modules///script.js'; // example of external JS file $list[static::RESOURCE_JS][] = [ 'url' => ' ]; // example of internal CSS file $list[static::RESOURCE_CSS][] = 'modules///style.css'; // example of external CSS file $list[static::RESOURCE_CSS][] = [ 'url' => ' ]; returnXlite 3.0 User Guide
Bria User Guide - iOS - for Bria Solo and Bria TeamsPublication date: 2025-02-13 Copyright ©2025 CounterPath an Alianza Company. All rights reserved. This document contains information proprietary to CounterPath, and shall not be used for engineering, design, procurement, or manufacture, in whole or in part, without the consent of CounterPath. The content of this publication is intended to demonstrate typical uses and capabilities of Bria for iOS from CounterPath. Users of this material must determine for themselves whether the information contained herein applies to a particular IP-based networking system. CounterPath makes no warranty regarding the content of this document, including—but not limited to—implied warranties of fitness for any particular purpose. In no case will CounterPath, its employees, officers or directors be liable for any incidental, indirect or otherwise consequential damage or loss that may result after the use of this publication. CounterPath®, Bria®, X-Lite®, and the ® logo are registered trademarks of CounterPath Corporation. Stretto™ and the Stretto Platform™ are trademarks of CounterPath Corporation. Android and Google Play are trademarks of Google Inc. Eclipse is a trademark of Eclipse Foundation, Inc. Intel, the Intel logo, Intel Core and Core Inside are trademarks of Intel Corporation in the U.S. and/or other countries. iOS is a trademark or registered trademark of Cisco in the U.S. and other countries and is used under license. iPhone, iPad, iPod, Mac, mac OS, App Store, Objective–C, and Xcode are trademarks of Apple Inc., registered in the U.S. and other countries. Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries. Microsoft, Active Directory, Office, Excel, Outlook, and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Oracle and Java are registered trademarks of Oracle and/or its affiliates. All other products and services are. Bria Solo Free is also the renamed and updated version of XLite. Users of XLite will now have to upgrade to Bria Solo as well as provide CounterPath the details of their session Users of XLite will now have to upgrade to Bria Solo as well as provide CounterPath the details of their session initiation protocol or SIP
xlite 3.0 not compatible with windows 8. i need xlite 3.0 in my job
Bria User Guide - Windows and Mac - for Bria Solo and Bria TeamsPublication date: 2025-03-06 Copyright ©2025 CounterPath an Alianza Company. All rights reserved. This document contains information proprietary to CounterPath, and shall not be used for engineering, design, procurement, or manufacture, in whole or in part, without the consent of CounterPath. The content of this publication is intended to demonstrate typical uses and capabilities of Bria for Windows and Mac from CounterPath. Users of this material must determine for themselves whether the information contained herein applies to a particular IP-based networking system. CounterPath makes no warranty regarding the content of this document, including—but not limited to—implied warranties of fitness for any particular purpose. In no case will CounterPath, its employees, officers or directors be liable for any incidental, indirect or otherwise consequential damage or loss that may result after the use of this publication. CounterPath®, Bria®, X-Lite®, and the ® logo are registered trademarks of CounterPath Corporation. Stretto™ and the Stretto Platform™ are trademarks of CounterPath Corporation. Android and Google Play are trademarks of Google Inc. Eclipse is a trademark of Eclipse Foundation, Inc. Intel, the Intel logo, Intel Core and Core Inside are trademarks of Intel Corporation in the U.S. and/or other countries. iOS is a trademark or registered trademark of Cisco in the U.S. and other countries and is used under license. iPhone, iPad, iPod, Mac, mac OS, App Store, Objective–C, and Xcode are trademarks of Apple Inc., registered in the U.S. and other countries. Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries. Microsoft, Active Directory, Office, Excel, Outlook, and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Oracle and Java are registered trademarks of Oracle and/or its affiliates. All other products and services are the registered trademarks of their respective holders.CounterPath's X-Lite - CounterPath's Enman Software Informer.
The ability to select from three levels of performance and codecs depending on a PC’s capability to display videoImproved USB HID support (more devices)Embedded Web module supportAdditional languages: Chinese, Dutch, Japanese and Russian (Windows only)“With Bria 3.1, we have enhanced the user experience and broadened the applicability of our flagship softphone,” said Todd Carothers, vice president of product management, CounterPath. “Bria 3.1 proves that small and medium businesses, large enterprises, government agencies and other users don’t have to compromise on call quality, video quality or usability when choosing to take advantage of all of the bottom-line benefits that multimedia softphones provide. With Bria 3.1, CounterPath is able to extend Bria to more countries, interoperate with a greater number of PBX systems and continues to raise the bar for enterprise-grade, carrier-class softphones that users can bet their business on.” Current Bria 3.0 users will be automatically updated to Bria 3.1 when the new software is available. Regular pricing for a single copy of Bria is $49.95 USD, with additional volume pricing options. The retail version of Bria 3.1 will be available mid-July in CounterPath’s online store at mrkt-stg.counterpath.com. For more information about Bria 3.1, visit 1 Source: Frost & Sullivan, November 2009 ### About CounterPath CounterPath Corporation is an award-winning provider of innovative desktop and mobile VoIP software products and solutions. The company’s product suite includes SIP-based softphones, server applications and Fixed Mobile Convergence (FMC) solutions that enable service providers, enterprises and Original Equipment Manufacturers (OEM) to cost-effectively integrate voice, video, presence and Instant Messaging (IM) applications into their VoIP offerings and extend functionality across both fixed and mobile networks.CounterPath’s customers include some of the world’s largest telecommunications service providers and network equipment providers including AT&T, Verizon, BT (British Telecommunications PLC), Deutsche Telekom, Cisco Systems, and Mitel. Visit mrkt-stg.counterpath.com. Disclaimer: Neither TSX Venture Exchange nor its Regulation Services Provider (as that term is defined in the policies of the TSX Venture Exchange) accepts responsibility for the adequacy or accuracy of this release. Contact: Media and Analyst Relations Megan Hyde 540.239.8386 [email protected]. Bria Solo Free is also the renamed and updated version of XLite. Users of XLite will now have to upgrade to Bria Solo as well as provide CounterPath the details of their sessionWindows xLite x64 - Google Drive
Faites l’expérience d’une communication améliorée avec eyeBeam eyeBeam de CounterPath Solutions Inc. est une application logicielle polyvalente qui fournit des appels audio et vidéo de haute qualité, des messages et des outils de collaboration pour une communication transparente. image/svg+xml 2024 Editor's Rating eyeBeam is a communication software developed by CounterPath Solutions Inc. It is designed to provide users with Voice over Internet Protocol (VoIP) services such as voice and video calls, instant messaging, and presence management.One of the key features of eyeBeam is its user-friendly interface, which allows for easy navigation and customization. With its intuitive design, users can easily manage their accounts, contacts, and preferences with just a few clicks.Another significant feature of eyeBeam is its compatibility with multiple operating systems such as Windows and Mac OS X. This ensures that users can access the software irrespective of their device or operating system preference.Some other notable features of the software include: High-quality audio and video calls Integration with Microsoft Outlook Advanced security features such as encryption and authentication Adaptive jitter buffer to enhance call quality Customizable ringtones and messaging alerts eyeBeam is an excellent option for individuals and businesses looking to enjoy reliable and secure VoIP services. Vue d'ensemble eyeBeam est un logiciel de Shareware dans la catégorie Desktop développé par CounterPath Solutions Inc..Les utilisateurs de notre application cliente UpdateStar ont vérifié eyeBeam pour les mises à jour 63 fois au cours du dernier mois.La dernière version de eyeBeam est actuellement inconnue. Au départ, il a été ajouté à notre base de données sur 29/10/2007.eyeBeam s’exécute sur les systèmes d’exploitation suivants : Android/Windows/Mac. eyeBeam n'a pas encore été évalué par nos utilisateurs.Comments
Is a guide explaining how to add new property to product.Basic plan to this task is:change DTO class \XLite\Model\DTO\Product\Info;change \XLite\View\FormModel\Product\Info class that renders product details form.We decorate \XLite\Model\DTO\Product\Info class, so we create the classes/XLite/Module/XCExample/ImageWidgetDemo/Model/DTO/Product/Info.php file with the following content: // vim: set ts=4 sw=4 sts=4 et:namespace XLite\Module\XCExample\ImageWidgetDemo\Model\DTO\Product;/** * Abstract widget */abstract class Info extends \XLite\Model\DTO\Product\Info implements \XLite\Base\IDecorator{ protected function init($object) { parent::init($object); $secondaryImages = $object->getSecondaryImages(); $dtoImages = [ 0 => [ 'delete' => false, 'position' => '', 'alt' => '', 'temp_id' => '', ] ]; foreach ($secondaryImages as $image) { $dtoImages[$image->getId()] = [ 'delete' => false, 'position' => '', 'alt' => '', 'temp_id' => '', ]; } $this->default->secondary_images = $dtoImages; } public function populateTo($object, $rawData = null) { parent::populateTo($object, $rawData); $object->processFiles('secondaryImages', $this->default->secondary_images); }}We implement two methods in this class:init() is used to populate data-transfer object (DTO) with secondary images' data;populateTo() is used to apply changes to product object based on submitted data. In this case, all needed routines for handling images are defined in processFiles() method, so we just call it with first parameter as name of our product's property (secondaryImages) and with second parameter as data submitted in the form ($this->default->secondary_images).Now we should apply changes to our product details' form. We decorate \XLite\View\FormModel\Product\Info class and create the classes/XLite/Module/XCExample/ImageWidgetDemo/View/FormModel/Product/Info.php file with the following content:// vim: set ts=4 sw=4 sts=4 et:namespace XLite\Module\XCExample\ImageWidgetDemo\View\FormModel\Product;/** * Product form model */abstract class Info extends \XLite\View\FormModel\Product\Info implements \XLite\Base\IDecorator{ protected function defineFields() { $schema = parent::defineFields(); $product = \XLite\Core\Database::getRepo('XLite\Model\Product')->find($this->getDataObject()->default->identity); $secondaryImages = []; if ($product) { $secondaryImages = $product->getSecondaryImages(); } $schema[self::SECTION_DEFAULT]['secondary_images'] = [ 'label' => static::t('Secondary Images'), 'type' => 'XLite\View\FormModel\Type\UploaderType', 'imageClass' => 'XLite\Module\XCExample\ImageWidgetDemo\Model\Image\Product\SecondaryImage', 'files' => $secondaryImages, 'multiple' => true, 'position' => 350, ]; return $schema; }}Essentially, we only have one defineFields() method here and inside it we define our 'secondary_images' field as follows:$schema[self::SECTION_DEFAULT]['secondary_images'] = [ 'label' => static::t('Secondary Images'), 'type' => 'XLite\View\FormModel\Type\UploaderType', 'imageClass' => 'XLite\Module\XCExample\ImageWidgetDemo\Model\Image\Product\SecondaryImage', 'files' => $secondaryImages, 'multiple' => true, 'position' => 350,];label of this field is 'Secondary Images';widget used for rendering this field is \XLite\View\FormModel\Type\UploaderType;this widget will work with images of \XLite\Module\XCExample\ImageWidgetDemo\Model\Image\Product\SecondaryImage class;existing secondary images are passed into 'files' parameter;this widget allows to specify multiple images for a product, not a single one ('multiple' => true).Besides that, we need to display secondary images in store-front. For that we create a template that will be shown on product details page. We createskins/customer/modules/XCExample/ImageWidgetsDemo/product/details/secondary-images.twig template with the following content: {## # @ListChild (list="product.details.page", weight="80") #} Secondary images {% for
2025-03-29GetSecondaryImages(){ return $this->secondaryImages;}public function addSecondaryImages($image){ $this->secondaryImages[] = $image; return $this;} Creating SecondaryImage classWe create the classes/XLite/Module/XCExample/ImageWidgetDemo/Model/Image/Product/SecondaryImage.php file with the following content: // vim: set ts=4 sw=4 sts=4 et:namespace XLite\Module\XCExample\ImageWidgetDemo\Model\Image\Product;/** * @Entity * @Table (name="product_secondary_images") */class SecondaryImage extends \XLite\Model\Base\Image{ /** * @Column (type="integer") */ protected $orderby = 0; /** * @ManyToOne (targetEntity="\XLite\Model\Product", inversedBy="secondary_images") * @JoinColumn (name="product_id", referencedColumnName="product_id") */ protected $product; /** * @Column (type="string", length=255) */ protected $alt = '';}Let us have a look at each important moment of this SecondaryImage class:The directive: means that this class defines a new entity.We define the name of the table where info about these objects will be stored: @Table (name="product_secondary_images")In our case, this table will be 'xc_product_secondary_images', assuming you have not changed table prefix in config.We create our SecondaryImage class based on standard \XLite\Model\Base\Image image class: class SecondaryImage extends \XLite\Model\Base\ImageOur image class will have three additional properties: $orderby field for sorting, $product property as a link to parent product's object and $alt field that will define a text for HTML's 'alt' property.Implementation of $orderby and $alt properties is quite straight-forwart, while $product is more complex: /** * @ManyToOne (targetEntity="\XLite\Model\Product", inversedBy="secondaryImages") * @JoinColumn (name="product_id", referencedColumnName="product_id") */We create a backward relation to \XLite\Model\Product class similar to $secondaryImages property in \XLite\Module\XCExample\ImageWidgetDemo\Model\Product class.We define $product property as @ManyToOne, because one secondary image can be assigned to one and only one product, while a product can have multiple secondary images assigned. Then we link $product property to $secondaryImages property of the \XLite\Model\Product class:@ManyToOne (targetEntity="\XLite\Model\Product", inversedBy="secondaryImages") We also specify that MySQL table, where secondary images are stored must contain the product_id column with value of parent image's ID in order to create this relation: @JoinColumn (name="product_id", referencedColumnName="product_id")Now it is time to create the repository class that will handled requests to database about SecondaryImage objects. We create the classes/XLite/Module/XCExample/ImageWidgetDemo/Model/Repo/Image/Product/SecondaryImage.php file with the following content: // vim: set ts=4 sw=4 sts=4 et:namespace XLite\Module\XCExample\ImageWidgetDemo\Model\Repo\Image\Product;class SecondaryImage extends \XLite\Model\Repo\Base\Image{ /** * Returns the name of the directory within '/images' where images are stored */ public function getStorageName() { return 'product_secondary'; }}We extend the standard \XLite\Model\Repo\Base\Image repository class and use it as a template: class SecondaryImage extends \XLite\Model\Repo\Base\ImageWe also define that secondary image files will be stored in /images/product_secondary/ directory:public function getStorageName(){ return 'product_secondary';}We are done with creating SecondaryImage entity.Tweaking design of admin and customer interfacesFirst, we need to allow merchant to upload secondary images for a product on product details page in admin area. There
2025-04-01IntroductionThis article describes how developers can create a new page in X-Cart. For instance, we want to create a page in admin area (admin.php?target=tony_custom) that will show some specific information. This guide explains how to achieve this task.Before get startedFirst thing to do is to create an empty module. We are creating a module with developer ID Tony and module ID PageDemo.Creating page in admin areaFor the sake of example, our task is to create the page which will be available at admin.php?target=tony_custom address and will display Hello world! text.Create new controller class. Since we want our page to be opened at admin.php?target=tony_custom, the controller class must be named TonyCustom. If you need more info about how controllers work in X-Cart, look at Controllers article.We create the classes/XLite/Module/Tony/PageDemo/Controller/Admin/TonyCustom.php file with the following content: namespace XLite\Module\Tony\PageDemo\Controller\Admin;class TonyCustom extends \XLite\Controller\Admin\AAdmin{}As you can see, it is pretty empty, but since no data should be processed from the request, we do not need any extra methods here.Create new viewer class that will manage the data output. This viewer class should sit in the classes/XLite/Module/Tony/PageDemo/View/Page/Admin/ directory and have the same as controller class. This is just an agreement and all page viewer classes follow the same principle. We are creating the classes/XLite/Module/Tony/PageDemo/View/Page/Admin/TonyCustom.php file with the following content: 5.2.x and earlier5.3.xnamespace XLite\Module\Tony\PageDemo\View\Page\Admin;/** * @ListChild (list="admin.center", zone="admin") */class TonyCustom extends \XLite\View\AView{ public static function getAllowedTargets() { return array_merge(parent::getAllowedTargets(), array('tony_custom')); } protected function getDefaultTemplate() { return 'modules/Tony/PageDemo/page/tony_custom/body.tpl'; }}As you can see this implementation has only few differences:namespace XLite\Module\Tony\PageDemo\View\Page\Customer;namespace is a bit different;/** * @ListChild (list="center") */We use this @ListChild directive in order to insert this viewer class into central area of customer area, instead of admin one;5.2.x and earlier5.3.xprotected function getDefaultTemplate(){ return 'modules/Tony/PageDemo/page/tony_custom/body.tpl';}The template for this viewer sits in other location. Aside from that, the implementation is the
2025-03-30IntroductionThis article explains how to use image selection widget in X-Cart. And also, how to attach images to an entity. For the sake of example, we will create a mod that adds 'Secondary images' field to a product. Merchant will be able to assign any number of secondary images to a product and these images will be shown on product details page in customer area.ImplementationCreating an empty moduleFirst of all, we create an empty module with developer ID XCExample and module ID ImageWidgetDemo.Decorating Product classInside this module, we decorate the \XLite\Model\Product class as we want to add a new property secondaryImages to it: // vim: set ts=4 sw=4 sts=4 et:namespace XLite\Module\XCExample\ImageWidgetDemo\Model;abstract class Product extends \XLite\Model\Product implements \XLite\Base\IDecorator{ /** * @OneToMany (targetEntity="XLite\Module\XCExample\ImageWidgetDemo\Model\Image\Product\SecondaryImage", mappedBy="product", cascade={"all"}) * @OrderBy ({"orderby" = "ASC"}) */ protected $secondaryImages; public function __construct(array $data = array()) { parent::__construct($data); $this->secondaryImages = new \Doctrine\Common\Collections\ArrayCollection(); } public function getSecondaryImages() { return $this->secondaryImages; } public function addSecondaryImages($image) { $this->secondaryImages[] = $image; return $this; }}Let us have a closer look at this implementation.We add a new property to a product object: /** * @OneToMany (targetEntity="XLite\Module\XCExample\ImageWidgetDemo\Model\Image\Product\SecondaryImage", mappedBy="product", cascade={"all"}) * @OrderBy ({"orderby" = "ASC"}) */ protected $secondaryImages;We define it as OneToMany, which means that one product can have many secondary images, while a secondary image always belongs to a single product.The secondary image object is defined by the \XLite\Module\XCExample\ImageWidgetDemo\Model\Image\Product\SecondaryImage class:targetEntity="XLite\Module\XCExample\ImageWidgetDemo\Model\Image\Product\SecondaryImage"This class does not exist yet, so we will have to create it as a next step. Then, we specify that each record about SecondaryImage object must contain a reference to its product object: Learn more about mappedBy in Doctrine documentation. Also, using mappedBy directive in Product class means that we will have to use inversedBy directive in SecondaryImage class in order to create bidirectional relation. This way we will be able to access SecondaryImage object from Product object $product->getSecondaryImages() as well as access Product object from SecondaryImage object $secondaryImage->getProduct(). This cascade directive defines that SecondaryImage objects are associated with its Product object and if we remove or clone Product entity, the same will happen to SecondaryImage objects linked to it. Learn more about cascade in Doctrine documentation. The @OrderBy directive means that SecondaryImage objects will be ordered by SecondaryImage's orderby field. @OrderBy ({"orderby" = "ASC"})We also change constructor method a bit: public function __construct(array $data = array()){ parent::__construct($data); $this->secondaryImages = new \Doctrine\Common\Collections\ArrayCollection();}and tell Product class that secondaryImages property is an array.Finally, we add getter/setter methods:public function
2025-04-20Bria User Guide - iOS - for Bria Solo and Bria TeamsPublication date: 2025-02-13 Copyright ©2025 CounterPath an Alianza Company. All rights reserved. This document contains information proprietary to CounterPath, and shall not be used for engineering, design, procurement, or manufacture, in whole or in part, without the consent of CounterPath. The content of this publication is intended to demonstrate typical uses and capabilities of Bria for iOS from CounterPath. Users of this material must determine for themselves whether the information contained herein applies to a particular IP-based networking system. CounterPath makes no warranty regarding the content of this document, including—but not limited to—implied warranties of fitness for any particular purpose. In no case will CounterPath, its employees, officers or directors be liable for any incidental, indirect or otherwise consequential damage or loss that may result after the use of this publication. CounterPath®, Bria®, X-Lite®, and the ® logo are registered trademarks of CounterPath Corporation. Stretto™ and the Stretto Platform™ are trademarks of CounterPath Corporation. Android and Google Play are trademarks of Google Inc. Eclipse is a trademark of Eclipse Foundation, Inc. Intel, the Intel logo, Intel Core and Core Inside are trademarks of Intel Corporation in the U.S. and/or other countries. iOS is a trademark or registered trademark of Cisco in the U.S. and other countries and is used under license. iPhone, iPad, iPod, Mac, mac OS, App Store, Objective–C, and Xcode are trademarks of Apple Inc., registered in the U.S. and other countries. Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries. Microsoft, Active Directory, Office, Excel, Outlook, and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Oracle and Java are registered trademarks of Oracle and/or its affiliates. All other products and services are
2025-04-14Bria User Guide - Windows and Mac - for Bria Solo and Bria TeamsPublication date: 2025-03-06 Copyright ©2025 CounterPath an Alianza Company. All rights reserved. This document contains information proprietary to CounterPath, and shall not be used for engineering, design, procurement, or manufacture, in whole or in part, without the consent of CounterPath. The content of this publication is intended to demonstrate typical uses and capabilities of Bria for Windows and Mac from CounterPath. Users of this material must determine for themselves whether the information contained herein applies to a particular IP-based networking system. CounterPath makes no warranty regarding the content of this document, including—but not limited to—implied warranties of fitness for any particular purpose. In no case will CounterPath, its employees, officers or directors be liable for any incidental, indirect or otherwise consequential damage or loss that may result after the use of this publication. CounterPath®, Bria®, X-Lite®, and the ® logo are registered trademarks of CounterPath Corporation. Stretto™ and the Stretto Platform™ are trademarks of CounterPath Corporation. Android and Google Play are trademarks of Google Inc. Eclipse is a trademark of Eclipse Foundation, Inc. Intel, the Intel logo, Intel Core and Core Inside are trademarks of Intel Corporation in the U.S. and/or other countries. iOS is a trademark or registered trademark of Cisco in the U.S. and other countries and is used under license. iPhone, iPad, iPod, Mac, mac OS, App Store, Objective–C, and Xcode are trademarks of Apple Inc., registered in the U.S. and other countries. Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries. Microsoft, Active Directory, Office, Excel, Outlook, and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Oracle and Java are registered trademarks of Oracle and/or its affiliates. All other products and services are the registered trademarks of their respective holders.
2025-04-16