Update and new files for karenderia mobileapp version 2 (1.5.5)

Modules

Updated files

  1. components/itemWrapper.php
  2. controllers/ApiController.php
  3. Mobileappv2Module.php

Updated files

  1. www/css/app.css
  2. www/js/app.js
  3. www/js/template.js
  4. index.html
  5. config.xml
  6. package.json
  7. package_android.json
  8. package_ios.json

Update KMRS with new merchant settings

  1. Update the file views/merchant/settings.php with this click here to get the code
  2. open the file components/ajaxadmin.php in function merchantSettings()
    before this line
    
    $this->code=1;
    $this->msg=Yii::t("default","Settings saved.");
    
    add this
    
    Yii::app()->functions->updateOption("tracking_estimation_delivery1",
    isset($this->data['tracking_estimation_delivery1'])?(integer)$this->data['tracking_estimation_delivery1']:0
    ,$merchant_id);  
    
    Yii::app()->functions->updateOption("tracking_estimation_delivery2",
    isset($this->data['tracking_estimation_delivery2'])?(integer)$this->data['tracking_estimation_delivery2']:0
    ,$merchant_id);  
    
    Yii::app()->functions->updateOption("tracking_estimation_pickup1",
    isset($this->data['tracking_estimation_pickup1'])?(integer)$this->data['tracking_estimation_pickup1']:0
    ,$merchant_id);  
    
    Yii::app()->functions->updateOption("tracking_estimation_pickup2",
    isset($this->data['tracking_estimation_pickup2'])?(integer)$this->data['tracking_estimation_pickup2']:0
    ,$merchant_id);  
    
    Yii::app()->functions->updateOption("tracking_estimation_dinein1",
    isset($this->data['tracking_estimation_dinein1'])?(integer)$this->data['tracking_estimation_dinein1']:0
    ,$merchant_id);  
    
    Yii::app()->functions->updateOption("tracking_estimation_dinein2",
    isset($this->data['tracking_estimation_dinein2'])?(integer)$this->data['tracking_estimation_dinein2']:0
    ,$merchant_id);  
    
  3. same file ajaxadmin.php function merchantSettings() add the close_store after the line
    'delivery_distance_covered'=>isset($this->data['merchant_delivery_miles'])?(float)$this->data['merchant_delivery_miles']:0,
    
    add
    
    'close_store'=>isset($this->data['merchant_close_store'])?1:0
    
    
    full code
    
    $params=array(
      'delivery_charges'=>is_numeric($this->data['merchant_delivery_charges'])?$this->data['merchant_delivery_charges']:0,
      'minimum_order'=>is_numeric($this->data['merchant_minimum_order'])?$this->data['merchant_minimum_order']:0,
      'delivery_minimum_order'=>is_numeric($this->data['merchant_minimum_order'])?$this->data['merchant_minimum_order']:0,
      'delivery_maximum_order'=>is_numeric($this->data['merchant_maximum_order'])?$this->data['merchant_maximum_order']:0,
      'pickup_minimum_order'=>is_numeric($this->data['merchant_minimum_order_pickup'])?$this->data['merchant_minimum_order_pickup']:0,
      'pickup_maximum_order'=>is_numeric($this->data['merchant_maximum_order_pickup'])?$this->data['merchant_maximum_order_pickup']:0,
      'logo'=>isset($this->data['photo'])?$this->data['photo']:'',
      'delivery_estimation'=>isset($this->data['merchant_delivery_estimation'])?$this->data['merchant_delivery_estimation']:'',	    	  
      'distance_unit'=>isset($this->data['merchant_distance_type'])?$this->data['merchant_distance_type']:'',
      'delivery_distance_covered'=>isset($this->data['merchant_delivery_miles'])?(float)$this->data['merchant_delivery_miles']:0,
      'close_store'=>isset($this->data['merchant_close_store'])?1:0
    );	    	
    
    

Update your Karenderia main.php

open the file protected/config/main.php under the array noCsrfValidationRoutes add

'mobileappv2/razorpay/verify'

full example

 'noCsrfValidationRoutes'=>array(	            
    'ajaxadmin/uploadFile',
    'ajaxmerchant/uploadFile',
    'ajaxmerchant/MultipleUploadFile',
    'ajax/UploadProfile',
    'ajax/UploadDeposit',
    'mobileapp/ajax/upload',
    'singlemerchant/api',	            
    'driver/ajax/uploadprofilephoto',
    'driver/ajax/uploadCertificate',
    'exportmanager/ajax/importMerchant',
    'mobileapp/api',	
    'merchantapp/api',
    'driver/api',
    'store/voginit',
    'store/vognotify',
    'store/vogsuccess',
    'store/voguepaynotify',
    'store/voguepaysuccess',
    'store/voguepayfailed',
    'store/merchantsignup',
    'stripe/webhooks',
    'merchant/vogsuccess',
    'admin/merchantAddBulk',
    'mobileapp/voguepay',
    'mobileapp/braintree',
    'store/epaybg',
    'store/mollie_webhook',
    'singlemerchant/ajax/upload',
    'singlemerchant/voguepay',
    'singlemerchant/braintree',                
	'mobileappv2/api', 
	'mobileappv2/voguepay',
	'mobileappv2/braintree',
	'mobileappv2/ajax/uploadFile',
	'inventory/upload',
	'singlemerchant/payu',
	'store/payuinit',
	'merchant/payuinit',
	'mobileappv2/payu',
	'merchantappv2/api',				                
    'merchantappv2/ajax/uploadFile',
    'merchantappv2/ajax/uploadFile2',
    'merchantappv2/api/UploadFile',
    'driver/ajax/uploadjsonAccount',
    'driver/api/updateDriverLocation',
    'mobileappv2/razorpay/verify'