Wednesday, April 28, 2021

Aimeos for Ecommerce

Aimeos is a laravel ecommerce package. To Learn about their setup and installation,

 https://github.com/aimeos/aimeos-laravel#setup

 https://laravel.com/docs/6.x/authentication#included-authenticating

https://laravel-vuejs.com/aimeos-laravel-e-commerce-online-shops-b2b-and-gigacommerce/

 

https://websolutionstuff.com/post/how-to-generate-barcode-in-laravel

Monday, April 12, 2021

Useful SQL queries to query the DB

---------------------------------------------------------------------------
Command to get collation for each columns of a table
---------------------------------------------------------------------------- 
SELECT TABLE_SCHEMA 
    , TABLE_NAME 
    , COLUMN_NAME 
    , COLLATION_NAME 
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 't_name';
-------------------------------------------------------------------------
 Display table with a particular column name
--------------------------------------------------------------------------
SELECT
*
FROM
information_schema.columns
WHERE
column_name = 'column_name';
OR
SELECT
*
FROM
information_schema.columns
WHERE
column_name LIKE '%column_name%';


Thursday, April 8, 2021

Websites that are helpful

Barcode Generator 

http://www.barcode-generator.org/#homeFAQ

study vuejs

 https://www.freecodecamp.org/news/build-a-portfolio-with-vuejs/

 To learn about Magento Module develpment

                https://mage2gen.com/

                https://www.koolreport.com

Laravel deployment to hostinger shared hosting

-----------------------------------------------------------------------------

https://www.youtube.com/watch?v=BHAdDFtgYo0

---------------------------------------------------------------------------------

For Website Themes
    - https://www.famethemes.com/themes/screenr/
    - bootswatch.com
    - softtheme.com-laravel templates
 

For Pictures

    unsplash.com

For Logo

    logomakr.com


                

Tuesday, April 6, 2021

Steps to create a module in Magento2

 1- Create a namespace folder inside app/code directory

    eg:- app/code/RB

2- Create a Module folder inside that namespace folder

    eg:- app/code/RB/Vendor

3- Create a registration.php file

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
	\Magento\Framework\Component\ComponentRegistrar::MODULE,
	'RB_Vendor',
	__DIR__
);

 

 eg:-  app/code/RB/Vendor/registration.php and add the following contents

4- Create etc/module.xml file

eg:-  app/code/RB/Vendor/etc/module.xml and add the following contents

        <?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="RB_Vendor" setup_version="1.0.0">
    </module>
</config>

5-Enable the module using the following command

        php bin/magento module:enable RB_Vendor

                    (or)

 6. To add the modules manually directly enter/write in the module in the below file
          app/etc/config.php as 'RB_Vendor' => 1, 
7. Check the module status using the command:     
            php bin/magento module:status 
8. Execute SUDO chmod -R 777 . , php bin/magento setup:upgrade, php bin/magento setup:static-content:deploy -f in order

-----------------------------------------------------------------------------------------------
Create a Route
---------------------------------------------------------------------------------------------
1) To add route, it is necessary to create routes.xml file

app/code/RB/Vendor/etc/frontend/routes.xml

2)Inside RB/Vendor/etc folder, there will be two folders

        i) frontend

        ii) adminhtml

since this is a frontend route, we added it in frontend/ folder else we need to add it to adminhtml/ folder

3)The content would be       

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route frontName="rb_vendor" id="rb_vendor">
            <module name="RB_Vendor"/>
        </route>
    </router>
</config>
 
4)  Route’s in magento are divided into 3 parts: Route frontname, controller and action as following example:
http://magento2.com/index.php/rb_vendor/controller/action
-----------------------------------------------------------------------------
               Create Controller 
---------------------------------------------------------------------------- 
1) In the folder app/code/RB/Vendor/Controller/Index/Test.php
where 'Test'is the class name  
 <?php
namespace RB\Vendor\Controller\Index;

class Test extends \Magento\Framework\App\Action\Action
{
	protected $_pageFactory;

	public function __construct(
		\Magento\Framework\App\Action\Context $context,
		\Magento\Framework\View\Result\PageFactory $pageFactory)
	{
		$this->_pageFactory = $pageFactory;
		return parent::__construct($context);
	}

	public function execute()
	{
		echo "Hello World";
		exit;
	}
}
 http://magento2.com/index.php/rb_vendor/Index/Test