Tuesday, August 22, 2023

Building Your Online Store: Exploring Top Multi-Vendor Marketplaces for E-commerce Platforms

 Introduction

In the thriving realm of e-commerce, entrepreneurs are increasingly drawn to the concept of multi-vendor marketplaces to establish their online stores. These marketplaces allow multiple independent sellers to offer their products within a unified platform, creating a diverse shopping experience for consumers and a lucrative opportunity for sellers. In this article, we'll delve into some of the most popular multi-vendor marketplaces integrated with e-commerce platforms, empowering you to set up your very own online store with multi-vendor capabilities.

Shopify Marketplace:

Shopify, renowned for its robust e-commerce solutions, has ventured into the multi-vendor realm with Shopify Marketplace. Entrepreneurs can leverage this extension to transform their Shopify stores into multi-vendor platforms. By enabling third-party vendors to sell their products, Shopify Marketplace expands your product catalog while preserving the familiar Shopify interface. This integration offers convenience for both you as the store owner and the vendors, making it an ideal choice for those seeking flexibility and scalability.

WooCommerce with Dokan:

For WordPress enthusiasts, WooCommerce is a popular choice for building online stores. To transform your WooCommerce-based website into a multi-vendor marketplace, the Dokan plugin steps in. Dokan seamlessly integrates with WooCommerce, allowing vendors to create their own mini-stores within your larger platform. This user-friendly plugin empowers vendors to manage their products, orders, and inventory independently, while you retain control over the overall marketplace.

Magento Marketplace:

Magento, known for its flexibility and customization capabilities, offers the Magento Marketplace extension for those aiming to establish multi-vendor e-commerce platforms. This extension adds a suite of features necessary for vendors to set up shop within your Magento-based store. With tools for vendor management, product listings, and order processing, Magento Marketplace caters to businesses seeking a robust solution for larger-scale marketplaces.

OpenCart Multi-Vendor Marketplace:

OpenCart, renowned for its simplicity and user-friendly interface, has its own multi-vendor solution called OpenCart Multi-Vendor Marketplace. This extension allows you to transform your OpenCart store into a thriving multi-vendor platform. Vendors gain access to dedicated dashboards, inventory management, and order fulfillment tools, while you maintain control over commissions, product approvals, and other essential aspects.

PrestaShop with WC Marketplace:

PrestaShop users can turn to the WC Marketplace module to embrace the multi-vendor model. This extension seamlessly integrates with PrestaShop, equipping vendors with the tools to manage their products, orders, and shipping details. As the store owner, you can oversee the marketplace, set commission rates, and ensure a smooth shopping experience for customers.

Conclusion

In the dynamic world of e-commerce, the multi-vendor marketplace model has gained significant traction as businesses seek to create innovative and diverse online shopping experiences. The integration of popular e-commerce platforms with multi-vendor extensions empowers entrepreneurs to establish their own multi-vendor marketplaces with relative ease. Whether you opt for Shopify Marketplace, WooCommerce with Dokan, Magento Marketplace, OpenCart Multi-Vendor Marketplace, or PrestaShop with WC Marketplace, these solutions offer unique features that cater to different business needs and technical expertise levels.

As you embark on your journey to create an online store with multi-vendor capabilities, carefully consider your business goals, target audience, and the level of customization you require. Each platform and extension comes with its own set of features and benefits, ensuring that you can find the perfect fit for your entrepreneurial vision. With the power to unite sellers and customers on a single platform, multi-vendor marketplaces continue to reshape the e-commerce landscape in exciting and innovative ways.

Thursday, June 8, 2023

Search any value in full SQL database

 DECLARE @SearchStr nvarchar(100)

SET @SearchStr = '13DA19BA-FD37-6072-98E5-FF000022C5F7'

 

 

-- Tested on: SQL Server 7.0, SQL Server 2000, SQL Server 2005 and SQL Server 2010

-- Date modified: 08 June 2023 

--CREATE TABLE Results_search (ColumnName nvarchar(370), ColumnValue nvarchar(3630))

 

SET NOCOUNT ON

 

DECLARE @TableName nvarchar(256), @ColumnName nvarchar(128), @SearchStr2 nvarchar(110)

SET  @TableName = ''

