Popup warning

issue: ACTEN-108915 - Popup warning




popup looks like this





1. Step
To add admin setting on shop account section , need to update ShopAccount.cs
 Sana.Commerce.Sdk\DomainModel\Shop\ShopAccount.cs




2. Step
by creating these field need to create 2 fields in DB >



3.Step

Create ExtendedShopAccountModel to map ShopAccount DB  Fields
we hide the versionMessageDate Field by display  = false 




4.Step
Register ExtendedShopAccountModel in Addon.cs

5.Step
Add admin setting text to Admin. resx


6.Step
by default Show Version Warning need to be ENABLE. so need to override  CreateGet() 
and register it adminarearegistration.cs






Now admin settings are completed.


7.Step
Create a new popup for this issue.




8. now when user go to the Product detail page of a product then  click add to cart button


when admin settings are  getting the cashing need to update






when click add to cart button popup need to be open

for that, we create an ajax call.




var showAddtoCartVersionPopup = function (type) {

            var data = getLines(type);
            if (data.length > 0) {
                return $.ajax({
                    url: Sana.Urls.Home() + 'Basket/IsShowVirsionPopup',
                    type: 'GET',
                    data: { IsPopupShow: "true" },
                    dataType: 'json',
                    success: function (data) {
                        if (data === "True") {
                            var popup = $('#SparePartVirstionPopup');
                            Sana.Popup.open('#SparePartVirstionPopup');
                            return;
                        }
                        else if (data === "False") {
                            addToBasket(type);
                        }                     
                    },
                    error: function (request, error) {
                        return;                     
                    }
                });
            }
        };



Then RegisterSystemRoutes on ExtendedBasketController




on Web.config we keep virsion woning date .

var VersionWarningDays = ConfigurationManager.AppSettings["VersionWarningDays"];




How to add Admin Setting to B2b B2c Sales agent Sana

How to add Simple Admin Setting Sana

Add drop-down field to Admin Section.

issue: HM-111029 - 3.4. REQUESTED DELIVERY DATE MADE MANDATORY





Steps to follow.

Step1.

Create 3 settings under Extend website settings 







Step2.
Register ExtendedWebsiteSettings in Framework Initializer

Step 3.
For this section need to extend OrderPlacementSettingsModel



Step 4.
Register the new OrderPlacementSettingsModel under Addon.cs

Step 5.
Now we need to join those 2 models to ApplyChanges and Initialize





Step 6.

Now we need to add those setting in to 'OrderPlacementSettingsModel' view

6.1
we need to create a new dropdown like this.



we keep DeleveryDateOption vale and text separately





Show drop down  for all B2B, B2c, Sales agents sections

OrderPlacementSettingsModel




Now admin Settings are completed, now we need to use those admin settings values,

in OrderOverviewModel view page

we show /hide some section accoding to the value of those options





this how it  looks like on DB > setting table






------------------------------------------------------
How to  extend product import task

how to Call API

How to add seperate menu section in admin setting
:AdminMenuInitializer.cs
ExtendedStoreBasicsController
AdminAreaRegistration : register store base
create new view under
~/Areas/Admin/Views/Default/StoreBasics/SmartRecruterSettings.cshtml



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

ActronAir 108915