EDITABLE ORDER TEMPLATES

Project: Colruyt
Ticket 70924: 4.3. EDITABLE ORDER TEMPLATES

HM-111036 - 3.9. SEARCH AND ADD PRODUCTS TO EXISTING TEMPLATES
Markis food Project

Project: Havric meats : 
HM-111036 - 3.9. SEARCH AND ADD PRODUCTS TO EXISTING TEMPLATES

Divercy
Ticket 79482: [Wave 2] 3.7.1. EDITABLE QUICK ORDERING TEMPLATES


set shop acc name to Create by field.
ExtendedRegisteredUserBasketStorage
public override void SaveBasket(ShopContext shopContext, IBasket basket)
        {
            basket.UserKey = GetBasketUserKey(shopContext);
            basket.ShopAccountType = shopContext.ShopAccount.Type;

            // Ticket 70924: 4.3. EDITABLE ORDER TEMPLATES
            ((Basket)basket).CreatedBy = shopContext.ShopAccount.Name;
 
            if (shopContext.ShopAccount.Type == ShopAccountType.Contact)
            {



used js files :- 
1. control.templateitem.js

2. control.ordertemplate.js

3. page.ordertemplatedetails.js
// Remove item/s form Template details page.
// When Click delete Order TemplateItem Popup's Ok button Call controller method.
// Show Order Template Popup
// New order template popup Save button click
// Clear all quantity box values.
// When user tries to enter '0' value to set to Empty.
// When user click  Add to cart button, MethodName: UpdateShoppingCart

4. page.ordertemplates.js
// Call Order Template Controller "TemplateDetail" method

5 control.quickorder.js
// When click add to template button add item line in to order template section
//Read exsisting qty
// update with previous qtys after click add to template button. 


Sana.Spinner.init(); //Use Quantity box buttons(+,-) initializeation

When need to reload the page 
// window.location.reload(true);


















Product Image download.

Ticket 71003: 4.3. RETRIEVE IMAGES AND DOCUMENTS FROM MARKET PLACE


some times some URLs are not downloading properly. following helps to download some 
so, Add "user-agent" to the http headers:

https://www.arclab.com/en/kb/csharp/download-file-from-internet-to-string-or-file.html

WebClient wc = new WebClient();
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;


issue 

mail template not working for other lanuages

need to update
folowing place and replace the file

D:\development\Bloomingwear2\@data\packages\LanguagePack_ar-SA.9.3.5.0\MailTemplates

addon customization


1
Get the correct addon version and download.
for this example, I use Charge Logic 

https://sanacommerce.visualstudio.com/Sana%20Add-ons/_git/EXT_PSP_ChargeLogic

1 set up the Project the following folder structure.


Add Addons Folder , Then add Downloaded Addon project

2. Then Build the Project ,

if you receive an attribute missing error. Add following attribute to configuration



you can find The PaymentModule Id from ChargeLogicConnectPaymentExtension

[PaymentModuleId("ChargeLogic")]
    public class ChargeLogicConnectPaymentExtension : PaymentExtension<CustomChargeLogicMethodsSettings>, IConfigurable<ChargeLogicConfiguration>
    {


3. Update the addone as following

This will show how to modify an addon
https://community.sana-commerce.com/docs/Guides/Extensions/how-to/payment-method-settings.html


4. Then Create a Package need to upload on Beta web shop.


To learn How to create new Addon:-

 https://community.sana-commerce.com/docs/Guides/Extensions/how-to/create-payment-extension.html