SET @SearchStr2 = QUOTENAME('%' + @SearchStr + '%','''')

 

WHILE @TableName IS NOT NULL

 

BEGIN

    SET @ColumnName = ''

    SET @TableName = 

    (

        SELECT MIN(QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME))

        FROM     INFORMATION_SCHEMA.TABLES

        WHERE         TABLE_TYPE = 'BASE TABLE'

            AND    QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME) > @TableName

            AND    OBJECTPROPERTY(

                    OBJECT_ID(

                        QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME)

                         ), 'IsMSShipped'

                           ) = 0

    )

 

    WHILE (@TableName IS NOT NULL) AND (@ColumnName IS NOT NULL)

         

    BEGIN

        SET @ColumnName =

        (

            SELECT MIN(QUOTENAME(COLUMN_NAME))

            FROM     INFORMATION_SCHEMA.COLUMNS

            WHERE         TABLE_SCHEMA    = PARSENAME(@TableName, 2)

                AND    TABLE_NAME    = PARSENAME(@TableName, 1)

                AND    DATA_TYPE IN ('char', 'varchar', 'nchar', 'nvarchar', 'int', 'decimal')

                AND    QUOTENAME(COLUMN_NAME) > @ColumnName

        )

 

        IF @ColumnName IS NOT NULL

         

        BEGIN

            INSERT INTO Results_search

            EXEC

            (

                'SELECT ''' + @TableName + '.' + @ColumnName + ''', LEFT(' + @ColumnName + ', 3630) FROM ' + @TableName + ' (NOLOCK) ' +

                ' WHERE ' + @ColumnName + ' LIKE ' + @SearchStr2

            )

        END

    END   

END

Thursday, June 1, 2023

How to set up page redirection based on the visitor's country using Akamai?

 To set up page redirection based on the visitor's country using Akamai, you can follow these general steps:

 Step 1: Sign in to your Akamai Control Center

 Access the Akamai Control Center using your credentials.

Step 2: Configure Edge Redirector

 Navigate to the "Property Manager" section in the Akamai Control Center.

Select the property or domain for which you want to set up country-based redirection.

Click on the "Behaviors" tab.

Locate the "Edge Redirector" behavior and click on it to configure it.

Step 3: Add Rules for Country Redirection

In the Edge Redirector configuration, click on the "Add Behavior" button to create a new rule.

Set the rule criteria to target the visitor's country. This can be done using the "Edge Server Variable" option, where you can choose the visitor's country variable provided by Akamai.

Define the action for the rule, which is typically a page redirection. Specify the URL or path where you want visitors from the selected country to be redirected.

Save the rule.



Step 4: Test and Deploy

Test the configuration by accessing your website from different countries and verifying that the redirection behaves as expected.

Once you are satisfied with the configuration, deploy the changes in the Akamai Control Center to make them live.

Step 5: Monitor and Adjust

Monitor the redirection behavior and analyze any feedback or analytics data to ensure it is working as intended.

Make adjustments to the rules or configurations if needed based on user feedback or changes in business requirements.

It's important to note that the specific steps and options in Akamai's Control Center may vary depending on your account configuration and the services you have subscribed to. It's recommended to refer to Akamai's official documentation or consult with their support team for detailed, up-to-date instructions tailored to your specific setup.

Tealium integrations with Salesforce

 

Tealium offers two integrations with Salesforce: Tealium Salesforce Apex and Tealium Salesforce Connector. Here's a breakdown of the two: 

 

Tealium Salesforce Apex 

Tealium Salesforce Connector 

Server-side integration using Salesforce Apex programming language. 

Pre-built integration between Tealium and Salesforce. 

Allows you to send data collected in Tealium to Salesforce. 

Facilitates data exchange between the two platforms without custom code. 

Provides flexibility for custom data processing and business logic within Salesforce. 

Offers configuration options within Tealium's interface. 

Requires development resources to write and maintain Apex code. 

Simplifies the integration process and reduces development effort. 

 

In summary, Tealium Salesforce Apex is a server-side integration that involves writing custom code in Salesforce's Apex language, allowing for more advanced customization and control. Tealium Salesforce Connector, on the other hand, is a pre-built integration that offers a simplified configuration approach without requiring custom development. The choice between the two depends on your specific requirements, resources, and the level of customization you need for your Tealium and Salesforce integration. 

I would suggest utilizing the Tealium Salesforce Connector instead of opting for Tealium Salesforce Apex. The Connector offers a more straightforward and manageable solution with less complexity involved. 

Tuesday, January 26, 2016

Calculates the distance by Latitude and Longitude using C#

This routine calculates the distance between two points (given the latitude/longitude of those points). It is being used to calculate the distance between two locations.   
                                                                       
  Definitions                                                          
    South latitudes are negative, east longitudes are positive          
                                                                       
  Passed to function                                                  
    lat1, lon1 = Latitude and Longitude of point 1 (in decimal degrees)
    lat2, lon2 = Latitude and Longitude of point 2 (in decimal degrees)
    unit = the unit you desire for results                              
           where 'M' is statute miles (default)                        
                  'K' is kilometers                                    
                  'N' is nautical miles                                


using System;
private double distance(double lat1, double lon1, double lat2, double lon2, char unit) {
  double theta = lon1 - lon2;
  double dist = Math.Sin(deg2rad(lat1)) * Math.Sin(deg2rad(lat2)) + Math.Cos(deg2rad(lat1)) * Math.Cos(deg2rad(lat2)) * Math.Cos(deg2rad(theta));
  dist = Math.Acos(dist);
  dist = rad2deg(dist);
  dist = dist * 60 * 1.1515;
  if (unit == 'K') {
    dist = dist * 1.609344;
  } else if (unit == 'N') {
  dist = dist * 0.8684;
    }
  return (dist);
}
//This function converts decimal degrees to radians
private double deg2rad(double deg) {
  return (deg * Math.PI / 180.0);
}

//This function converts radians to decimal degrees
private double rad2deg(double rad) {
  return (rad / Math.PI * 180.0);
}
Console.WriteLine(distance(25.0814609,55.1258294,25.0445529,55.1181078, "M"));
Console.WriteLine(distance(25.0814609,55.1258294,25.0445529,55.1181078, "K"));
Console.WriteLine(distance(25.0814609,55.1258294,25.0445529,55.1181078, "N"));

Create JSON by Using SQL Server

Step 1:

Create stored procedure


Create PROCEDURE [dbo].[sp_GetJSONFromXML]
-- Add the parameters for the stored procedure here
@XMLData xml
AS
BEGIN
DECLARE @dataXML xml;
select @dataXML = @XMLData;
--select @Shopping;
SELECT Stuff(  
  (SELECT * from  
    (SELECT ',
    {'+  
      Stuff((SELECT ',"'+coalesce(b.c.value('local-name(.)', 'NVARCHAR(MAX)'),'')+'":"'+
                    replace(b.c.value('text()[1]','NVARCHAR(MAX)'),'"','''') +'"'
               
             from x.a.nodes('*') b(c)  
             for xml path(''),TYPE).value('(./text())[1]','NVARCHAR(MAX)')
        ,1,1,'')+'}' 
   from @dataXML.nodes('/root/*') x(a)  
   ) JSON(theLine)  
  for xml path(''),TYPE).value('.','NVARCHAR(MAX)' )
