Gia Phu Group Co Ltd

Gia Phu Group Co Ltd Contact information, map and directions, contact form, opening hours, services, ratings, photos, videos and announcements from Gia Phu Group Co Ltd, 130 Nguyen Thai Binh Street, Hoa Minh Ward, Lien Chieu District, Da Nang.

https://currency.giaphugroup.com/This simple currency converter tool lets you easily convert between most of the popular...
15/06/2024

https://currency.giaphugroup.com/
This simple currency converter tool lets you easily convert between most of the popular global currencies using live exchange rates. The exchange rates are the latest, we use the mid-market rate for our converter tool.

31/03/2024

Công đoạn kiểm tra chất lượng sản phẩm trước khi đến tay người tiêu dùng 😍. Ứng dụng tra cứu điểm thi tốt nghiệp THPT quốc gia https://diemthi.giaphugroup.com/
Nghề lập trình viên kể cũng nhàn, ăn rồi ngồi phòng lạnh gõ bàn phím, mư ko đến mặt, nắng ko đến đầu. 🤣

09/12/2023

You can use this app here https://www.giaphugroup.com/resources.html

Hi Everybody, I am Cuong, Welcome back to my Magento 2 tutorial video series.

You are a Magento 2 developer, you are working on a project in your company, and the client requires you to create a new module in Magento 2, there are many steps for creating a new module, such as writing the codes to create a new table in the database, create the adminhtml route, menu, acl, model, collection, grid, CRUD,... and these steps will take you a lot of time to complete.

Today, I want to show everybody an app very nice, that it will help you to create a new basic Extension for Magento 2 fast. This app was created by me and published on the website giaphugroup.com.

Ok, let's go, follow me.

You need to access to the link https://www.giaphugroup.com/resources.html

let's use this app, you need to have an account here.

You can purchase my Magento 2 Extensions here https://www.giaphugroup.com/magento-2-extensions.html

29/11/2023

This app helps to create a new basic extension for Magento 2 fast. It will be generated automatically after some clicks. Then you can download and add it into your project.

https://www.giaphugroup.com/resources.html

Very nice PageSpeed Insights. 👍
22/11/2023

Very nice PageSpeed Insights. 👍

22/11/2023

Magento 2 Customer Avatar Extension
You can purchase this extension here https://www.giaphugroup.com/magento-2-customer-avatar-extension.html
This extension allows the customers to individualize their account. The customer avatar will be displayed near their name in the website’s header section, and on the Customers Reviews tab on the product detail page.

Why should you use the Customer Avatar Extension for Magento 2?

1. The Customer Avatar Extension for Magento 2 allows customers to individualize their account by uploading their avatar image on the Edit Account Information.
2. The avatar image will be displayed near in customer’s name on the website’s header section.
3. The avatar image will be displayed near in customer’s name on the customer reviews tab on the product page.
4. The customer can change the avatar on the edit account information page.
5. The administrator can modify or remove the avatar of a particular customer from the backend.
6. The customer avatar will be displayed on the customer’s list in the backend.

09/11/2023

This extension will help to upload the database files, media files, and system files in the Magento 2 path named var/backups to your Google Drive account automatically.

Why should you use the Google Drive Uploader for Magento 2?

Upload the database, media, and system files to Your Google Drive account automatically.
Send an email notification for tracking the backup files.
Auto-delete the backup files in Google Drive after some days, make sure your Google Drive storage won't be full.

You can purchase this extension here https://www.giaphugroup.com/magento-2-google-drive-uploader-extension.html

01/03/2023

Hi everybody, I am Cuong, Welcome back to my Magento 2 tutorial video series.

In the previous lessons, I showed you:
1. How to login as a customer in Magento 2, if you don't watch this video yet, you can watch it here http://bit.ly/3SF9OiX
2. How to lock a customer account in Magento 2, if you don't watch this video yet, you can watch it here http://bit.ly/3KO0EPm

Let's continue those series, today, I am going to show everybody a best practice, How to update a customer password from the backend in Magento 2.

As we know, Magento supports a feature that allows the administrator to reset a password for a particular customer from the backend by clicking on the "Reset Password" text link. Then Magento will require the users to generate a new password by accessing the link sent in their email.

However, a problem can arise if your customer wants you to send them a particular password for their account, or the customer account email temporarily can’t get emails. So how the customer can log into their customer account?

