Ibnab Blog
 /  Ibnab Blog

OroCommerce how to create checkout from custom source

orocommerce,  programming, 

OroCommerce give ability to start checkout from multi source like shopping list or order itself by re-order , So the entity source for checkout should implement CheckoutSourceEntityInterface , like Order and ShoppingList entities . And Checkout entity has relation with entity CheckoutSource. 

Read more

OroCommerce B2B : show hide actions in datagrid by permissions

orocommerce,  programming, 

By default, oro platform show all actions which get added to your data gird . If you need to hide or show some options depending on the data of the entry, you can manage by adding action_configuration which using a service that decides whether or not an action is visible for an entry:

Read more

OroCommerce B2B for developer: Customize Automatic Order Cancellation

orocommerce,  programming, 

You can set all orders with selected internal statuses to be automatically cancelled past their “Do Not Ship Later Than” date. By default OroCommerce cancel all orders which has not null ship Until field or the current date grant than this field . 
So How you can customize this atomization for example the order which created before 60 days and still open cancel it .
OroCommerce system us Processes (processes.yml) which provide the possibility to automate tasks related to entity management. They use the main doctrine events to perform described tasks at the right time. Each process can be performed immediately or after a timeout. Processes use the OroMessageQueue component and the bundle to provide the possibility of delayed execution. 

Read more

OroCommerce Quantity Manager by Ibnab

orocommerce, 

OroCommerce by default gives ability to Sell products in real or decimal quantities with a minimum and maximum quantity limit. you can restrict customer purchases by setting a minimum and maximum quantity. by general configuration or by each product. Decimal Quantity allows the item to be purchased in decimal qty like 0.35 etc...

Read more

OroCommerce for developers: some lines about product image dimensions

orocommerce,  programming, 

In the modern E-commerce system like OroCommerce dimensions of product image is changing related to current view for example in shopping list page the thumbnail has used otherwise in product view medium size has used and for zoom the system using the original one.

Read more

OroCommerce for developers: coupons batch generator

orocommerce,  programming, 

OroCommerce give ability to user to generate multi coupons with many code dynamically ,  so the developer can use this system for generate coupons for example for custom user or specific cases.

Read more

OroCommerce for developers: Manage attributes groups in frontend

orocommerce,  programming, 

OroCommerce give ability to organize your product attributes by group for example media group , price group … and every product family constructed from many attributes group  .

So when the customer visits the product view page in the frontend they explore all infos related to current product – attributes value – Divided in many container each one contain many groups .

Read more

OroCommerce For Developers: some lines about customer address in frontend

orocommerce,  programming, 

In many cases you need to use full customer address form type or just some fields like country region or city , ok to know how to use firstly you should know that oro platform came with a bundle AddressBundle which manage global address structure for example address entity contry entity and region entity , this bundle give you ability to add form address or select box of country box and region too and managing relation between country and region by validation and events, as well you can using the phone field or email field (collection too) 

Read more

OroCommerce for Developers: Add Order Internal Statuses

orocommerce,  programming, 

In this tutorial I will add Approved internal status: Approved — The order has been opened. You can cancel, mark as shipped, and close an approved order.
To see the default order internal statuses you can go to ‘oro_enum_order_internal_status’ table in phpmyadmin.

Read more

OroCommerce Video For Developers: Create tables and load Data with Migration

orocommerce,  programming, 

In OroCommerce Migrations are a way of defining the schema of your database. OroCommerce provides a bundle for adding/dropping/modifying database columns and tables using PHP code, The OroCommerce Bundle based on Doctrine Migrations project which offer additional functionality on top of the database abstraction layer (DBAL) for versioning your database schema and easily deploying changes to it. It is a very easy to use and a powerful tool.

Read more

OroCommerce Video For User: Consent Management

orocommerce, 

In the OroCommerce back-office, consents are managed from configuration section whith many technqiue , restrict buyers in the storefront from proceeding to the checkout or creating RFQs, unless they accept these consents or do not restrict buyers from working with the application and are usually used to retrieve permissions to send them email newsletter.

