Tag: Components

SDKs & Packages Development

Our developers team specializes in writing SDK integrations and packages. Along all those years, we have acquired a great experience working on challenging projects, most of them involving a package or SDK integration.

Creating components for Joomla 1.0.x

This article will explain how to develop customized components for Joomla in the 1.0.x version, showing the files and basic steps, as well as some useful methods such as access to the database, paged results, etc. It is recommended to have knowledge of PHP and HTML to read this article.

 

Directory structure

Joomla has a directory structure divided into 2 big groups. Administrator, where are all the files needed for the backend to work and the various directories that are located in the root directory.

The directories of interest are the components, both within the administrator directory, as in the root directory, since here is where the files for each component are, which in turn are in sub-directories as follows, com_componentName, example com_users.

If we want to see the files corresponding to the users component, must look at

  • Administrator/components/com_users (backend)
  • Components/com_users (frontend)

Another important is the includes directory, since within it we find files that have classes that are going to be used in the component, for example to connect the database (database.php), to manage user data, paging, etc (joomla.php).

The components are stored in the database, more precisely in the jos_components table.

Files that make up a component

A component to be installed must be compressed in a zip file, with the following format com_ComponentName.zip example com_users.zip.

This file must have at least 8 files that are going to be described in brief:

  • admin.componentName.php (backend)
  • admin. componentName.html.php (backend)
  • toolbar. componentName.php (backend)
  • toolbar. componentName.html.php (backend)
  • componentName.xml (backend)
  • componentName.class.php (opcional)
  • componentName.php (frontend)
  • componentName.html.php (frontend

The following describes each file.

 

MyZillion

Zillion Insurance offers jewelry insurance that can be purchased from on partner's website.

In this project, our client asked to generate plugins to allow the integration of the MyZillion service in open-source e-commerce platforms. During checkout process, an user is able to request insurance quick and easy, with a just a click. We were in charge of designing and developing the final solution for the following e-commerce platforms:

  • Magento 2.2 / 2.3
  • Shopify
  • Spree v4
  • Standalone Javascript library 

SDK for PHP 7

An SDK was developed to support frameworks with PHP 7.2 and PHP 7.3

From the beginning of this phase, we made a definition of all the features to be supported with a list of endpoints from Zillion API to integrate any PHP site. The idea of ​​generating an SDK came up in the initial phase of the project, because in the future our client is expecting to reuse it on other PHP platforms such as WooCommerce and Prestashop.

This same research was also a baseline for other programming languages.

Magento 2 module

The above SDK made easier the integration within the new extension for Magento 2, we solved a fundamental dependency for this development.

Based on the extension needs, we created a configuration panel using default Magento admin panel, this module can be used in any Magento site regardless of the customizations of each store and themes that follow proper coding standards. In this project, we focused on supporting major payment methods used in a Magento v2.2 and v2.3 installation:

  • Default one-page checkout
  • Amazon Pay checkout
  • Paypal Checkout (default and express)
  • Affirm Payment Gateway

During the development process, we make sure to follow the Magento 2 quality standards (coding standards), as well as implement automatic testing using Selenium. Each test case was designed to validate and verify a requirement or a complete workflow.

Currently the module is used in several stores selling jewelry and we are providing technical support for this module and releasing new versions to meet the needs of every partner's site.

SDK for Ruby

Gem development was done by creating an SDK for Ruby v2.6 or higher. This is a base for any Ruby framework that needs to connect with Zillion API.

Spree Commerce Gem

In the same way we did for Magento, we developed a module for SpreeCommerce to support the Zillion API based on a fresh install of this platform. Additionally, we develop a Rails gem that extends the functionalities to be able to use the SDK in the Rails framework.

During the checkout process the insurance is offered to the user in a new section within the payment methods. The new section was intended as an independent block, which makes the Spree gem compatible with any theme (template). If the user agrees to contract the insurance, the amount thereof is reflected as an adjustment within the order. In this way we make sure to use native properties of the framework and thus avoid conflicts with other gems.

The configuration of the extension in any store is very simple since it only requires entering the credentials to establish the connection with the API.

Currently this gem is used in one of the largest jewelry sales sites in San Francisco, California.

Shopify extension

The biggest challenge for this integration was to be able to offer the insurance to the user during the purchase process, due to the limitations of Shopify that reduce flexibility on custom checkout functionalities. Therefore, we started developing a custom feature to be able to inject the Zillion box dynamically in the checkout page, we created a javascript library allowing the store owner to include it on their checkout template, in order to offer the insurance. We provided guideline for developers and support for non-technical people working for sellers

For the backend app, we have developed a middleware application using Ruby on Rails. This app provide ability to connect Zillion API with the seller's store in Shopify. Here we reuse the SDK for Rails that we developed for Spree and the shopify_app gem recommended from Shopify documentation was also used as a base.

Once the application is installed, the seller can manage all the Zillion configurations from the administration panel of their store and have control of the status of all the insurances requested by their customers.

We were asked as a requirement to be able to offer the extension in the Shopify application store, so we made sure to comply with all the standards and quality conditions necessary to be able to publish the extension.

Javascript

Additionally, we generated a javascript library that allows sellers to add MyZillion on any online stores platform, dynamically and without backend dependencies. In this case, the content is shown on a page with legal information about the insurance.

Serfe info(at)serfe.com https://www.serfe.com/images/serfe_logo_text.png https://www.serfe.com/images/serfe_logo_text.png FALUCHO 2032, S3016LDB, SANTO TOME, SANTA FE, ARGENTINA 1-305-5375397
Cookies & Privacy: 
This website uses cookies to ensure you get the best experience on our website.


Privacy Policy