In this tutorial video, I am going to show you the best codes to change a customer password from the backend in Magento 2.

By default, Magento doesn't allow us to change the customer password directly on the customer form.

So what will we do in this practice?

1. We will create a new module called PHPCuong_CustomerPassword
2. We will add a new customer attribute called "New Password". This customer attribute only can be used from the adminhtml_customer form.
3. We will display this new customer attribute to the customer form on the backend, when the administrator sets the new customer password to this field and press the save button, it will update the customer password and the customer can use that password then.

Okay, let's go.

Let's do this practice, you need to follow the steps by step:

Step 1: Declaring a new module called PHPCuong_CustomerPassword
- Create the namespace PHPCuong in the path app\code.
- Create the module named CustomerPassword in the path app\code\PHPCuong.
- Create the file named registration.php in the path app\code\PHPCuong\CustomerPassword
- Create the file named module.xml in the path app\code\PHPCuong\CustomerPassword\etc

End of step #1, I have been completed codes to create a new module called PHPCuong_CustomerPassword.

Step 2: Adding a new customer attribute called "New Password"

- Create the new file named InstallData.php in the path app\code\PHPCuong\CustomerPassword\Setup

namespace PHPCuong\CustomerPassword\Setup;

use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Customer\Setup\CustomerSetupFactory;
use Magento\Eav\Model\Entity\Attribute\SetFactory as AttributeSetFactory;

/**
* Install Data
*/
class InstallData implements InstallDataInterface
{
/**
* CustomerSetupFactory
*/
private $customerSetupFactory;

/**
* AttributeSetFactory
*/
private $attributeSetFactory;

/**
* CustomerSetupFactory $customerSetupFactory
* AttributeSetFactory $attributeSetFactory
*/
public function __construct(
CustomerSetupFactory $customerSetupFactory,
AttributeSetFactory $attributeSetFactory
) {
$this->customerSetupFactory = $customerSetupFactory;
$this->attributeSetFactory = $attributeSetFactory;
}

/**
* {}
* (PHPMD.ExcessiveMethodLength)
*/
public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
/** CustomerSetup $customerSetup */
$customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

$customerEntity = $customerSetup->getEavConfig()->getEntityType(\Magento\Customer\Model\Customer::ENTITY);
$attributeSetId = $customerEntity->getDefaultAttributeSetId();

/** $attributeSet AttributeSet */
$attributeSet = $this->attributeSetFactory->create();
$attributeGroupId = $attributeSet->getDefaultGroupId($attributeSetId);

if (!$customerSetup->getAttributeId(\Magento\Customer\Model\Customer::ENTITY, 'phpcuong_customer_password')) {
$customerSetup->addAttribute(\Magento\Customer\Model\Customer::ENTITY, 'phpcuong_customer_password', [
'type' => 'varchar',
'label' => 'New Password',
'input' => 'text',
'frontend' => '',
'backend' => 'PHPCuong\CustomerPassword\Model\Attribute\Backend\Password',
'required' => false,
'visible' => true,
'user_defined' => true,
'sort_order' => 85,
'position' => 85,
'system' => 0,
'is_used_in_grid' => false,
'is_visible_in_grid' => false,
'is_html_allowed_on_front' => false,
'visible_on_front' => false
]);

$attribute = $customerSetup->getEavConfig()->getAttribute(
\Magento\Customer\Model\Customer::ENTITY, 'phpcuong_customer_password'
)->addData(
[
'attribute_set_id' => $attributeSetId,
'attribute_group_id' => $attributeGroupId,
'used_in_forms' => [
'adminhtml_customer'
]
]
);

$attribute->save();
}
}
}

- Create the new file named Password.php in the path app\code\PHPCuong\CustomerPassword\Model\Attribute\Backend

namespace PHPCuong\CustomerPassword\Model\Attribute\Backend;

use Magento\Framework\Exception\LocalizedException;