Read more

OroCommerce For User: Assets Management

orocommerce, 

OroCommerce 4.1 LTS arrived with new feature which is assets management , you can manage your images pdf and other files type from admin for products , landing page ... this video show how to use it.

Read more

OroCommerce For developers: Content nodes and product Variants

orocommerce,  programming, 

OroCommece has an advanced web catalog to manage all frontend display related to catalog menu , products , landing page , So from admin Left Menu Products→ Master Catalog you have the ability to add all your category with many roots , and create restriction based to customer or customer group or localization , you can managing SEO , global product options by category …..

Read more

OroCommerce add custom product attribute programmatically

orocommerce,  programming, 

The configurable entity give you the ability the add custom oro configuration to your entity for example to manage it from administration By UI , So Your entity will support some new annotation : @Config and @ConfigField.

Read more

OroCommerce for Developer: Customer User and Preferred Localization

orocommerce,  programming, 

So OroCommerce offer ability to define which Preferred Localization for specific Customer User with filed Preferred Localization Your can choose between all locale added from configuration. The field  Preferred Localization get showed just if you’re choosing more than one locale from configuration.

Read more

OroCommerce for Frontend developers: reloadEvents Overview

orocommerce,  programming, 

OroCommerce organize page view by loading subpart-subtree. any view is constructed by many block defined by block_id when you make an event like add item to shopping or delete item from shopping list as result the layout system load and refresh some block related to this change for example for  -add to shopping list - the layout load the main_menu_shopping_lists_wrapper which means the top shopping list toggle and all informations content  (by adding the new items to content and chonging the items counts)

Read more

OroCommerce B2B Extension : Add to Shopping List Improvement

orocommerce,  extension, 

New Small Extension for OroCommerce B2B, Redirect to Shopping List Page Or Redirect to Checkout Or Inline Popup with shopping list info , from admin you can choose which action the system will make after click on add to shopping list 

Read more

OroCommerce For developers: customize slick carousel options from layout

orocommerce,  programming, 

Slick js library already included by default with OroCommerce , So the carousel which present  - Feature Products , New Arrival , Top Selling , Related Products , UpSell Products – is customizable , and you can change many options from YAML files with layout systems .

Read more

OroCommerce B2B: Product Quick View Extension demo

orocommerce,  video, 

OroCommerce Product Quick View extension is an extension which helps customers to quick view product information by popup and adds items to shopping lists without leaving the current page for improveing the user experience and enhance conversion rates.

Read more

OroCommerce B2B : Reviews and Testimonials Manager Some Features

orocommerce,  video, 

 Customer Reviews & Testimonials extension for OroCommerce adds credibility to your store and give new visitors a reason to buy in your shop online.It helps to increase your market values. You can add blocks to display customer reviews on different pages of your website

Read more

OroCommerce For Developer : Customize Frontend form with form type extensions

orocommerce,  programming, 

Form type extensions are incredibly powerful: they allow you to modify any existing form field types across the entire system, Or add new field to specific form with flexible way .

Ok we will try to add a form filed type to frontend registration form that means should have ability to view and edit the field from admin too.

Read more

OroCommerce B2B For Developers : Some product snippets

orocommerce,  programming, 

We have collected here some useful snippets related to product to use inside php file and twig too , for exapmle how you can load Upsell or Related products even how to loading image by type inside twig file .

Read more

OroCommerce Video: Some points to create B2C store and keep B2B Features

orocommerce, 

This video trying to show some points how you can start your B2C Store with OroCommerce and keep the B2B Features too . Never lose your B2B features every B2C store Owner have some wholesales partners which needs custom workflow and user experience for example custom prices by quantity – custom purchase lifecycle from add to cart to checkout – custom payment methods pr roles .  

Read more

OroCommerce B2B Video : Layouts System For Developer (MVSC)

orocommerce,  programming,  video-courses, 

