Transition from Site Builder to SuiteCommerce Advanced

Transitioning from Site Builder to SuiteCommerce Advanced (SCA) involves several strategic steps to maximize the performance and features of NetSuite’s e-commerce platform. Site Builder, an older platform with limited customization and mobile responsiveness, lacks the advanced capabilities needed for modern e-commerce experiences. SuiteCommerce Advanced, on the other hand, offers a highly customizable, robust, and scalable… Continue reading Transition from Site Builder to SuiteCommerce Advanced

Difference Between Sleep() and Usleep() function in PHP

In PHP, you can delay execution using the sleep() or usleep() functions. These are the main differences between sleep and usleep functions Sleep: Takes time in seconds. Less precise because it works in whole seconds. Accepts integer values as the number of seconds. Primarily used for longer delays (whole seconds). Minimum delay is 1 second.… Continue reading Difference Between Sleep() and Usleep() function in PHP

Published
Categorized as PHP Tagged

Magento 2: How to validate phone number by their country?

alidation rules are written in validation.js (lib/web/mage/validation.js), so you need override it. requirejs-config.js var config = { map: { ‘*’: { “Magento_Ui/js/lib/validation/rules”: “Vendor_Module/js/lib/validation/rules” } } }; rules.js: add rule like this but for countries you want to check. ‘phoneUK’: [ function (value) { return utils.isEmpty(value) || value.length > 9 && value.match(/^((?(0|+44)[1-9]{1}d{1,4}?)?s?d{3,4}s?d{3,4})$/); }, $.mage.__(‘Please specify a valid phone number’)… Continue reading Magento 2: How to validate phone number by their country?

Magento phone number should accept special character like (-) and should limit to 15 characters but currently it is accepting 10 characters only

In checkout_index_index.xml <item name=”validation” xsi:type=”array”> <item name=”min_text_length” xsi:type=”number”>10</item> <item name=”max_text_length_phone” xsi:type=”number”>15</item> <item name=”validate-number” xsi:type=”number”>0</item> </item> and then in vendor/magento/module_ui/view/base/web/js/lib/validation/rules.js “max_text_length_phone”: [ function (value, params) { return !_.isUndefined(value) && value.length <= +params; }, $.mage.__(‘Phone number cannot exceed 15 characters.’) ], the above code is for validation text and for adding regex as we require, so in… Continue reading Magento phone number should accept special character like (-) and should limit to 15 characters but currently it is accepting 10 characters only

magento 2 restrict phone number field in admin panel

You want to restrict phone number field and it should accept only 10 digits number then need to create custom validator addRule. I have created custom module with custom validator rule for make custom Phone Number validation. File path: magento/app/code/Vendor/PhonenumverValidation/registration.php <?php use MagentoFrameworkComponentComponentRegistrar; ComponentRegistrar::register(ComponentRegistrar::MODULE, ‘Vendor_PhonenumverValidation’, __DIR__); File path: magento/app/code/Vendor/PhonenumverValidation/etc/module.xml <?xml version=”1.0″?> <config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:Module/etc/module.xsd”> <module… Continue reading magento 2 restrict phone number field in admin panel

Magento2: How to create password protected cms page?

To make the cms pages, you have to use event/observer controller_action_predispatch_cms_page_view ON this event,fire an observer which will check current user is loggedin or not. If user is not loggedin this redirect to login page. events.xml define at app/code/{vendorname}/{ModuleName}/etc/frontend/ at code is like: <?xml version=”1.0″?> <config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:Event/etc/events.xsd”> <event name=”controller_action_predispatch_cms_page_view”> <observer name=”add_login_checker” instance=”{VendorName}{Modulename}ObserverRestrictCmsPage” /> </event> </config> Observer file RestrictCmsPage.php located at app/code/{vendorname}/{ModuleName}/Observer/ Observer code like… Continue reading Magento2: How to create password protected cms page?

SuiteCloud Development Framework (SDF) Key Features

The SuiteCloud Development Framework (SDF) is a powerful toolset within NetSuite that allows developers to build, deploy, and manage custom applications efficiently. It enhances the SuiteCloud platform by providing a structured approach to developing SuiteScript, SuiteTalk, and SuiteCommerce solutions, streamlining the development lifecycle. 1) Modular Architecture: SDF supports a modular approach to development, allowing developers… Continue reading SuiteCloud Development Framework (SDF) Key Features

NetSuite SuiteCommerce and the Importance of Data Privacy in E-commerce

In the digital age, data privacy has become a paramount concern for e-commerce businesses. With the increasing volume of online transactions, protecting customer data is not just a regulatory requirement but also a critical factor in maintaining customer trust and loyalty. NetSuite SuiteCommerce offers robust solutions to ensure data privacy and security, making it an… Continue reading NetSuite SuiteCommerce and the Importance of Data Privacy in E-commerce

Building a Scalable E-commerce Platform with NetSuite SuiteCommerce

In today’s fast-paced digital marketplace, scalability is a critical factor for the success of any e-commerce business. NetSuite SuiteCommerce offers a robust and flexible platform designed to support businesses as they grow and evolve. Here’s how SuiteCommerce can help you build a scalable e-commerce platform. 1. Unified Commerce Platform NetSuite SuiteCommerce provides a unified commerce… Continue reading Building a Scalable E-commerce Platform with NetSuite SuiteCommerce

The Future of Omnichannel Retail with SuiteCommerce

Omnichannel retail is evolving rapidly, and SuiteCommerce is at the forefront of this transformation. By seamlessly integrating online and offline channels, SuiteCommerce enables businesses to provide a unified shopping experience. Customers can enjoy consistent interactions whether they shop in-store, online, or via mobile devices. SuiteCommerce’s robust platform supports real-time inventory updates, personalized marketing, and efficient… Continue reading The Future of Omnichannel Retail with SuiteCommerce