/**
* Customer password attribute backend
*/
class Password extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
{
/**
* Min password length
*/
const MIN_PASSWORD_LENGTH = 6;

/**
* Magento string lib
*
* \Magento\Framework\Stdlib\StringUtils
*/
protected $string;

/**
* \Magento\Framework\Stdlib\StringUtils $string
*/
public function __construct(\Magento\Framework\Stdlib\StringUtils $string)
{
$this->string = $string;
}

/**
* Special processing before attribute save:
* a) check some rules for password
* b) transform temporary attribute 'phpcuong_customer_password' into real attribute 'password_hash'
*
* \Magento\Framework\DataObject $object
* void
* \Magento\Framework\Exception\LocalizedException
*/
public function beforeSave($object)
{
$password = $object->getPhpcuongCustomerPassword();
$length = $this->string->strlen($password);
if ($length > 0) {
if ($length < self::MIN_PASSWORD_LENGTH) {
throw new LocalizedException(
__('Please enter a password with at least %1 characters.', self::MIN_PASSWORD_LENGTH)
);
}

if (trim($password) !== $password) {
throw new LocalizedException(__('The password can not begin or end with a space.'));
}

$object->setPasswordHash($object->hashPassword($password));
//$object->setPasswordRandom($password);
}
}

/**
* After attribute saved method
* Set the value to NULL
*
* \Magento\Framework\DataObject $object
* void
* (PHPMD.UnusedFormalParameter)
*
*/
public function afterSave($object)
{
if ($object->getPhpcuongCustomerPassword()) {
$object->setPhpcuongCustomerPassword(NULL);
$this->getAttribute()->getEntity()->saveAttribute($object, $this->getAttribute()->getAttributeCode());
}
}
}

Step 3: Displaying the customer password field to the customer form on the backend.
- Create the new file named customer_form.xml in the path app\code\PHPCuong\CustomerPassword\view\adminhtml\ui_component






PHPCuong_CustomerPassword/form/element/password
true
text
input






- Create the new file named password.html in the path app\code\PHPCuong\CustomerPassword\view\adminhtml\web\template\form\element



Step 4: Test and See the results

- Run the following command line: php bin/magento setup:upgrade
I used --keep-generated to not delete the folders in the generated, pub/static, var/view_preprocessed

- Go to the backend, try to edit a customer and update the customer password field and save.
- Go to the frontend, try to log into the customer account with the password just changed.

Yeah, it works perfectly.

We can hide the password by changing this

Thank you for watching my video. If you have any questions about this practice please feel free to leave a comment below.

Don't forget to like, comment, share and subscribe to my channel for getting the latest video.

Please do not hesitate to contact me if you need me to join your Magento project. My rate is $25/hour in Magento 1 and $30/hour in Magento 2.

17/05/2022

► Fanpage: https://www.facebook.com/giaphugroupcom/
► Subscribe to my channel: https://www.youtube.com/giaphugroupcom?sub_confirmation=1
► Skype: cuongnq87
► The website link: https://www.giaphugroup.com/magento-2-extensions.html


Hi everybody, I am Cuong, welcome back to my Magento 2 tutorial video series.

In the previous lesson, I showed everybody How to change the font and remove the background image of Captcha in Magento 2, if you don't watch this tutorial yet, you can watch it here https://bit.ly/38w8CM8.

Let's continue the previous lesson, today, I am going to share with everybody another practice. How to add the CAPTCHA to a customization form in Magento 2.

When you work for a Magento 2 Project, the client requires to add the CAPTCHA to a custom form. You don't know how to complete your task, you are searching for a good solution. Today, I will show you the best codes to complete your task.

Please help me to reach 10.000 subscribers by subscribing to my channel and sharing my videos.

We will add the CAPTCHA to the Orders and Returns form,
this is the Orders and Returns page, it is a default page is added by Magento 2 core. By default, Magento 2 doesn't allow us to show the CAPTCHA on this form.

So what will we do in this practice?

1. We will define the new form called "Orders and Returns Form" to the Forms list for applying from the backend.
2. We will override the template named "guest.form", it is used in the layout named sales_guest_form for adding the CAPTCHA.
3. We will use observer for validating CAPTCHA on this form.

Okay, let's go.

Let's do this practice, we will continue to use the module named PHPCuong_Captcha of the previous lesson. You need to follow steps by step:

Step 1: Declaring a new form called "Orders and Returns Form" to the Forms list
- Add the following codes to the config.xml available file.

Step 2: Add the CAPTCHA to the Orders and Returns Form

- Create the new file named sales_guest_form.xml in the path app\code\PHPCuong\Captcha\view\frontend\layout

- Create the new template file named form.phtml in the path app\code\PHPCuong\Captcha\view\frontend\templates\sales\guest