,1,1,'')
END

Step # 2:
Create a table and insert some records in it.


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblNames](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Name] [nvarchar](50) NULL,
[City] [nvarchar](50) NULL,
 CONSTRAINT [PK_tblNames] PRIMARY KEY CLUSTERED 
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET IDENTITY_INSERT [dbo].[tblNames] ON 

GO
INSERT [dbo].[tblNames] ([ID], [Name], [City]) VALUES (1, N'Rehan', N'Dubai')
GO
INSERT [dbo].[tblNames] ([ID], [Name], [City]) VALUES (2, N'Wasti', N'Dubai')
GO
INSERT [dbo].[tblNames] ([ID], [Name], [City]) VALUES (3, N'Imran', N'Dubai')
GO
INSERT [dbo].[tblNames] ([ID], [Name], [City]) VALUES (4, N'Salman', N'Abu Dhabi')
GO
INSERT [dbo].[tblNames] ([ID], [Name], [City]) VALUES (5, N'Kashif', N'Abu Dhani')
GO
INSERT [dbo].[tblNames] ([ID], [Name], [City]) VALUES (6, N'Asad', N'Sharjah')
GO
SET IDENTITY_INSERT [dbo].[tblNames] OFF
GO

Step # 3:
Execute SQL query:

Run these group of sql queries:

DECLARE @myXML xml;
select @myXML = (select * from tblnames FOR XML path, root)
exec sp_GetJSONFromXML @myXML;


You'll get Json Values:


Use this results in [ ]
Like:

 [{"ID":"1","Name":"Rehan","City":"Dubai"},
    {"ID":"2","Name":"Wasti","City":"Dubai"},
    {"ID":"3","Name":"Imran","City":"Dubai"},
    {"ID":"4","Name":"Salman","City":"Abu Dhabi"},
    {"ID":"5","Name":"Kashif","City":"Abu Dhani"},
    {"ID":"6","Name":"Asad","City":"Sharjah"}]