OroCommerce Layouts System (MVSC)
How you can use System layouts , OroPlatform give you the ability to use .yml . this system is simple and you can share data , work with expression insde Yaml files .

Read more

Adminhtml UI: Create your custom linked products type programmatically like (Related Crosssell Upsell products )

Magento 2,  programming, 

1 - Explanation :
The product get all linked product (related, upsell ..) on save with function getList inside Magento\Catalog\Model\ProductLink\Repository 
    public function getList(\Magento\Catalog\Api\Data\ProductInterface $product)
    {
        $output = [];
        $linkTypes = $this→getLinkTypeProvider()→getLinkTypes();

 

Read more

Magento 2 Kill EAV For Customers video courses Part 2

magento2,  programming, 

Magento 2 professional serie videos -kill  Eav for customer - give you the ability to play add remove show  add custom attributes  , customize events  , explore structure db and more ....
 

The Part 2 Recover:

  • First way to Show atrribute field in frontend (edit customer section)
  • Second way to Show atrribute field in frontend (edit customer section)
  • Save Attribute Value to db by plugin
  • How inject action around creation of customer (for example to vaildate phone number or send activation code before create customer , you can ignore creation of customer if the phone is not valide)
Read more

Magento 2 Kill EAV For Customers video courses Part 1

magento2,  programming, 

Magento 2 professional serie videos -kill  Eav for customer - give you the ability to play add remove show  add custom attributes  , customize events  , explore structure db and more ....

The Part 1 Recover:

  • Some notes about eav (i have used phpmyadmin to explain this point)
  • Add attribute to customer with Setup.php file (phone number by example)
  • Show attribute in admin (edit customer section) and in frontend (create customer section)
  • Save attribute value to db 
  • Other point inside the course explore and create query mysql inside terminal , we worked inside docker and with netbeans IDE .
Read more

Magento 2 Get One Search Result by Sku (Free Extension with explanation of code)

Magento 2,  programming,  extension, 
By default when you enter sku reference in quick bar search of Magento 2 , It displays all the product whose sku is having prefix of entered sku , By example if you enter 'BHSHIRT-F' for searching specific proudtc which have this reference as value , you will get  more tahn one for example ' BHSHIRT-FX1 and  BHSHIRT-FX2' .
Why ?
Now in Magento 2 we have in database catalogsearch_fulltext_scope1 and catalogsearch_fulltext_scope2 , is related to how many scope you have , let's imagine you have 2 store one for English and other for Arabic ,  the system create 2 scope . And stock the map of search inside this tables , but how ? Yeah let's go and see the structure of table ,this table have 3 columns entity_id and atrribute_id and data_index :
entity_id : id of entity or product that mapped with this infos
atrribute_id : id of attribute related to attribute set of product by default title and short description and description attribute used in map
Read more

OroCommerce Some lines about layout (Block , Container , CMS Page) ….

orocommerce,  programming, 

Inside views folder you will find folder layouts contain 2 floder of themes by example if you go to vendor/oro/commerce/src/Oro/Bundle/CMSBundle/Resources/views/layouts , you will find 2 theme blank and default as basic theme .
Inside everyone of it we have folders which named by (oro_frontend_root = home page or global declaration) (oro_cms_frontend_page_view = cms page view ) .

Read more

OroCommerce Customize header top bar programmatically

orocommerce,  programming, 

OroCommerce give you the ability to customize your header by combining many components and bundles like layout service management and other , first go to file : vendor/oro/customer-portal/src/Oro/Bundle/CommerceMenuBundle/Resources/views/layouts/blank/page/top_nav.yml
you need observe that is inside blank basic theme (the big parent of default and custom and other theme) the content is :

Read more

Show Hide Fields (ex : street , city , region , country ….) in Checkout page

magento-2,  programming, 

The checkout page contain standard fields , in many cases the site owner needs to hide some fields for specific reason , the system give you the ability to hide some fields directy from xml , you can add checkout_index_index.xml (copy same structure or just what you want from this path vendor/magento/module-checkout/view/frontend/layout/checkout_index_index.xml) to you theme or your custom extension and start hiding some fields .

Read more

Magento 2 Layouts and blocks inside php

magento-2,  programming, 

Magento 2 have a good system for  organize the blocks by layouts, In Magento 2 that is more flexible . You can play by many ways .

We want show how the developers can play with all the puzzle (layout block template and structure), the framwork Magento 2 have a component called View ("vendor/magento/framework/View"), it have almost all needed class for manage the frontend view in back and font office ,
 you can inject the class Magento\Framework\View\Layout  by factory for get instance of layout class . let's imagine your contruct  in plugin by example is

Read more

Track V1 Rest url (how you can explore the path of request)

magento-2,  programming, 

Magento choose to use some interaction client as service (click) , for example when you try to place order you get url like rest//V1/guest-carts/:cartId/payment-information , ok but how you can see where is point this url ? Is a module controller action url ? Wrong is a service .

Read more

OroCommerce Form : create color picker field

orocommerce,  programming,  video-courses, 

Orocommerce is new  b2b ecommerce system , this system will need customizable themes , and the frontend developer need know how use color picker field for give the ability to user for customizing the theme from admin panel ,

Ok orocommerce is built on top of oro platform , and the platform propose you a lot of form type , you can find all in path vendor/oro/platform/src/Oro/Bundle/FormBundle/Form/Type/ .
One of them is OroSimpleColorPickerType and OroSimpleColorChoiceType . Let's try using simple example of how you can use  OroSimpleColorPickerType .

Read more

Orocommerce Video Course : Expression in Payment Rules and Shipping Rules

orocommerce,  course,  video-courses, 

Infos About Payment Expressions

For flexible display and use of payment methods or shipping methods , you need explore and know how the rule expressions is working  , 
rules expression give you the ability to change the behavoir of payment methods , yeah : “ for example the Check/Money Order it will be availible just with some conditions and other not , if the customer have less than 4 items don't give him the option of Check/Money Order“ , with expression you can find solutions for complex cases “ what's about b2b ? ” ,
Orocommerce give you this big tool , for example in other system like magento you don't have by default “ you need add an extenssion for that like owebia shipping , but is just related to expression for shipping  !!!! ”

Read more

Magento 2 For developer : some ideas about Search Framwork

Magento 2,  programming, 

The search use 3 request name in magento 2 :

'quick_search_container' when you search from the small field text in the top

'advanced_search_container' when you use the advanced search page

'catalog_view_container' when you entre to category page or use filter in category page it's work by default

inside class Magento\Framework\Search\Search the function search(SearchCriteriaInterface $searchCriteria) build a request with class Magento\Framework\Search\Request\Builder; it's start by puched in object $this->requestBuilder the query name example 'quick_search_container'

Read more

Magento 2 For developer : some ideas about frontend search

magento-2,  programming, 

For customize behavior of search you need know the mechanism of how Magento 2 stock and collect infos and how used  it, Now in Magento 2 we have in database catalogsearch_fulltext_scope1 and catalogsearch_fulltext_scope2 related to how many scope you have let's imagine you have 2 store one for English and other for Arabic ,  the system create 2 scope . And stock the map of search inside this tables , bot how ? Yeah let's go and see the structure of table ,this table have 3columns entity_id and atrribute_id and data_index

Read more

WooCommerce Add custom api route

woocommerce, 

In WooCommerce the rest api is used to get data from orders , products , customers..
but how you can customize or add add other api route  to get (fields and value) , ok it's exist many techniques 
first work directly on the core for example inside

Read more

WooCommerce connector ready for orocrm 1.10

woocommerce,  orocrm, 

WooCommerce connector ready for OroCRM 1.10 , and the big feature is WooCommerce OroCRM Failure cart follow up email (on try to exit tab or browser) , persist cart and create abandoned cart.

Read more

Magento 2 Call media gallery (product images) in product list

Magento 2,  frontend,  programming, 

After see many frontend developers peoples search for how call gallery in product list page , we decide to write small course (tutorial) for how done this task .Ok first you need create class helper inside your module , for example Ibnab/Common/Helper/Data.php and push the code

Read more

WooCommerce CRM

orocrm,  woocommerce, 

Establish bi-directional connection between  (Open source CRM ) OroCRM and WooCommerce ,you can import customer order coupons and abandoned cart to CRM , for centralize the management of sales marketing and reporting , OroCRM, it can be used for anything related to your store marketing, sales, and customer services ,The WooCommerce Connector allows merchants to get a 360° view of every customer , recover abandoned cart and recover order

Read more

OroCRM How to Use the Pro PDF Manager

orocrm, 

Learn how a OroCRM Administrator can add or modify PDF templates (subtemplate) and how you can use those templates to download and email documents using the PDF Manager Pro

Read more

Magento 2 More details about checkout page

magento-2,  programming, 

The checkout process in Magento 2 it's more practice and more abstracted with new generation ideas of user experience , in this course ibnab try to give you some key for customize the checkout page .

Saw the system use component for create and manage the page checkout, it's start from the layout checkout_index_index.xml in path vendor/magento/module-checkout/view/frontend/layout 

Read more

OroCRM WooCommerce Some videos about connector

orocrm,  woocommerce, 

Ibnab almost finish a nice connector for OroCRM and WooCommerce , you can import customer order coupons and abandoned cart to crm , for centralize the work on sales and marketing

Read more

Magento 2 backend add custom grid action (target _self or _blank)

Magento 2,  backend, 

Ok the new generation of ui grid in magento 2 give you the ability to create or change grid  with xml file, this xml use extern php file for getting all part needed .
Our example here is the grid action like edit in catalog product grid or delete preview in page cms grid ,
ok we want add custom action .

Ok the xml responsible for ui grid of  product list in backend is vendor/magento/module-catalog/view/adminhtml/ui_component/product_listing.xml , and for action you will inside this file :

Read more

Free Magento 2 Easy Mega Menu

magento-2,  extension, 

Without high technical knowledge , Easy Mega Menu give you the ability to create an organized menu ,
You have a lot of products , give a best user experience to customer :


Manual installation :

    download from store

    past in your folder app/code

    enable extension in app/etc/config.php by adding 'Ibnab_MegaMenu' => 1,

    and execute the command php bin/magento setup:upgrade

   and execute the command rm -rf var/view_preprocessed/  pub/static

   and execute the command php bin/magento setup:static-content:deploy

Read more

Migrate Form ATG Commerce to Magento 2 (concept and programmation) (part1)

Magento 2,  programming,  products,  ATG, 

In the world of the big business  appear Oracle ATG Commerce , in many statistic It occupies an advanced position , yes the Magento 1   It has several elements to accommodate large-scale projects and it needs ,  But it lacks the tools by which tasks are separated, and the removal of conflict, the user experience in admin, default unit test tool , it's real and flexible system but with old mechanism  , In Ibnab we think the Magento 2 is here for taking  advanced position in this domain of big  business  and  large-scale projects .

Read more

Magento 2 Paypal Fee (charge) and life cycle

Magento 2,  programming, 

In magento 2 paypal is implemented with module Payal , in case if the customer choose payapl as method of payment M2 use Magento\Paypal\Model\Cart in place of \Magento\Payment\Model\Cart , it used for collect items and amount and validate the infos collected before sending to paypal ,

The model have more additional methods as (it extend from parent Magento\Paypal\Model\Cart) :
getAmounts()  : Get shipping, tax, subtotal and discount amounts all together
_validate( ) : Check the line items and totals according to PayPal business logic limitations
_importItemsFromSalesModel() : Import items from sales model with workarounds for PayPal

Yeah after collecting the amounts and validate  let's consider we choose Paypal express , the checkout redirect the function Paypal/Controller/Express/Start Action but inside this action it use the global Api class Model/Api/Nvp.php

Read more

Magento 2 Concept : Model Resource DB and Collection (part3)

Magento 2,  concept, 

This  course of series give you the ability for creating your own model resource and collection , ok let's imagine you want create a simple module for persist some data like brand infos for example .

1 – Create :

First we need create our table inside our database for that you need create the Setup folder ,The path complete of module is Ibnab/Brand , inside Setup folder create  file InstallSchema.php and fill with :

Read more

Magento 2 programming : implement import with (import.xml)

magento-2,  programming, 

Magento 2 import export module give you the ability to implement it behavior(standard system export import)  with simple xml and general adapter . Some point before stated :
A – For import you need create import.xml inside etc of your module
B : You can create just import without export
C : Standard place to show of your  import module is form menu system→export or system→ import .

Read more

Magento 2 Add custom EAV attribute to category or customer (support 2.1 too and higher)

magento-2,  programming, 

EAV system in Magento 2 almost similar to Magento 1 but many function and technique is changed , in this tutorials we give you 2 example of how adding custom eav attribute to category or customer .

1 – Create custom attribute for category :

Go to your model and create Setup folder , inside it create file InstallData.php and push this full code :

Read more

Magento 2 Components some js process details(mage.js,apply.js)

magento-2,  programming, 

M2 system use  for read and execute (scriptSelector = 'script[type="text/x-magento-init"]' and dataAttr = 'data-mage-init' )  many js file like vendor/magento/magento2-base/lib/web/mage/apply/main.js  and scripts.js and vendor/magento/magento2-base/lib/web/mage /mage.js
you can find vendor/magento/magento2-base/lib/web/mage 
in normal case  you can declare as virtual :

Read more

Magento 2 Useful snippets for frontend developers

magento-2,  programming, 

1 - Infos About Store

Get Current store Id :
inject \Magento\Store\Model\StoreManagerInterface $storeManage
$this->storeManager = $storeManager;

and get the id with :
$id = $this->storeManager->getStore()->getId();

get base Url :
$baseUrl = $this->storeManager->getStore()->getBaseUrl();

Read more

Magento 2 Action: the default injected objects ($request $response,$resultRedirectFactory )

magento-2,  programming, 

Magento 2 Action allow the developers using $request $response and $resultRedirectFactory  objects without injecting (DI) by hand .
By extending \Magento\Backend\App\Action for backend action case or \Magento\Framework\App\Action\Action for global case , you have $request $response and $resultRedirectFactory .

1 – Request :

the top level parent class of action is Magento\Framework\App\Action\AbstractAction ,  AbstractAction injected by di with \Magento\Framework\App\Action\Context $context .

Read more

Magento 2 UI (Video) : use jquery widgets and requirejs in practice

magento-2,  course,  tutorial, 

Magento 2 have flexible technique for manage Ui , have by default jQuery included , the teams of M2 include requirejs too on core , we call js with asynchronous method .

This tutorial give you in practice the ability of :

  • - call js with requirejs
  • - create custom js for manage ui .
  • - use jquery widgets
  • - create requrejs-config.js
  • - additional technique like work with frontend_model button_url and attribute tags ,pass params between frontend_model and .phtml
Read more

Magento 2 Some techniques about system configuration(part2)

magento-2,  course,  tutorial, 

In first tutorial we introduce the creation of system configuration , in this course  we explain how set and get the value (play with configuration).

1 – Set Value Configuration :

You can set the value of specific field  inside  stores configuration , by using the interface \ \Magento\Framework\App\Config\MutableScopeConfigInterface  , (magento2 by calling this interface with technique of preference give you as result a MutableScopeConfig class instance)
inject the class to controller or helper or block or anywhere :

Read more
IBNAB is a company made of a group of professionals whose work is providing secure open source solutions. Our company strives for reaching magnificent results with each experience and provides professional open source solutions that cover every part of the business process.