Step 3: Validate CAPTCHA on the Orders and Returns Form
- When this form is submitted, the post data will be sent to the URL sales/guest/view, so we need to use the controller predispatch event for validating CAPTCHA on this form. That is the action is called when submitting the Orders and Returns Form.
- Create the new file named events.xml in the path app\code\PHPCuong\Captcha\etc\frontend
- Create the new file named SalesGuestViewObserver.php in the path app\code\PHPCuong\Captcha\Observer

Step 4: Test and See the results
Run the command line following:
php bin/magento cache:clean

- Go to the backend and navigate to Stores - Settings - Configurations - Customers - Customer Configuration - CAPTCHA.
Choose the Orders and Returns Form in the list for applying.

- Go to the fronted and try to access the Orders and Returns page.

Yeah, it works perfectly.

Thank you for watching my video. If you have any questions about this practice please feel free to leave a comment below.

Don't forget to like, comment, share and subscribe to my channel for getting the latest video.

Please help me to reach 10.000 subscribers by subscribing to my channel and sharing my videos.

Please do not hesitate to contact me if you need me to join your Magento project. My rate is $30/hour in Magento 2.

Get the source codes of this tutorial here https://github.com/php-cuong/magento2-captcha

13/05/2022

► Fanpage: https://www.facebook.com/giaphugroupcom/
► Subscribe to my channel: https://www.youtube.com/giaphugroupcom?sub_confirmation=1
► Skype: cuongnq87
► The website link: https://www.giaphugroup.com/magento-2-extensions.html

Hi everybody, I am Cuong, welcome back to my Magento 2 tutorial video series.



In the previous lesson, I showed everybody How to add the category filter to product grid in Magento 2 Admin, if you don't watch this tutorial yet, you can watch it here https://bit.ly/3l746qe.

Let's continue my Magento 2 tutorial video series, today, I am going to share with everybody another practice. How to change the font and remove the background image of Captcha in Magento 2.

When you work for a Magento 2 Project, the client requires to change the font and remove the background image of captcha. You don't know how to complete your task, you are searching for a good solution. Today, I will show you the best codes to complete your task.

Please help me to reach 10.000 subscribers by subscribing to my channel and sharing my videos.

So what will we do in this practice?

1. We will create a new module called PHPCuong_Captcha.
2. We will add a new font called "courier".
3. We will remove the background image of CAPTCHA. By using these fields we will remove the background image of CAPTCHA

Okay, let's go.

Let's do this practice, you need to follow steps by step:

Step 1: Declaring a new module called PHPCuong_Captcha
- Create the namespace PHPCuong in the path app\code.
- Create the module named Captcha in the path app\code\PHPCuong.
- Create the file named registration.php in the path app\code\PHPCuong\Captcha

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'PHPCuong_Captcha',
__DIR__
);

- Create the file named module.xml in the path app\code\PHPCuong\Captcha\etc

End of step #1, I have been completed the codes to create a new module called PHPCuong_Captcha.

Step 2: Add a new font called Courier to the fonts list
- We need to add the new font to that list, so the administrator can change the font from the backend.
- We will use the Plugin feature in Magento 2 to add the new font to the fonts list.
- Create the new file named di.xml in the path app\code\PHPCuong\Captcha\etc
- Create the new file named Data.php in the path app\code\PHPCuong\Captcha\Plugin\Magento\Captcha\Helper
- The new font called "Courier"
You need to download the file named COURIER.ttf from Google. You can search this font there.
I had this font on my locally.

Step 3: Remove the background image of CAPTCHA
- Define the new fields in the configuration: Dot Noise Level and Line Noise Level, these fields help to save the value of Dot and Line from the backend. That is it.
- Create the new file named system.xml in the path app\code\PHPCuong\Captcha\etc\adminhtml

- Set the default value for the fields named Dot Noise Level and Line Noise Level. Create the new file named config.xml in the path app\code\PHPCuong\Captcha\etc

- Remove the backgound image of CAPTCHA, we need to override the \Magento\Captcha\Model\DefaultModel class, set the DotNoiseLevel and LineNoiseLevel from the __construct.

- Add the following codes to the di.xml file.

- Create the new file named DefaultModel.php in the path app\code\PHPCuong\Captcha\Override\Magento\Captcha\Model

- We get the value of Dot and Line from the backend, and set them in the __construct.

