Add Field to Requst Respons



GetProducts Req :- ExtendedProductProvider : GetProducts,
GetProducts Res :

2
CreateShippingAddress Req : ExtendedAddressProvider >CreateShippingAddress> ExtendedXmlHelper
CreateShippingAddress Res : ,

5
GetBalanceInfo Req : ExtendedCustomerProvider > GetBalanceInfo.
GetBalanceInfo Res : 

7
GetCustomerByContact Req :
GetCustomerByContact Res : ExtendedCustomerXmlParser>ParseCustomer

8
GetCustomers Req :
GetCustomers Res : ExtendedCustomerXmlParser>ParseCustomer

9
Getorder Req :  ExtendedOrderProvider  > CreateOrderListRequest
Getorder Req :


Saveorder Req : ExtendedOrderProvider > CreateSaveOrderRequest,  
Saveorder  Respond :- 

-----
4
GetAnonymousCustomer Req    CustomerProvider > 
GetAnonymousCustomer Res : ExtendedCustomerXmlParser  > ParseCustomer ???

if extra field : 

6
GetColors 

10
GetPriceInfo Req :-
GetPriceInfo Res 

11
GetProducts req  ExtendedProductProvider  > GetProducts
GetProducts res 

12
GetProductSalesAgreementLines

13
CalculateBasket Req: orderprovider >CalculateBasket >  CreateBasketRequest
Response : OrderXmlParser > ParseBasket



Example :
SFS-113783 - 3.4. SAP ENVIRONMENTS & MULTIPLE DIVISIONS
JLAW 110853


CalculateBasket 
3.1. DELIVERY BASED ON ERP FACTORY CALENDARS


Get product from DB and API/ERP



DB
var loadOptions = ObjectFactory.Create<IProductLoadOptions>();
 var product = CommerceFrameworkBase.Products.GetProduct(line.ProductId, options);



API
var product = ShopApi.Catalog.GetProduct(line.ProductId);



DB
protected virtual IList<IProduct> GetProducts(IList<string> productIds)
        {
            var options = CreateLoadOptions();
            return CommerceFrameworkBase.Products.GetProductsByIdList(productIds, options);
        }

        /// <summary>
        /// Creates the load options for getting products' general info.
        /// </summary>
        /// <returns>Load options.</returns>
        protected virtual IProductLoadOptions CreateLoadOptions()
        {
            var loadOptions = ObjectFactory.Create<IProductLoadOptions>();
            loadOptions.LoadRelatedSkus = true;
            loadOptions.VisibleOnly = false;
            loadOptions.CalculateInventory = false;
            loadOptions.CalculatePrices = false;
            loadOptions.CalculateSkuInventory = false;
            loadOptions.CalculateSkuPrices = false;
            loadOptions.LoadImages = false;
            return loadOptions;
        }

Add Theme

STC-106269 - 3.1. INFORMATION MESSAGE ON ORDERING BEYOND AVAILABILITY





Update XML field (Insert,Update,Delete)

select Xml field 
  SELECT id,Fields, Fields.value('(/FieldsDictionary/field[@name="ShowVersionWarning"]/boolean/text())[1]', 'varchar(50)') AS DontDisplayVersionWarningMessage
FROM [dbo].[ShopAccounts]


 update [dbo].[ShopAccounts]
 SET Fields.modify('insert <field name="ShowVersionWarning" type="System.Boolean, mscorlib">
    <boolean>true</boolean>  </field> into (/FieldsDictionary[1])')
 update [dbo].[ShopAccounts]
 SET Fields.modify('insert <field name="VersionWarningStartDate" type="System.DateTime, mscorlib">
    <dateTime>2018-07-02T12:31:18.8564092+05:30</dateTime>
  </field> into (/FieldsDictionary[1])')
 update [dbo].[ShopAccounts]
 SET Fields.modify('insert <field name="DontDisplayVersionWarningMessage" type="System.Boolean, mscorlib">
    <boolean>false</boolean>
  </field> into (/FieldsDictionary[1])')


Delete

UPDATE [dbo].[ShopAccounts] 
SET Fields.modify('delete /FieldsDictionary/field[@name="ShowVersionWarning"][1]')
UPDATE [dbo].[ShopAccounts] 
SET Fields.modify('delete /FieldsDictionary/field[@name="VersionWarningStartDate"][1]')

update exsisting data

UPDATE [dbo].[ShopAccounts] 
SET Fields.modify('replace value of (/FieldsDictionary/field[@name="ShowVersionWarning"]/boolean/text())[1] with "true"')
where email ='accounts@atmosphereair.net.au'
select where 
SELECT id,Fields, Fields.value('(/FieldsDictionary/field[@name="ShowVersionWarning"]/boolean/text())[1]', 'varchar(50)') AS DontDisplayVersionWarningMessage
FROM [dbo].[ShopAccounts]
where Fields.value('(/FieldsDictionary/field[@name="ShowVersionWarning"]/boolean/text())[1]', 'varchar(50)') <>''

Get Product ERP request

Get Product

<?xml version="1.0"?>
<Request>
  <Operation>GetProducts</Operation>
  <Params>
    <VisibleOnly>1</VisibleOnly>
    <LoadRelatedSkus>1</LoadRelatedSkus>
    <LoadVisibilityRules>1</LoadVisibilityRules>
    <CalculatePrices>1</CalculatePrices>
    <CalculateInventory>1</CalculateInventory>
    <CalculateSkuPrices>1</CalculateSkuPrices>
    <CalculateSkuInventory>1</CalculateSkuInventory>
    <CheckStock>1</CheckStock>
    <AccountId></AccountId>
    <AccountType>Customer</AccountType>
    <MultiCurrency>1</MultiCurrency>
    <PageIndex>0</PageIndex>
    <PageSize>5</PageSize>
    <SortField>Id</SortField>
    <SortAscending>1</SortAscending>
    <Filter>
      <for field="Id">
        <Equal>1810000017 </Equal>        
      </for>
    </Filter>
    <ExtraFields>      
    </ExtraFields>
    <WebsiteId>SanaStore</WebsiteId>
  </Params>
</Request>

Get Logged in Customer

#region Get Customer

                    var accountId = CommerceFrameworkBase.Context.AccountId;
                    var accountType = ShopContext.GetCurrent().ShopAccount.Type;

                    ICustomerProfile customer = null;
                    if (accountType == ShopAccountType.Contact)
                        customer = CommerceFrameworkBase.Customers.GetCustomerByContact(accountId);
                    else if (!String.IsNullOrEmpty(accountId) && ((accountType == ShopAccountType.Customer) || (accountType == ShopAccountType.SalesAgent && ShopContext.GetCurrent().IsImpersonating)))
                        customer = CommerceFrameworkBase.Customers.GetCustomer(accountId);
                    #endregion

NEWSLETTER SUBSCRIPTIONS ,SHIPPING COST ,SHIPPING CALCULATION


Mail Settings


SW-103751 - 1.8. CONNECT WITH SPOTLER FOR NEWSLETTER SUBSCRIPTIONS (26)




















SW-103755 - 1.11. SB – SHIPPING COST IN SHOPPING CART SUMMARY (22), THE MOUSE-OVER CART (24), AND THE CHECKOUT RIGHT COLUMN SUMMARY (23)'














STC-106270 - 3.2. SHIPPING CALCULATION METHOD BY WEIGHT AND ORDER TOTAL



Ticket 106367: Freight charges query (Federal merchent project)

to add item to drop down update UOMDependantProvider : FixedProviderBase


Page.shipping-method.js







AVON project also did similre customization