Step 4: Test and See the results
Run the command line following:
php bin/magento setup:upgrade --keep-generated

- Go to the backend and navigate to Stores - Settings - Configurations - Customers - Customer Configuration - CAPTCHA.
- Go to the fronted and try to access the customer register page.

Yeah, it works perfectly.

Haha! the customer can not see any letters when we change to 100 =)).

You can see the captcha images in this path. That is it.

Thank you for watching my video. If you have any questions about this practice please feel free to leave a comment below.

Don't forget to like, comment, share and subscribe to my channel for getting the latest video.

Please help me to reach 10.000 subscribers by subscribing to my channel and sharing my videos.

Please do not hesitate to contact me if you need me to join your Magento project. My rate is $35/hour in Magento 2.

Get the source codes of this tutorial here https://github.com/php-cuong/magento2-captcha

10/05/2022

► Fanpage: https://www.facebook.com/giaphugroupcom/
► Subscribe to my channel: https://www.youtube.com/giaphugroupcom?sub_confirmation=1
► Skype: cuongnq87
► The website link: https://www.giaphugroup.com/magento-2-extensions.html

Hi everybody, I am Cuong, welcome back to my Magento 2 tutorial video series.



I was busy with some big projects. So I didn't make more Magento 2 tutorial videos after March 2021. From May 2022, I will try to post 2 videos to this channel each week. Please continue to follow my channel and share my videos with your friends to help me to reach 10.000 subscribers.

Today's lesson, How to add the category filter to product grid in Magento 2 Admin.

When you work for a Magento 2 Project, the client requires to add the category filter to product grid in Magento 2 admin. You don't know how to complete your task, you are searching for a good solution. Today I show you the best codes to complete your task.

Please help me to reach 10.000 subscribers by subscribing to my channel and sharing my videos.

So what will we do in this practice?

1. We will create a new module called PHPCuong_CatalogSearch.
2. We will add a new field called Categories in the filters section that allows filtering products by this field.
3. We will add a new column called Categories to the product grid in Magento 2 admin.

Okay, let's go.

Let's do this practice, you need to follow steps by step:

Step 1: Declaring a new module called PHPCuong_CatalogSearch
- Create the namespace PHPCuong in the path app\code.
- Create the module named CatalogSearch in the path app\code\PHPCuong.
- Create the file named registration.php in the path app\code\PHPCuong\CatalogSearch

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'PHPCuong_CatalogSearch',
__DIR__
);

- Create the file named module.xml in the path app\code\PHPCuong\CatalogSearch\etc

End of step #1, I have been completed the codes to create a new module called PHPCuong_CatalogSearch.

Step 2: Add a new field called Categories in the filters section and the Categories column in the product grid

- Create the new file named product_listing.xml in the path app\code\PHPCuong\CatalogSearch\view\adminhtml\ui_component

- Create the new file named Options.php app\code\PHPCuong\CatalogSearch\Ui\Component\Product\Form\Categories

- Create the new file named Category.php in the path app\code\PHPCuong\CatalogSearch\Ui\Component\Listing\Column

Step 3: Apply the category id to filters
- We need to override the function named addFilter
- Create the new file named di.xml in the path app\code\PHPCuong\CatalogSearch\etc\adminhtml

- Create the new file named ProductDataProvider.php in the path app\code\PHPCuong\CatalogSearch\Override\Magento\Catalog\Ui\DataProvider\Product

Step 4: Test and See the results
Run the command line following:
php bin/magento setup:upgrade --keep-generated

- Go to the backend and navigate to Catalog - Products.

We try to remove the default category.

Yeah, it works perfectly.

Thank you for watching my video. If you have any questions about this practice please feel free to leave a comment below.

Don't forget to like, comment, share and subscribe to my channel for getting the latest video.

Please help me to reach 10.000 subscribers by subscribing to my channel and sharing my videos.

Please do not hesitate to contact me if you need me to join your Magento project. My rate is $35/hour in Magento 2.

You can download the source codes of this tutorial here https://github.com/php-cuong/magento2-category-filter

Address

130 Nguyen Thai Binh Street, Hoa Minh Ward, Lien Chieu District
Da Nang
555700

Alerts

Be the first to know and let us send you an email when Gia Phu Group Co Ltd posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Contact The Business

Send a message to Gia Phu Group Co Ltd:

Share