Version Notes
Fixes:-
We have implanted the functionality of shipping and billing address.
Price functionality updated.
Minor bug fixes.
Download this release
Release Info
Developer | mss |
Extension | Mss_Connector |
Version | 2.5.0 |
Comparing to | |
See all releases |
Code changes from version 2.4.9 to 2.5.0
- app/code/local/Mss/Connector/Helper/Data.php +31 -4
- app/code/local/Mss/Connector/controllers/CartController.php +189 -140
- app/code/local/Mss/Connector/controllers/CustomerController.php +49 -63
- app/code/local/Mss/Connector/controllers/IndexController.php +5 -6
- app/code/local/Mss/Connector/controllers/ProductsController.php +358 -433
- app/code/local/Mss/Connector/controllers/TokenController.php +1 -0
- app/code/local/Mss/Connector/etc/config.xml +1 -1
- app/code/local/Mss/Payu/controllers/IndexController.php +1 -1
- app/code/local/Mss/Pushnotification/Helper/Data.php +2 -3
- package.xml +10 -14
app/code/local/Mss/Connector/Helper/Data.php
CHANGED
@@ -143,9 +143,15 @@ class Mss_Connector_Helper_Data extends Mage_Core_Helper_Abstract
|
|
143 |
public function saveCc($data){
|
144 |
|
145 |
$data['user_id'] = Mage::getSingleton("customer/session")->getId();
|
146 |
-
|
147 |
$collection = Mage::getModel("connector/connector");
|
|
|
|
|
|
|
|
|
|
|
148 |
try{
|
|
|
|
|
149 |
$collection->setData($data)->save();
|
150 |
return true;
|
151 |
}
|
@@ -207,9 +213,9 @@ class Mss_Connector_Helper_Data extends Mage_Core_Helper_Abstract
|
|
207 |
public function getSpecialPriceByProductId($productId)
|
208 |
{
|
209 |
$product = Mage::getModel('catalog/product')->load($productId);
|
210 |
-
$specialprice = $product->
|
211 |
-
$specialPriceFromDate = $product->
|
212 |
-
$specialPriceToDate = $product->
|
213 |
|
214 |
$today = time();
|
215 |
|
@@ -243,4 +249,25 @@ class Mss_Connector_Helper_Data extends Mage_Core_Helper_Abstract
|
|
243 |
|
244 |
|
245 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
}
|
143 |
public function saveCc($data){
|
144 |
|
145 |
$data['user_id'] = Mage::getSingleton("customer/session")->getId();
|
|
|
146 |
$collection = Mage::getModel("connector/connector");
|
147 |
+
if($collection->getCollection()
|
148 |
+
->addFieldToFilter('cc_number',array('eq'=>$data['cc_number']))):
|
149 |
+
return true;
|
150 |
+
endif;
|
151 |
+
|
152 |
try{
|
153 |
+
|
154 |
+
|
155 |
$collection->setData($data)->save();
|
156 |
return true;
|
157 |
}
|
213 |
public function getSpecialPriceByProductId($productId)
|
214 |
{
|
215 |
$product = Mage::getModel('catalog/product')->load($productId);
|
216 |
+
$specialprice = $product->getData('special_price');
|
217 |
+
$specialPriceFromDate = $product->getData('special_from_date');
|
218 |
+
$specialPriceToDate = $product->getData('special_to_date');
|
219 |
|
220 |
$today = time();
|
221 |
|
249 |
|
250 |
|
251 |
}
|
252 |
+
|
253 |
+
public function getSpecialPriceProduct($productId)
|
254 |
+
{
|
255 |
+
$product = Mage::getModel('catalog/product')->load($productId);
|
256 |
+
$baseCurrency = Mage::app ()->getStore ()->getBaseCurrency ()->getCode ();
|
257 |
+
$currentCurrency = Mage::app()->getFrontController()->getRequest()->getHeader('currency');
|
258 |
+
|
259 |
+
|
260 |
+
$specialprice =$this->getSpecialPriceByProductId($productId);
|
261 |
+
$final_price_with_tax = Mage::helper ( 'directory' )
|
262 |
+
->currencyConvert (
|
263 |
+
Mage::helper('tax')->getPrice($product, $product->getData('final_price'),
|
264 |
+
true, null, null, null, null, false),
|
265 |
+
$baseCurrency, $currentCurrency );
|
266 |
+
|
267 |
+
if($specialprice >= $final_price_with_tax):
|
268 |
+
return $final_price_with_tax;
|
269 |
+
else:
|
270 |
+
return $specialprice;
|
271 |
+
endif;
|
272 |
+
}
|
273 |
}
|
app/code/local/Mss/Connector/controllers/CartController.php
CHANGED
@@ -39,12 +39,15 @@ class Mss_Connector_CartController extends Mage_Core_Controller_Front_Action {
|
|
39 |
echo "{'summarycount':'" . $summarycount . "'}";
|
40 |
}
|
41 |
|
42 |
-
|
|
|
|
|
|
|
43 |
$data = $this->getRequest()->getParams();
|
|
|
44 |
$cart_data = json_decode($data['cart_data'],1);
|
45 |
-
|
46 |
foreach ($cart_data['items'] as $key => $value) {
|
47 |
-
|
48 |
if($value['custom_image_name']) {
|
49 |
$datas = base64_decode($value['custom_image']);
|
50 |
file_put_contents(Mage::getBaseDir().'/tmp/'.$cart_data['custom_image_name'], $datas);
|
@@ -54,25 +57,28 @@ class Mss_Connector_CartController extends Mage_Core_Controller_Front_Action {
|
|
54 |
$value['uenc']='aHR0cDovL21hc3RlcnNvZnR3YXJldGVjaG5vbG9naWVzLmNvbS9tbXNfZGV2ZWxvcG1lbnQvZGVmYXVsdC90ZXN0LXByb2R1Y3QuaHRtbA';
|
55 |
}
|
56 |
}
|
57 |
-
/*if(!sizeof($value)):
|
58 |
-
echo json_encode(array('status'=>'error','message'=> $this->__('Nothing to add in cart, cart is empty.')));
|
59 |
-
exit;
|
60 |
-
endif;
|
61 |
-
*/
|
62 |
-
$cart = Mage::helper ( 'checkout/cart' )->getCart ();
|
63 |
-
$cart->truncate();
|
64 |
-
|
65 |
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
|
|
|
|
71 |
|
|
|
72 |
try {
|
73 |
-
|
74 |
-
|
75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
if ($product->getData('has_options')):
|
78 |
# validate options
|
@@ -81,10 +87,9 @@ class Mss_Connector_CartController extends Mage_Core_Controller_Front_Action {
|
|
81 |
$params['options']=$options;
|
82 |
endif;
|
83 |
endif;
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
if(isset($params['options'])):
|
88 |
$data = array("product"=>$params['product'],"options"=>$params['options'],"super_attribute"=>$params['super_attribute'],
|
89 |
'qty' => $params['qty']
|
90 |
);
|
@@ -95,8 +100,7 @@ class Mss_Connector_CartController extends Mage_Core_Controller_Front_Action {
|
|
95 |
endif;
|
96 |
$cart->addProduct ( $product, $data );
|
97 |
else:
|
98 |
-
|
99 |
-
$cart->addProduct ( $product, $params );
|
100 |
endif;
|
101 |
$session->setLastAddedProductId ( $product->getId () );
|
102 |
|
@@ -194,27 +198,33 @@ class Mss_Connector_CartController extends Mage_Core_Controller_Front_Action {
|
|
194 |
public function addAction() {
|
195 |
try {
|
196 |
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
|
|
|
|
|
|
|
|
|
|
201 |
if (isset ( $params ['qty'] )) {
|
202 |
$filter = new Zend_Filter_LocalizedToNormalized ( array (
|
203 |
'locale' => Mage::app ()->getLocale ()->getLocaleCode ()
|
204 |
) );
|
205 |
-
$params
|
206 |
-
} else if ($
|
207 |
$session->addError ($this->__("Product Not Added
|
208 |
The SKU you entered %s was not found." ,$sku));
|
209 |
}
|
210 |
$request = Mage::app ()->getRequest ();
|
211 |
-
$product = Mage::getModel ( 'catalog/product' )->load ( $
|
212 |
|
213 |
if ($product->getData('has_options')):
|
214 |
# validate options
|
215 |
-
|
216 |
-
|
217 |
-
|
|
|
218 |
endif;
|
219 |
endif;
|
220 |
|
@@ -227,46 +237,42 @@ class Mss_Connector_CartController extends Mage_Core_Controller_Front_Action {
|
|
227 |
|
228 |
if (isset ($params['bundle_option']) ){
|
229 |
|
230 |
-
if(isset($params['options'])) {
|
231 |
-
$params = array("product"=>$params
|
232 |
-
"bundle_option"=>json_decode($params['bundle_option'],1),'qty' => $params
|
233 |
-
}else{
|
234 |
-
$params = array("product"=>$params
|
235 |
-
"bundle_option"=>json_decode($params['bundle_option'],1),'qty' => $params
|
236 |
}
|
237 |
$cart->addProduct ( $product,$params);
|
238 |
-
}elseif (isset ( $params
|
239 |
|
240 |
|
241 |
if(isset($params['options'])) {
|
242 |
|
243 |
|
244 |
|
245 |
-
$params = array("product"=>$params
|
246 |
-
'qty' => $params
|
247 |
);
|
248 |
|
249 |
-
}else{
|
250 |
-
$params = array("product"=>$params
|
251 |
-
'qty' => $params
|
252 |
);
|
253 |
}
|
254 |
$cart->addProduct ( $product,$params);
|
255 |
-
}else{
|
256 |
-
if($params['custom_image_name'])
|
257 |
-
|
258 |
$data = base64_decode($params['custom_image']);
|
259 |
file_put_contents(Mage::getBaseDir().'/tmp/'.$params['custom_image_name'], $data);
|
260 |
|
261 |
$_FILES['options_'.$params['attribute_id'].'_file'] = array ( 'name' => $params['custom_image_name'], 'type' => "image/jpeg" ,"tmp_name" => Mage::getBaseDir().'/tmp/'.$params['custom_image_name'] ,"error" => 0 ,"size" => getimagesize(Mage::getBaseDir().'/tmp/'.$params['custom_image_name']),'app'=>true );
|
262 |
|
263 |
-
//$params ='';
|
264 |
-
//$params['product'] = $product_id;
|
265 |
$options['options_'.$params['attribute_id'].'_file_action'] = 'save_new';
|
266 |
$params['options_'.$params['attribute_id'].'_file_action'] = 'save_new';
|
267 |
$params['uenc']='aHR0cDovL21hc3RlcnNvZnR3YXJldGVjaG5vbG9naWVzLmNvbS9tbXNfZGV2ZWxvcG1lbnQvZGVmYXVsdC90ZXN0LXByb2R1Y3QuaHRtbA';
|
268 |
-
// $params['qty'] = 1;
|
269 |
-
//$result['data'] = $params;
|
270 |
}
|
271 |
$cart->addProduct ( $product, $params);
|
272 |
}
|
@@ -727,10 +733,26 @@ class Mss_Connector_CartController extends Mage_Core_Controller_Front_Action {
|
|
727 |
protected function _getCustomOption($item) {
|
728 |
$session = Mage::getSingleton ( 'checkout/session' );
|
729 |
$options = $item->getProduct ()->getTypeInstance ( true )->getOrderOptions ( $item->getProduct () );
|
730 |
-
|
731 |
$result = array ();
|
732 |
if (count($options['options'])) {
|
733 |
if (isset ( $options ['options'] )) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
734 |
$result = array_merge ( $result, $options ['options'] );
|
735 |
}
|
736 |
if (isset ( $options ['additional_options'] )) {
|
@@ -915,11 +937,6 @@ class Mss_Connector_CartController extends Mage_Core_Controller_Front_Action {
|
|
915 |
);
|
916 |
endif;
|
917 |
}
|
918 |
-
/* if(Mage::getStoreConfig('magentomobileshop_payment/paypal_express/paypal_express_status') &&
|
919 |
-
Mage::getStoreConfig('magentomobileshop_payment/paypal_express/paypal_express_email'))
|
920 |
-
$methods[] = array('value'=> 'PayPal Express Checkout','code'=> 'paypal_express');
|
921 |
-
*/
|
922 |
-
|
923 |
echo json_encode($methods);
|
924 |
}
|
925 |
|
@@ -947,36 +964,32 @@ class Mss_Connector_CartController extends Mage_Core_Controller_Front_Action {
|
|
947 |
$check_grand_total = Mage::helper('checkout/cart')->getQuote()->getBaseSubtotalWithDiscount();
|
948 |
$this->checkMinimumorder($check_grand_total);
|
949 |
endif;
|
950 |
-
|
951 |
if (Mage::getSingleton ( 'customer/session' )->isLoggedIn ()) {
|
952 |
-
|
953 |
-
|
954 |
$session = Mage::getSingleton ( 'customer/session' );
|
955 |
$customerId=$session->getId();
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
##Get current quote
|
960 |
$totalItems = Mage::helper('checkout/cart')->getSummaryCount();
|
961 |
-
|
962 |
if($totalItems > 0):
|
963 |
#get the addressid
|
964 |
-
$
|
|
|
965 |
$shipping_method=$this->getRequest()->getParam('shippingmethod');
|
966 |
$paymentmethod=$this->getRequest()->getParam('paymentmethod');
|
967 |
$registration_id = $this->getRequest()->getParam('registration_id');
|
968 |
$card_details = $this->getRequest()->getParam('cards_details');
|
969 |
$save_cc = $this->getRequest()->getParam('save_cc');
|
970 |
|
971 |
-
|
972 |
-
|
973 |
if($paymentmethod == 'authorizenet')
|
974 |
$this->validateCarddtails(json_decode($card_details,1));
|
975 |
|
976 |
-
if (!Zend_Validate::is($
|
977 |
echo json_encode(array('Status'=>'error','message'=> $this->__('AddressId should not be empty')));
|
978 |
exit;
|
979 |
endif;
|
|
|
|
|
|
|
|
|
980 |
if (!Zend_Validate::is($shipping_method, 'NotEmpty')):
|
981 |
echo json_encode(array('Status'=>'error','message'=>$this->__('Shippingmethod should not be empty')));
|
982 |
exit;
|
@@ -985,43 +998,38 @@ class Mss_Connector_CartController extends Mage_Core_Controller_Front_Action {
|
|
985 |
echo json_encode(array('Status'=>'error','message'=>$this->__('paymentmethod should not be empty')));
|
986 |
exit;
|
987 |
endif;
|
988 |
-
if($
|
989 |
$result=array(
|
990 |
'message'=>$this->__('address is missing!!!!'),
|
991 |
-
'status'=>'
|
992 |
-
|
993 |
);
|
994 |
echo json_encode($result);
|
995 |
exit;
|
996 |
-
|
997 |
}
|
998 |
-
|
999 |
-
|
1000 |
#load the customer
|
1001 |
$customer = Mage::getModel('customer/customer')->load($customerId);
|
1002 |
|
1003 |
#address load
|
1004 |
try {
|
1005 |
-
$addressData=Mage::getModel('customer/address')
|
|
|
|
|
1006 |
$quote=Mage::getSingleton ( 'checkout/session' )->getQuote();
|
1007 |
$quote->setMms_order_type('app')->save();
|
1008 |
|
1009 |
-
$billingAddress = $quote->getBillingAddress()->addData($
|
1010 |
-
$shippingAddress = $quote->getShippingAddress()->addData($
|
1011 |
-
|
|
|
|
|
1012 |
|
1013 |
if($paymentmethod != 'authorizenet'):
|
1014 |
$shippingAddress->setPaymentMethod($paymentmethod);
|
1015 |
$quote->getPayment()->importData(array('method' => $paymentmethod));
|
1016 |
|
1017 |
endif;
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
$quote->collectTotals()->save();
|
1023 |
-
|
1024 |
-
|
1025 |
$transaction = Mage::getModel('core/resource_transaction');
|
1026 |
|
1027 |
if ($quote->getCustomerId()) {
|
@@ -1030,31 +1038,33 @@ class Mss_Connector_CartController extends Mage_Core_Controller_Front_Action {
|
|
1030 |
$transaction->addObject($quote);
|
1031 |
$quote->reserveOrderId();
|
1032 |
|
1033 |
-
|
1034 |
if($paymentmethod == 'authorizenet')
|
1035 |
$this->authorizePayment($quote,$transaction,$save_cc);
|
1036 |
-
|
1037 |
-
|
1038 |
$service = Mage::getModel('sales/service_quote', $quote);
|
1039 |
-
|
1040 |
$service->submitAll();
|
1041 |
$order = $service->getOrder();
|
1042 |
-
$
|
1043 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
1044 |
$order->setMms_order_type('app')->save();
|
1045 |
-
$order->sendNewOrderEmail();
|
1046 |
-
$quote->delete();
|
1047 |
-
|
1048 |
$cart = Mage::helper ( 'checkout/cart' )->getCart ();
|
1049 |
if($cart->getQuote ()->getItemsCount ()){
|
1050 |
-
|
|
|
|
|
1051 |
}
|
1052 |
Mage::getSingleton('checkout/session')->clear();
|
1053 |
|
1054 |
$result=array( 'message'=>$this->__('Order placed successfully.'),
|
1055 |
'orderid'=>$order->getIncrementId(),
|
1056 |
'items_count'=>$itemcount,
|
1057 |
-
'
|
|
|
1058 |
|
1059 |
);
|
1060 |
|
@@ -1080,17 +1090,22 @@ class Mss_Connector_CartController extends Mage_Core_Controller_Front_Action {
|
|
1080 |
}else{
|
1081 |
|
1082 |
|
1083 |
-
|
1084 |
|
1085 |
-
$
|
1086 |
-
|
1087 |
-
$
|
1088 |
-
$
|
1089 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
1090 |
$card_details = $this->getRequest()->getParam('cards_details');
|
1091 |
$save_cc = $this->getRequest()->getParam('save_cc');
|
1092 |
-
|
1093 |
-
if($payment_method == 'authorizenet')
|
1094 |
$this->validateCarddtails(json_decode($card_details,1));
|
1095 |
|
1096 |
|
@@ -1111,48 +1126,72 @@ class Mss_Connector_CartController extends Mage_Core_Controller_Front_Action {
|
|
1111 |
|
1112 |
|
1113 |
$billingAddress = array(
|
1114 |
-
'firstname' => $
|
1115 |
-
'lastname' => $
|
1116 |
|
1117 |
-
'email' => $
|
1118 |
'street' => array(
|
1119 |
-
$
|
1120 |
-
@$
|
1121 |
),
|
1122 |
-
'city' => $
|
1123 |
/*'region' => $getParams['region'],*/
|
1124 |
-
'postcode' => $
|
1125 |
-
'country_id' => $
|
1126 |
-
'telephone' => $
|
1127 |
'customer_password' => '',
|
1128 |
'confirm_password' => '',
|
1129 |
'save_in_address_book' => '0',
|
1130 |
-
|
|
|
|
|
|
|
1131 |
);
|
1132 |
-
|
1133 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1134 |
$billingAddress['region']=$getParams['region'];
|
1135 |
else
|
1136 |
-
$billingAddress['region_id']=$getParams['region_id']
|
1137 |
|
1138 |
-
$quote->getBillingAddress()
|
|
|
1139 |
|
1140 |
-
|
|
|
|
|
1141 |
|
1142 |
$quote->getShippingAddress()->setCollectShippingRates(true);
|
1143 |
$quote->collectTotals();
|
1144 |
-
|
1145 |
-
|
1146 |
-
$quote->
|
1147 |
-
$quote->getPayment()->importData( array('method' => $payment_method));
|
1148 |
|
1149 |
endif;
|
1150 |
|
1151 |
-
$customer_id = Mage::helper('connector')->reigesterGuestUser(array('firstname' => $
|
1152 |
-
'lastname' => $getParams['lastname'],'email'=>$getParams['email']));
|
1153 |
|
1154 |
$quote->setCustomer(Mage::getSingleton('customer/customer')->load($customer_id));
|
1155 |
-
|
1156 |
$quote->save();
|
1157 |
|
1158 |
$transaction = Mage::getModel('core/resource_transaction');
|
@@ -1160,28 +1199,34 @@ class Mss_Connector_CartController extends Mage_Core_Controller_Front_Action {
|
|
1160 |
if ($quote->getCustomerId())
|
1161 |
$transaction->addObject($quote->getCustomer());
|
1162 |
|
1163 |
-
if($
|
1164 |
$this->authorizePayment($quote,$transaction,$save_cc);
|
1165 |
-
|
1166 |
-
|
1167 |
$service = Mage::getModel('sales/service_quote', $quote);
|
1168 |
$service->submitAll();
|
1169 |
$order = $service->getOrder();
|
1170 |
$order->setMms_order_type('app')->save();
|
1171 |
-
$
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
|
|
|
|
|
|
1175 |
$increment_id = $order->getRealOrderId();
|
1176 |
$quote = $customer = $service = null;
|
1177 |
-
|
1178 |
-
|
1179 |
$cart = Mage::helper ( 'checkout/cart' )->getCart ();
|
1180 |
if($cart->getQuote ()->getItemsCount ()){
|
1181 |
-
|
|
|
|
|
1182 |
}
|
|
|
1183 |
Mage::getSingleton('checkout/session')->clear();
|
1184 |
-
echo json_encode(array('status' =>'success',
|
|
|
|
|
|
|
|
|
1185 |
exit;
|
1186 |
}
|
1187 |
catch (Exception $e)
|
@@ -1282,6 +1327,8 @@ class Mss_Connector_CartController extends Mage_Core_Controller_Front_Action {
|
|
1282 |
$quoteObj->setIsActive(0);
|
1283 |
$quoteObj->save();
|
1284 |
$orderId =$orderObj->getRealOrderId();
|
|
|
|
|
1285 |
/*$quoteObj->delete();*/
|
1286 |
|
1287 |
$cart = Mage::helper ( 'checkout/cart' )->getCart ();
|
@@ -1298,7 +1345,9 @@ class Mss_Connector_CartController extends Mage_Core_Controller_Front_Action {
|
|
1298 |
|
1299 |
$result=array( 'message'=>$this->__('Order placed successfully.'),
|
1300 |
'orderid'=>$orderId,
|
1301 |
-
|
|
|
|
|
1302 |
|
1303 |
);
|
1304 |
|
39 |
echo "{'summarycount':'" . $summarycount . "'}";
|
40 |
}
|
41 |
|
42 |
+
|
43 |
+
|
44 |
+
public function getMinimumorderAction(){
|
45 |
+
|
46 |
$data = $this->getRequest()->getParams();
|
47 |
+
|
48 |
$cart_data = json_decode($data['cart_data'],1);
|
|
|
49 |
foreach ($cart_data['items'] as $key => $value) {
|
50 |
+
|
51 |
if($value['custom_image_name']) {
|
52 |
$datas = base64_decode($value['custom_image']);
|
53 |
file_put_contents(Mage::getBaseDir().'/tmp/'.$cart_data['custom_image_name'], $datas);
|
57 |
$value['uenc']='aHR0cDovL21hc3RlcnNvZnR3YXJldGVjaG5vbG9naWVzLmNvbS9tbXNfZGV2ZWxvcG1lbnQvZGVmYXVsdC90ZXN0LXByb2R1Y3QuaHRtbA';
|
58 |
}
|
59 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
+
$session = Mage::getSingleton('checkout/session');
|
62 |
+
$session->getQuote()->delete();
|
63 |
+
$session->clear();
|
64 |
+
$cart = Mage::getModel('checkout/cart');
|
65 |
+
$cart->setQuote($session->getQuote());
|
66 |
+
|
67 |
+
$array_product = array();
|
68 |
|
69 |
+
foreach($cart_data['items'] as $params):
|
70 |
try {
|
71 |
+
$searchs = array('"{','}"');
|
72 |
+
$replaces = array('{','}');
|
73 |
+
$subjects = ($params['options']);
|
74 |
+
|
75 |
+
$search = array('"{','}"');
|
76 |
+
$replace = array('{','}');
|
77 |
+
$subject = ($params['super_attribute']);
|
78 |
+
|
79 |
+
$params['super_attribute'] = json_decode(str_replace($search, $replace, $subject),true);
|
80 |
+
$params['options'] = json_decode(str_replace($searchs, $replaces, $subjects),true);
|
81 |
+
$product = Mage::getModel ('catalog/product')->load ($params['product']);
|
82 |
|
83 |
if ($product->getData('has_options')):
|
84 |
# validate options
|
87 |
$params['options']=$options;
|
88 |
endif;
|
89 |
endif;
|
90 |
+
if (isset ($params ['super_attribute'] ) || isset($params['options'])) :
|
91 |
+
|
92 |
+
if(isset($params['options'])):
|
|
|
93 |
$data = array("product"=>$params['product'],"options"=>$params['options'],"super_attribute"=>$params['super_attribute'],
|
94 |
'qty' => $params['qty']
|
95 |
);
|
100 |
endif;
|
101 |
$cart->addProduct ( $product, $data );
|
102 |
else:
|
103 |
+
$cart->addProduct ( $product, $params );
|
|
|
104 |
endif;
|
105 |
$session->setLastAddedProductId ( $product->getId () );
|
106 |
|
198 |
public function addAction() {
|
199 |
try {
|
200 |
|
201 |
+
$params = $this->getRequest ()->getParams ();
|
202 |
+
|
203 |
+
//$params =json_decode($json['data'],true);
|
204 |
+
$search = array('"{','}"');
|
205 |
+
$replace = array('{','}');
|
206 |
+
$subject = $params['options'];
|
207 |
+
$final = str_replace($search, $replace, $subject);
|
208 |
+
$params['options'] = json_decode($final,1);
|
209 |
+
//Mage::log($params,null,'addActions.log');
|
210 |
if (isset ( $params ['qty'] )) {
|
211 |
$filter = new Zend_Filter_LocalizedToNormalized ( array (
|
212 |
'locale' => Mage::app ()->getLocale ()->getLocaleCode ()
|
213 |
) );
|
214 |
+
$params['qty'] = $filter->filter ( $params['qty'] );
|
215 |
+
} else if ($params['product'] == '') {
|
216 |
$session->addError ($this->__("Product Not Added
|
217 |
The SKU you entered %s was not found." ,$sku));
|
218 |
}
|
219 |
$request = Mage::app ()->getRequest ();
|
220 |
+
$product = Mage::getModel ( 'catalog/product' )->load ( $params['product'] );
|
221 |
|
222 |
if ($product->getData('has_options')):
|
223 |
# validate options
|
224 |
+
//$options=json_decode($params['data']['options'],true);
|
225 |
+
$option=($params['options']);
|
226 |
+
if(count($option)>0):
|
227 |
+
$params['options']=$option;
|
228 |
endif;
|
229 |
endif;
|
230 |
|
237 |
|
238 |
if (isset ($params['bundle_option']) ){
|
239 |
|
240 |
+
if(isset($params['options'])) {
|
241 |
+
$params = array("product"=>$params['product'],"options"=>$params['options'],
|
242 |
+
"bundle_option"=>json_decode($params['bundle_option'],1),'qty' => $params['qty']);
|
243 |
+
}else{
|
244 |
+
$params = array("product"=>$params['product'],
|
245 |
+
"bundle_option"=>json_decode($params['bundle_option'],1),'qty' => $params['qty']);
|
246 |
}
|
247 |
$cart->addProduct ( $product,$params);
|
248 |
+
}elseif (isset ( $params['super_attribute'] )) {
|
249 |
|
250 |
|
251 |
if(isset($params['options'])) {
|
252 |
|
253 |
|
254 |
|
255 |
+
$params = array("product"=>$params['product'],"options"=>$params['options'],"super_attribute"=>json_decode($params['super_attribute'],1),
|
256 |
+
'qty' => $params['qty']
|
257 |
);
|
258 |
|
259 |
+
}else{
|
260 |
+
$params = array("product"=>$params['product'],"super_attribute"=>json_decode($params['super_attribute'],1),
|
261 |
+
'qty' => $params['qty']
|
262 |
);
|
263 |
}
|
264 |
$cart->addProduct ( $product,$params);
|
265 |
+
}else{
|
266 |
+
if($params['custom_image_name']) {
|
267 |
+
|
268 |
$data = base64_decode($params['custom_image']);
|
269 |
file_put_contents(Mage::getBaseDir().'/tmp/'.$params['custom_image_name'], $data);
|
270 |
|
271 |
$_FILES['options_'.$params['attribute_id'].'_file'] = array ( 'name' => $params['custom_image_name'], 'type' => "image/jpeg" ,"tmp_name" => Mage::getBaseDir().'/tmp/'.$params['custom_image_name'] ,"error" => 0 ,"size" => getimagesize(Mage::getBaseDir().'/tmp/'.$params['custom_image_name']),'app'=>true );
|
272 |
|
|
|
|
|
273 |
$options['options_'.$params['attribute_id'].'_file_action'] = 'save_new';
|
274 |
$params['options_'.$params['attribute_id'].'_file_action'] = 'save_new';
|
275 |
$params['uenc']='aHR0cDovL21hc3RlcnNvZnR3YXJldGVjaG5vbG9naWVzLmNvbS9tbXNfZGV2ZWxvcG1lbnQvZGVmYXVsdC90ZXN0LXByb2R1Y3QuaHRtbA';
|
|
|
|
|
276 |
}
|
277 |
$cart->addProduct ( $product, $params);
|
278 |
}
|
733 |
protected function _getCustomOption($item) {
|
734 |
$session = Mage::getSingleton ( 'checkout/session' );
|
735 |
$options = $item->getProduct ()->getTypeInstance ( true )->getOrderOptions ( $item->getProduct () );
|
|
|
736 |
$result = array ();
|
737 |
if (count($options['options'])) {
|
738 |
if (isset ( $options ['options'] )) {
|
739 |
+
foreach ($options['options'] as $key => $option) {
|
740 |
+
if($option['option_type'] == 'date') {
|
741 |
+
|
742 |
+
$timestamp = strtotime($option['option_value']);
|
743 |
+
$date = json_encode(array('day'=> date("d", $timestamp), 'month' => date("m", $timestamp), 'year' => date("Y", $timestamp)));
|
744 |
+
$options['options'][$key]['option_value'] = $date;
|
745 |
+
|
746 |
+
} elseif ($option['option_type'] == 'date_time') {
|
747 |
+
|
748 |
+
$timestamp = strtotime($option['option_value']);
|
749 |
+
|
750 |
+
$date = json_encode(array('day'=> date("d", $timestamp), 'month' => date("m", $timestamp), 'year' => date("Y", $timestamp),'hour' =>date("h", $timestamp), 'minute' => date("i" , $timestamp), 'day_part' => date('A' , $timestamp)));
|
751 |
+
|
752 |
+
$options['options'][$key]['option_value'] = $date;
|
753 |
+
|
754 |
+
}
|
755 |
+
}
|
756 |
$result = array_merge ( $result, $options ['options'] );
|
757 |
}
|
758 |
if (isset ( $options ['additional_options'] )) {
|
937 |
);
|
938 |
endif;
|
939 |
}
|
|
|
|
|
|
|
|
|
|
|
940 |
echo json_encode($methods);
|
941 |
}
|
942 |
|
964 |
$check_grand_total = Mage::helper('checkout/cart')->getQuote()->getBaseSubtotalWithDiscount();
|
965 |
$this->checkMinimumorder($check_grand_total);
|
966 |
endif;
|
|
|
967 |
if (Mage::getSingleton ( 'customer/session' )->isLoggedIn ()) {
|
|
|
|
|
968 |
$session = Mage::getSingleton ( 'customer/session' );
|
969 |
$customerId=$session->getId();
|
|
|
|
|
|
|
970 |
##Get current quote
|
971 |
$totalItems = Mage::helper('checkout/cart')->getSummaryCount();
|
|
|
972 |
if($totalItems > 0):
|
973 |
#get the addressid
|
974 |
+
$usershippingid=(int)$this->getRequest()->getParam('usershippingid');
|
975 |
+
$userbillingid=(int)$this->getRequest()->getParam('userbillingid');
|
976 |
$shipping_method=$this->getRequest()->getParam('shippingmethod');
|
977 |
$paymentmethod=$this->getRequest()->getParam('paymentmethod');
|
978 |
$registration_id = $this->getRequest()->getParam('registration_id');
|
979 |
$card_details = $this->getRequest()->getParam('cards_details');
|
980 |
$save_cc = $this->getRequest()->getParam('save_cc');
|
981 |
|
|
|
|
|
982 |
if($paymentmethod == 'authorizenet')
|
983 |
$this->validateCarddtails(json_decode($card_details,1));
|
984 |
|
985 |
+
if (!Zend_Validate::is($usershippingid, 'NotEmpty')):
|
986 |
echo json_encode(array('Status'=>'error','message'=> $this->__('AddressId should not be empty')));
|
987 |
exit;
|
988 |
endif;
|
989 |
+
if (!Zend_Validate::is($userbillingid, 'NotEmpty')):
|
990 |
+
echo json_encode(array('Status'=>'error','message'=> $this->__('AddressId should not be empty')));
|
991 |
+
exit;
|
992 |
+
endif;
|
993 |
if (!Zend_Validate::is($shipping_method, 'NotEmpty')):
|
994 |
echo json_encode(array('Status'=>'error','message'=>$this->__('Shippingmethod should not be empty')));
|
995 |
exit;
|
998 |
echo json_encode(array('Status'=>'error','message'=>$this->__('paymentmethod should not be empty')));
|
999 |
exit;
|
1000 |
endif;
|
1001 |
+
if($usershippingid=='' && $userbillingid == '') {
|
1002 |
$result=array(
|
1003 |
'message'=>$this->__('address is missing!!!!'),
|
1004 |
+
'status'=>'error'
|
|
|
1005 |
);
|
1006 |
echo json_encode($result);
|
1007 |
exit;
|
|
|
1008 |
}
|
|
|
|
|
1009 |
#load the customer
|
1010 |
$customer = Mage::getModel('customer/customer')->load($customerId);
|
1011 |
|
1012 |
#address load
|
1013 |
try {
|
1014 |
+
$addressData=Mage::getModel('customer/address');
|
1015 |
+
$usershippingidData=$addressData->load($usershippingid)->getData();
|
1016 |
+
$userbillingidData=$addressData->load($userbillingid)->getData();
|
1017 |
$quote=Mage::getSingleton ( 'checkout/session' )->getQuote();
|
1018 |
$quote->setMms_order_type('app')->save();
|
1019 |
|
1020 |
+
$billingAddress = $quote->getBillingAddress()->addData($userbillingidData);
|
1021 |
+
$shippingAddress = $quote->getShippingAddress()->addData($usershippingidData);
|
1022 |
+
|
1023 |
+
$shippingAddress->setCollectShippingRates(true)
|
1024 |
+
->setShippingMethod($shipping_method);
|
1025 |
|
1026 |
if($paymentmethod != 'authorizenet'):
|
1027 |
$shippingAddress->setPaymentMethod($paymentmethod);
|
1028 |
$quote->getPayment()->importData(array('method' => $paymentmethod));
|
1029 |
|
1030 |
endif;
|
1031 |
+
|
|
|
|
|
|
|
1032 |
$quote->collectTotals()->save();
|
|
|
|
|
1033 |
$transaction = Mage::getModel('core/resource_transaction');
|
1034 |
|
1035 |
if ($quote->getCustomerId()) {
|
1038 |
$transaction->addObject($quote);
|
1039 |
$quote->reserveOrderId();
|
1040 |
|
|
|
1041 |
if($paymentmethod == 'authorizenet')
|
1042 |
$this->authorizePayment($quote,$transaction,$save_cc);
|
|
|
|
|
1043 |
$service = Mage::getModel('sales/service_quote', $quote);
|
|
|
1044 |
$service->submitAll();
|
1045 |
$order = $service->getOrder();
|
1046 |
+
$itemcount = $order->getTotalItemCount();
|
1047 |
+
$grandTotal = $order->getData('grand_total');
|
1048 |
+
if($paymentmethod == 'payucheckout_shared'){
|
1049 |
+
$quote->delete();
|
1050 |
+
}else{
|
1051 |
+
$order->sendNewOrderEmail();
|
1052 |
+
$quote->delete();
|
1053 |
+
}
|
1054 |
$order->setMms_order_type('app')->save();
|
|
|
|
|
|
|
1055 |
$cart = Mage::helper ( 'checkout/cart' )->getCart ();
|
1056 |
if($cart->getQuote ()->getItemsCount ()){
|
1057 |
+
$current_cart = Mage::getSingleton('checkout/cart');
|
1058 |
+
$current_cart->truncate();
|
1059 |
+
$current_cart->save();
|
1060 |
}
|
1061 |
Mage::getSingleton('checkout/session')->clear();
|
1062 |
|
1063 |
$result=array( 'message'=>$this->__('Order placed successfully.'),
|
1064 |
'orderid'=>$order->getIncrementId(),
|
1065 |
'items_count'=>$itemcount,
|
1066 |
+
'grand_total' =>$grandTotal,
|
1067 |
+
'result'=>'success'
|
1068 |
|
1069 |
);
|
1070 |
|
1090 |
}else{
|
1091 |
|
1092 |
|
1093 |
+
ini_set('memory_limit', '128M');
|
1094 |
|
1095 |
+
$getParam = $this->getRequest()->getParams();
|
1096 |
+
$getParams = $this->getRequest()->getParam('data');
|
1097 |
+
$json_data = json_decode($getParams,1);
|
1098 |
+
$json_billing1 = $json_data['0'];
|
1099 |
+
$json_billing = json_decode($json_billing1,1);
|
1100 |
+
|
1101 |
+
$json_shipping1 = $json_data['1'];
|
1102 |
+
$json_shipping = json_decode($json_shipping1,1);
|
1103 |
+
|
1104 |
+
$paymentmethod = $json_shipping['paymentmethod'];
|
1105 |
+
$shipping_method = $json_shipping['shippingmethod'];
|
1106 |
$card_details = $this->getRequest()->getParam('cards_details');
|
1107 |
$save_cc = $this->getRequest()->getParam('save_cc');
|
1108 |
+
if($paymentmethod == 'authorizenet')
|
|
|
1109 |
$this->validateCarddtails(json_decode($card_details,1));
|
1110 |
|
1111 |
|
1126 |
|
1127 |
|
1128 |
$billingAddress = array(
|
1129 |
+
'firstname' => $json_billing['firstname'],
|
1130 |
+
'lastname' => $json_billing['lastname'],
|
1131 |
|
1132 |
+
'email' => $json_billing['email'],
|
1133 |
'street' => array(
|
1134 |
+
$json_billing['street_line_1'],
|
1135 |
+
@$json_billing['street_line_2']
|
1136 |
),
|
1137 |
+
'city' => $json_billing['city'],
|
1138 |
/*'region' => $getParams['region'],*/
|
1139 |
+
'postcode' => $json_billing['postcode'],
|
1140 |
+
'country_id' => $json_billing['country_id'],
|
1141 |
+
'telephone' => $json_billing['telephone'],
|
1142 |
'customer_password' => '',
|
1143 |
'confirm_password' => '',
|
1144 |
'save_in_address_book' => '0',
|
1145 |
+
// 'use_for_shipping' => '1',
|
1146 |
+
'is_default_shipping' =>$json_billing['is_default_shipping'],
|
1147 |
+
'is_default_billing' =>$json_billing['is_default_billing'],
|
1148 |
+
|
1149 |
);
|
1150 |
+
$shippingAddress = array(
|
1151 |
+
'firstname' => $json_shipping['firstname'],
|
1152 |
+
'lastname' => $json_shipping['lastname'],
|
1153 |
+
|
1154 |
+
'email' => $json_shipping['email'],
|
1155 |
+
'street' => array(
|
1156 |
+
$json_shipping['street_line_1'],
|
1157 |
+
@$json_shipping['street_line_2']
|
1158 |
+
),
|
1159 |
+
'city' => $json_shipping['city'],
|
1160 |
+
/*'region' => $getParams['region'],*/
|
1161 |
+
'postcode' => $json_shipping['postcode'],
|
1162 |
+
'country_id' => $json_shipping['country_id'],
|
1163 |
+
'telephone' => $json_shipping['telephone'],
|
1164 |
+
'customer_password' => '',
|
1165 |
+
'confirm_password' => '',
|
1166 |
+
'save_in_address_book' => '0',
|
1167 |
+
//'use_for_shipping' => '1',
|
1168 |
+
'is_default_shipping' =>$json_shipping['is_default_shipping'],
|
1169 |
+
'is_default_billing' =>$json_shipping['is_default_billing'],
|
1170 |
+
);
|
1171 |
+
/*if(isset($data['region']))
|
1172 |
$billingAddress['region']=$getParams['region'];
|
1173 |
else
|
1174 |
+
$billingAddress['region_id']=$getParams['region_id'];*/
|
1175 |
|
1176 |
+
$quote->getBillingAddress()
|
1177 |
+
->addData($billingAddress);
|
1178 |
|
1179 |
+
$quote->getShippingAddress()
|
1180 |
+
->addData($shippingAddress)
|
1181 |
+
->setShippingMethod($shipping_method);
|
1182 |
|
1183 |
$quote->getShippingAddress()->setCollectShippingRates(true);
|
1184 |
$quote->collectTotals();
|
1185 |
+
if($paymentmethod != 'authorizenet'):
|
1186 |
+
$quote->setPaymentMethod($paymentmethod);
|
1187 |
+
$quote->getPayment()->importData( array('method' => $paymentmethod));
|
|
|
1188 |
|
1189 |
endif;
|
1190 |
|
1191 |
+
$customer_id = Mage::helper('connector')->reigesterGuestUser(array('firstname' => $json_billing['firstname'],'lastname' => $json_billing['lastname'],'email'=>$json_billing['email']));
|
|
|
1192 |
|
1193 |
$quote->setCustomer(Mage::getSingleton('customer/customer')->load($customer_id));
|
1194 |
+
|
1195 |
$quote->save();
|
1196 |
|
1197 |
$transaction = Mage::getModel('core/resource_transaction');
|
1199 |
if ($quote->getCustomerId())
|
1200 |
$transaction->addObject($quote->getCustomer());
|
1201 |
|
1202 |
+
if($paymentmethod == 'authorizenet')
|
1203 |
$this->authorizePayment($quote,$transaction,$save_cc);
|
|
|
|
|
1204 |
$service = Mage::getModel('sales/service_quote', $quote);
|
1205 |
$service->submitAll();
|
1206 |
$order = $service->getOrder();
|
1207 |
$order->setMms_order_type('app')->save();
|
1208 |
+
if($paymentmethod == 'payucheckout_shared'){
|
1209 |
+
}else{
|
1210 |
+
$order->sendNewOrderEmail();
|
1211 |
+
}
|
1212 |
+
$itemcount = $order->getTotalItemCount();
|
1213 |
+
$grandTotal = $order->getData('grand_total');
|
1214 |
+
|
1215 |
$increment_id = $order->getRealOrderId();
|
1216 |
$quote = $customer = $service = null;
|
|
|
|
|
1217 |
$cart = Mage::helper ( 'checkout/cart' )->getCart ();
|
1218 |
if($cart->getQuote ()->getItemsCount ()){
|
1219 |
+
$current_cart = Mage::getSingleton('checkout/cart');
|
1220 |
+
$current_cart->truncate();
|
1221 |
+
$current_cart->save();
|
1222 |
}
|
1223 |
+
|
1224 |
Mage::getSingleton('checkout/session')->clear();
|
1225 |
+
echo json_encode(array('status' =>'success',
|
1226 |
+
'orderid' => $increment_id,
|
1227 |
+
'items_count'=>$itemcount,
|
1228 |
+
'grand_total' =>$grandTotal,
|
1229 |
+
));
|
1230 |
exit;
|
1231 |
}
|
1232 |
catch (Exception $e)
|
1327 |
$quoteObj->setIsActive(0);
|
1328 |
$quoteObj->save();
|
1329 |
$orderId =$orderObj->getRealOrderId();
|
1330 |
+
$itemcount = $orderObj->getTotalItemCount();
|
1331 |
+
$grandTotal = $orderObj->getData('grand_total');
|
1332 |
/*$quoteObj->delete();*/
|
1333 |
|
1334 |
$cart = Mage::helper ( 'checkout/cart' )->getCart ();
|
1345 |
|
1346 |
$result=array( 'message'=>$this->__('Order placed successfully.'),
|
1347 |
'orderid'=>$orderId,
|
1348 |
+
'items_count'=>$itemcount,
|
1349 |
+
'grand_total' =>$grandTotal,
|
1350 |
+
'result'=>'success'
|
1351 |
|
1352 |
);
|
1353 |
|
app/code/local/Mss/Connector/controllers/CustomerController.php
CHANGED
@@ -212,7 +212,7 @@ class Mss_Connector_CustomerController extends Mage_Core_Controller_Front_Action
|
|
212 |
'customer' => $customer
|
213 |
), $storeId );
|
214 |
echo json_encode ( array (
|
215 |
-
'status' => '
|
216 |
'message' => $this->__('Request has sent to your Email.')
|
217 |
) );
|
218 |
} else
|
@@ -265,16 +265,17 @@ class Mss_Connector_CustomerController extends Mage_Core_Controller_Front_Action
|
|
265 |
# set shipping Address and billing Address for customer
|
266 |
public function setAddressAction()
|
267 |
{
|
268 |
-
|
269 |
try {
|
270 |
$userid = Mage::app ()->getRequest ()->getParam ( 'userid' );
|
271 |
-
//$session = Mage::getSingleton ( 'customer/session' );
|
272 |
-
//if (Mage::getSingleton ( 'customer/session' )->isLoggedIn ()) {
|
273 |
if($userid){
|
274 |
$customerId = $userid;
|
275 |
-
$
|
276 |
-
|
277 |
-
|
|
|
|
|
|
|
278 |
if (!Zend_Validate::is($data['firstname'], 'NotEmpty')):
|
279 |
echo json_encode(array('status'=>'error','message'=> $this->__('Firstname should not be empty')));
|
280 |
exit;
|
@@ -295,16 +296,6 @@ class Mss_Connector_CustomerController extends Mage_Core_Controller_Front_Action
|
|
295 |
echo json_encode(array('status'=>'error','message'=> $this->__('Country_id should not be empty')));
|
296 |
exit;
|
297 |
endif;
|
298 |
-
|
299 |
-
|
300 |
-
if (!Zend_Validate::is($data['region'], 'NotEmpty') AND !Zend_Validate::is($data['region_id'], 'NotEmpty')):
|
301 |
-
echo json_encode(array('status'=>'error','message'=>'Region should not be empty'));
|
302 |
-
exit;
|
303 |
-
endif;
|
304 |
-
if (!Zend_Validate::is($data['postcode'], 'NotEmpty')):
|
305 |
-
echo json_encode(array('status'=>'error','message'=> $this->__('Postcode should not be empty')));
|
306 |
-
exit;
|
307 |
-
endif;
|
308 |
if (!Zend_Validate::is($data['telephone'], 'NotEmpty')):
|
309 |
echo json_encode(array('status'=>'error','message'=> $this->__('Telephone should not be empty')));
|
310 |
exit;
|
@@ -323,30 +314,26 @@ class Mss_Connector_CustomerController extends Mage_Core_Controller_Front_Action
|
|
323 |
'street' => $data['street'],
|
324 |
'city' => $data['city'],
|
325 |
'country_id' => $data['country_id'],
|
326 |
-
|
327 |
-
'postcode' => $data['postcode'],
|
328 |
'telephone' => $data['telephone'],
|
329 |
-
'
|
330 |
-
'is_default_billing' => '
|
331 |
-
'is_default_shipping' => '
|
332 |
);
|
333 |
-
|
|
|
334 |
$addressData['region'] = $data['region'];
|
335 |
else
|
336 |
$addressData['region_id'] = $data['region_id'];
|
337 |
|
338 |
-
|
339 |
$address = Mage::getModel("customer/address");
|
340 |
$address->addData($addressData);
|
341 |
$address->setCustomerId($customerId);
|
342 |
-
|
343 |
try{
|
344 |
$address->save();
|
345 |
-
$
|
346 |
-
|
347 |
-
$result['status']='success';
|
348 |
-
|
349 |
-
echo json_encode($result);
|
350 |
}
|
351 |
catch (Exception $e) {
|
352 |
|
@@ -355,9 +342,13 @@ class Mss_Connector_CustomerController extends Mage_Core_Controller_Front_Action
|
|
355 |
'message' => $this->__($e->getMessage())
|
356 |
) );
|
357 |
}
|
|
|
358 |
|
359 |
-
|
360 |
-
|
|
|
|
|
|
|
361 |
}
|
362 |
else{
|
363 |
|
@@ -365,7 +356,6 @@ class Mss_Connector_CustomerController extends Mage_Core_Controller_Front_Action
|
|
365 |
'status' => 'error',
|
366 |
'message' => $this->__('No matched email data.')
|
367 |
) );
|
368 |
-
$session->logout();
|
369 |
}
|
370 |
|
371 |
} catch (Exception $e) {
|
@@ -373,13 +363,9 @@ class Mss_Connector_CustomerController extends Mage_Core_Controller_Front_Action
|
|
373 |
|
374 |
echo json_encode ( array (
|
375 |
'status' => 'error',
|
376 |
-
'message' =>
|
377 |
) );
|
378 |
-
|
379 |
-
|
380 |
}
|
381 |
-
|
382 |
-
|
383 |
}
|
384 |
|
385 |
public function getAddressbyidAction()
|
@@ -423,24 +409,21 @@ class Mss_Connector_CustomerController extends Mage_Core_Controller_Front_Action
|
|
423 |
# get shipping Address listing of customer
|
424 |
public function getAddressAction()
|
425 |
{
|
426 |
-
|
427 |
try {
|
428 |
$session = Mage::getSingleton ( 'customer/session' );
|
429 |
$userid = Mage::app ()->getRequest ()->getParam ( 'userid' );
|
430 |
-
|
431 |
-
|
432 |
if($userid){
|
433 |
-
|
434 |
$customerId=$session->getId();
|
435 |
-
|
436 |
$customer = Mage::getModel('customer/customer')->load($userid); //insert cust ID
|
437 |
-
|
438 |
#create customer address array
|
439 |
-
$
|
|
|
440 |
#loop to create the array
|
|
|
|
|
441 |
foreach ($customer->getAddresses() as $address)
|
442 |
{
|
443 |
-
|
444 |
$address_array = array(
|
445 |
|
446 |
'id'=>$address->getId(),
|
@@ -451,14 +434,12 @@ class Mss_Connector_CustomerController extends Mage_Core_Controller_Front_Action
|
|
451 |
// 'country_id'=>$address->getCountryId(),
|
452 |
'country_name'=>Mage::getModel('directory/country')->loadByCode($address->getCountryId())->getName(),
|
453 |
'country_id'=>$address->getCountryId(),
|
454 |
-
|
455 |
-
//'region'=>$address->getRegion(),
|
456 |
'postcode'=>$address->getPostcode(),
|
457 |
'telephone'=>$address->getTelephone(),
|
458 |
'fax'=>$address->getFax(),
|
459 |
'email'=>$customer->getEmail(),
|
460 |
-
|
461 |
-
|
462 |
);
|
463 |
|
464 |
if ($address->getRegionId()) {
|
@@ -468,10 +449,18 @@ class Mss_Connector_CustomerController extends Mage_Core_Controller_Front_Action
|
|
468 |
} else {
|
469 |
$address_array['region'] = $address->getRegion();
|
470 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
471 |
|
472 |
-
|
473 |
-
$customerAddress[] = $address_array;
|
474 |
}
|
|
|
475 |
|
476 |
echo json_encode($customerAddress);
|
477 |
}
|
@@ -678,7 +667,7 @@ class Mss_Connector_CustomerController extends Mage_Core_Controller_Front_Action
|
|
678 |
$orderData = array(
|
679 |
"id" => $order->getId(),
|
680 |
"order_id" => $order->getRealOrderId(),
|
681 |
-
"status" =>
|
682 |
"order_date" => $order_date,
|
683 |
"grand_total" => number_format($order->getGrandTotal(), 2, '.', ''),
|
684 |
"shipping_address" => $shippadd,
|
@@ -726,11 +715,13 @@ class Mss_Connector_CustomerController extends Mage_Core_Controller_Front_Action
|
|
726 |
Response : JSON
|
727 |
|
728 |
*/
|
729 |
-
|
730 |
|
731 |
if(Mage::getSingleton('customer/session')->isLoggedIn()):
|
732 |
$info=array();
|
733 |
-
$customer = Mage::
|
|
|
|
|
734 |
$info['firstname'] = $customer->getFirstname();
|
735 |
$info['lastname'] = $customer->getLastname();
|
736 |
$customerAddressId =$customer->getDefaultBilling();
|
@@ -851,16 +842,11 @@ class Mss_Connector_CustomerController extends Mage_Core_Controller_Front_Action
|
|
851 |
|
852 |
if (Mage::getSingleton ( 'customer/session' )->isLoggedIn()):
|
853 |
|
854 |
-
$addressId = $this->getRequest ()->getParam ('addressId');
|
855 |
$addressData = json_decode($this->getRequest ()->getParam ('addressData'),1);
|
856 |
-
|
857 |
-
if (!array_key_exists('region_id', $addressData)) {
|
858 |
-
$addressData['region_id'] = '';
|
859 |
-
}
|
860 |
-
|
861 |
$customer = Mage::getModel('customer/customer')->load(Mage::getSingleton ( 'customer/session' )->getCustomer()->getId());
|
862 |
-
$customer->setFirstname($addressData['firstname']);
|
863 |
-
|
864 |
|
865 |
|
866 |
$address = Mage::getModel('customer/address')->load($addressId);
|
212 |
'customer' => $customer
|
213 |
), $storeId );
|
214 |
echo json_encode ( array (
|
215 |
+
'status' => 'success',
|
216 |
'message' => $this->__('Request has sent to your Email.')
|
217 |
) );
|
218 |
} else
|
265 |
# set shipping Address and billing Address for customer
|
266 |
public function setAddressAction()
|
267 |
{
|
268 |
+
|
269 |
try {
|
270 |
$userid = Mage::app ()->getRequest ()->getParam ( 'userid' );
|
|
|
|
|
271 |
if($userid){
|
272 |
$customerId = $userid;
|
273 |
+
$params = Mage::app ()->getRequest ()->getParam('data');
|
274 |
+
$respnse = json_decode($params,1);
|
275 |
+
$new_array = array();
|
276 |
+
foreach ($respnse as $key => $datas) {
|
277 |
+
$tempData = str_replace("\\", "",$datas);
|
278 |
+
$data = json_decode($tempData,true);
|
279 |
if (!Zend_Validate::is($data['firstname'], 'NotEmpty')):
|
280 |
echo json_encode(array('status'=>'error','message'=> $this->__('Firstname should not be empty')));
|
281 |
exit;
|
296 |
echo json_encode(array('status'=>'error','message'=> $this->__('Country_id should not be empty')));
|
297 |
exit;
|
298 |
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
299 |
if (!Zend_Validate::is($data['telephone'], 'NotEmpty')):
|
300 |
echo json_encode(array('status'=>'error','message'=> $this->__('Telephone should not be empty')));
|
301 |
exit;
|
314 |
'street' => $data['street'],
|
315 |
'city' => $data['city'],
|
316 |
'country_id' => $data['country_id'],
|
317 |
+
// 'region_id' => $data['region_id'],
|
|
|
318 |
'telephone' => $data['telephone'],
|
319 |
+
'postcode' => $data['postcode'],
|
320 |
+
'is_default_billing' => $data['is_default_billing'],
|
321 |
+
'is_default_shipping' => $data['is_default_shipping'],
|
322 |
);
|
323 |
+
|
324 |
+
if($data['region'])
|
325 |
$addressData['region'] = $data['region'];
|
326 |
else
|
327 |
$addressData['region_id'] = $data['region_id'];
|
328 |
|
|
|
329 |
$address = Mage::getModel("customer/address");
|
330 |
$address->addData($addressData);
|
331 |
$address->setCustomerId($customerId);
|
332 |
+
|
333 |
try{
|
334 |
$address->save();
|
335 |
+
$new_array[] =$address->getId();
|
336 |
+
|
|
|
|
|
|
|
337 |
}
|
338 |
catch (Exception $e) {
|
339 |
|
342 |
'message' => $this->__($e->getMessage())
|
343 |
) );
|
344 |
}
|
345 |
+
}
|
346 |
|
347 |
+
$result['id']=$new_array;
|
348 |
+
$result['message']= $this->__('Address added successfully.');
|
349 |
+
$result['status']='success';
|
350 |
+
|
351 |
+
echo json_encode($result);
|
352 |
}
|
353 |
else{
|
354 |
|
356 |
'status' => 'error',
|
357 |
'message' => $this->__('No matched email data.')
|
358 |
) );
|
|
|
359 |
}
|
360 |
|
361 |
} catch (Exception $e) {
|
363 |
|
364 |
echo json_encode ( array (
|
365 |
'status' => 'error',
|
366 |
+
'message' => "something went wrong"
|
367 |
) );
|
|
|
|
|
368 |
}
|
|
|
|
|
369 |
}
|
370 |
|
371 |
public function getAddressbyidAction()
|
409 |
# get shipping Address listing of customer
|
410 |
public function getAddressAction()
|
411 |
{
|
|
|
412 |
try {
|
413 |
$session = Mage::getSingleton ( 'customer/session' );
|
414 |
$userid = Mage::app ()->getRequest ()->getParam ( 'userid' );
|
|
|
|
|
415 |
if($userid){
|
|
|
416 |
$customerId=$session->getId();
|
|
|
417 |
$customer = Mage::getModel('customer/customer')->load($userid); //insert cust ID
|
418 |
+
|
419 |
#create customer address array
|
420 |
+
$currentAddress = array();
|
421 |
+
$alladdress= array();
|
422 |
#loop to create the array
|
423 |
+
$default_shipping = $customer->getDefaultShippingAddress();
|
424 |
+
$default_billing = $customer->getDefaultBillingAddress();
|
425 |
foreach ($customer->getAddresses() as $address)
|
426 |
{
|
|
|
427 |
$address_array = array(
|
428 |
|
429 |
'id'=>$address->getId(),
|
434 |
// 'country_id'=>$address->getCountryId(),
|
435 |
'country_name'=>Mage::getModel('directory/country')->loadByCode($address->getCountryId())->getName(),
|
436 |
'country_id'=>$address->getCountryId(),
|
|
|
|
|
437 |
'postcode'=>$address->getPostcode(),
|
438 |
'telephone'=>$address->getTelephone(),
|
439 |
'fax'=>$address->getFax(),
|
440 |
'email'=>$customer->getEmail(),
|
441 |
+
'is_default_billing' => ($default_billing)?(($address->getId() == $default_billing->getId() && $default_billing)?1:0):0,
|
442 |
+
'is_default_shipping' => ($default_shipping)?(($address->getId() == $default_shipping->getId() && $default_shipping)?1:0):0,
|
443 |
);
|
444 |
|
445 |
if ($address->getRegionId()) {
|
449 |
} else {
|
450 |
$address_array['region'] = $address->getRegion();
|
451 |
}
|
452 |
+
if($default_billing) {
|
453 |
+
if($address->getId() == $default_billing->getId())
|
454 |
+
$currentAddress[] = $address_array;
|
455 |
+
}
|
456 |
+
if($default_shipping) {
|
457 |
+
if($address->getId() == $default_shipping->getId())
|
458 |
+
$currentAddress[] = $address_array;
|
459 |
+
}
|
460 |
|
461 |
+
$alladdress[] = $address_array;
|
|
|
462 |
}
|
463 |
+
$customerAddress = array('alladdress'=>$alladdress,'currentAddress'=>$currentAddress);
|
464 |
|
465 |
echo json_encode($customerAddress);
|
466 |
}
|
667 |
$orderData = array(
|
668 |
"id" => $order->getId(),
|
669 |
"order_id" => $order->getRealOrderId(),
|
670 |
+
"status" => str_replace('_', ' ',$order->getStatus()),
|
671 |
"order_date" => $order_date,
|
672 |
"grand_total" => number_format($order->getGrandTotal(), 2, '.', ''),
|
673 |
"shipping_address" => $shippadd,
|
715 |
Response : JSON
|
716 |
|
717 |
*/
|
718 |
+
public function getuserinfoAction(){
|
719 |
|
720 |
if(Mage::getSingleton('customer/session')->isLoggedIn()):
|
721 |
$info=array();
|
722 |
+
$customer = Mage::getModel('customer/customer')
|
723 |
+
->load(Mage::getSingleton('customer/session')->getId());
|
724 |
+
// $customer = Mage::getSingleton('customer/session')->getCustomer();
|
725 |
$info['firstname'] = $customer->getFirstname();
|
726 |
$info['lastname'] = $customer->getLastname();
|
727 |
$customerAddressId =$customer->getDefaultBilling();
|
842 |
|
843 |
if (Mage::getSingleton ( 'customer/session' )->isLoggedIn()):
|
844 |
|
845 |
+
$addressId = $this->getRequest ()->getParam ('addressId');
|
846 |
$addressData = json_decode($this->getRequest ()->getParam ('addressData'),1);
|
|
|
|
|
|
|
|
|
|
|
847 |
$customer = Mage::getModel('customer/customer')->load(Mage::getSingleton ( 'customer/session' )->getCustomer()->getId());
|
848 |
+
// $customer->setFirstname($addressData['firstname']);
|
849 |
+
// $customer->setLastname ($addressData['lastname']);
|
850 |
|
851 |
|
852 |
$address = Mage::getModel('customer/address')->load($addressId);
|
app/code/local/Mss/Connector/controllers/IndexController.php
CHANGED
@@ -465,10 +465,9 @@ class Mss_Connector_IndexController extends Mage_Core_Controller_Front_Action {
|
|
465 |
$baseCurrency, $currentCurrency ), 2, '.', '' ),
|
466 |
'symbol'=> Mage::helper('connector')->getCurrencysymbolByCode($this->currency),
|
467 |
'qty'=>(int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($product->getId())->getQty(),
|
468 |
-
'product_type'=>$product->getTypeId(),
|
469 |
'rating' => $rating_final,
|
470 |
'wishlist' => Mage::helper('connector')->check_wishlist($product->getId ()),
|
471 |
-
'specialprice'=>number_format (Mage::helper('connector')->getSpecialPriceByProductId($product->getId ()), 2, '.', '' ),
|
472 |
|
473 |
);
|
474 |
}
|
@@ -536,7 +535,7 @@ class Mss_Connector_IndexController extends Mage_Core_Controller_Front_Action {
|
|
536 |
'product_type'=>$product->getTypeId(),
|
537 |
'rating' => $rating_final,
|
538 |
'wishlist' => Mage::helper('connector')->check_wishlist($product->getId ()),
|
539 |
-
'specialprice'=>number_format (Mage::helper('connector')->
|
540 |
);
|
541 |
endif;
|
542 |
else:
|
@@ -561,7 +560,7 @@ class Mss_Connector_IndexController extends Mage_Core_Controller_Front_Action {
|
|
561 |
'product_type'=>$product->getTypeId(),
|
562 |
'rating' => $rating_final,
|
563 |
'wishlist' => Mage::helper('connector')->check_wishlist($product->getId ()),
|
564 |
-
'specialprice'=>number_format (Mage::helper('connector')->
|
565 |
);
|
566 |
endif;
|
567 |
endforeach;
|
@@ -658,7 +657,7 @@ class Mss_Connector_IndexController extends Mage_Core_Controller_Front_Action {
|
|
658 |
'product_type'=>$product->getTypeId(),
|
659 |
'rating' => $rating_final,
|
660 |
'wishlist' => Mage::helper('connector')->check_wishlist($product->getId ()),
|
661 |
-
'specialprice'=>number_format (Mage::helper('connector')->
|
662 |
);
|
663 |
}
|
664 |
return $new_productlist;
|
@@ -733,7 +732,7 @@ class Mss_Connector_IndexController extends Mage_Core_Controller_Front_Action {
|
|
733 |
'product_type'=>$product->getTypeId(),
|
734 |
'rating' => $rating_final,
|
735 |
'wishlist' => Mage::helper('connector')->check_wishlist($product->getId ()),
|
736 |
-
'specialprice'=>number_format (Mage::helper('connector')->
|
737 |
);
|
738 |
}
|
739 |
|
465 |
$baseCurrency, $currentCurrency ), 2, '.', '' ),
|
466 |
'symbol'=> Mage::helper('connector')->getCurrencysymbolByCode($this->currency),
|
467 |
'qty'=>(int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($product->getId())->getQty(),
|
|
|
468 |
'rating' => $rating_final,
|
469 |
'wishlist' => Mage::helper('connector')->check_wishlist($product->getId ()),
|
470 |
+
'specialprice'=> number_format (Mage::helper('connector')->getSpecialPriceByProductId($product->getId ()), 2, '.', '' ),
|
471 |
|
472 |
);
|
473 |
}
|
535 |
'product_type'=>$product->getTypeId(),
|
536 |
'rating' => $rating_final,
|
537 |
'wishlist' => Mage::helper('connector')->check_wishlist($product->getId ()),
|
538 |
+
'specialprice'=>number_format (Mage::helper('connector')->getSpecialPriceProduct($product->getId ()), 2, '.', '' ),
|
539 |
);
|
540 |
endif;
|
541 |
else:
|
560 |
'product_type'=>$product->getTypeId(),
|
561 |
'rating' => $rating_final,
|
562 |
'wishlist' => Mage::helper('connector')->check_wishlist($product->getId ()),
|
563 |
+
'specialprice'=>number_format (Mage::helper('connector')->getSpecialPriceProduct($product->getId ()), 2, '.', '' ),
|
564 |
);
|
565 |
endif;
|
566 |
endforeach;
|
657 |
'product_type'=>$product->getTypeId(),
|
658 |
'rating' => $rating_final,
|
659 |
'wishlist' => Mage::helper('connector')->check_wishlist($product->getId ()),
|
660 |
+
'specialprice'=>number_format (Mage::helper('connector')->getSpecialPriceProduct($product->getId ()), 2, '.', '' ),
|
661 |
);
|
662 |
}
|
663 |
return $new_productlist;
|
732 |
'product_type'=>$product->getTypeId(),
|
733 |
'rating' => $rating_final,
|
734 |
'wishlist' => Mage::helper('connector')->check_wishlist($product->getId ()),
|
735 |
+
'specialprice'=>number_format (Mage::helper('connector')->getSpecialPriceProduct($product->getId ()), 2, '.', '' ),
|
736 |
);
|
737 |
}
|
738 |
|
app/code/local/Mss/Connector/controllers/ProductsController.php
CHANGED
@@ -78,33 +78,7 @@ class Mss_Connector_ProductsController extends Mage_Core_Controller_Front_Action
|
|
78 |
$newPrice = Mage::helper('directory')->currencyConvert($price, $from, $to);
|
79 |
return $newPrice;
|
80 |
}
|
81 |
-
|
82 |
-
|
83 |
-
$product_id =$this->getRequest ()->getParam ( 'productid' );
|
84 |
-
$productdetail = array ();
|
85 |
-
$relArray = array();
|
86 |
-
$RelProduct = Mage::getModel('catalog/product')->load($product_id)->getRelatedProductIds();
|
87 |
-
|
88 |
-
foreach ($RelProduct as $id) {
|
89 |
-
$product = Mage::getModel('catalog/product')->load($id)->getData();
|
90 |
-
|
91 |
-
$relArray['entity_id'] = $product['entity_id'];
|
92 |
-
$relArray['sku'] = $product['sku'];
|
93 |
-
$relArray['name'] = $product['name'];
|
94 |
-
$relArray['image']= $product['image'];
|
95 |
-
$relArray['small_image'] = $product['small_image'];
|
96 |
-
$relArray['thumbnail']= $product['url_key'];
|
97 |
-
$relArray['url_path']= $product['url_path'];
|
98 |
-
$relArray['url_key'] = $product['url_key'];
|
99 |
-
$relArray['price'] = $product['price'];
|
100 |
-
$relArray['cost'] = $product['cost'];
|
101 |
-
|
102 |
-
array_push($productdetail, $relArray);
|
103 |
-
}
|
104 |
-
echo json_encode($productdetail);
|
105 |
-
}
|
106 |
-
|
107 |
-
|
108 |
public function getproductdetailAction() {
|
109 |
$this->productdetail($this->getRequest ()->getParam ( 'productid' ));
|
110 |
}
|
@@ -119,417 +93,331 @@ class Mss_Connector_ProductsController extends Mage_Core_Controller_Front_Action
|
|
119 |
}
|
120 |
|
121 |
public function productdetail($productid) {
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
298 |
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
echo json_encode ( $productdetail );
|
303 |
-
/*Bundle product type*/
|
304 |
-
} elseif($product->getTypeId() == "bundle") {
|
305 |
-
|
306 |
-
$storeUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
|
307 |
-
$description = nl2br ( $product->getDescription () );
|
308 |
-
$description = str_replace("{{media url=\"",$storeUrl,$description);
|
309 |
-
$description = str_replace("\"}}","",$description);
|
310 |
-
if($product->getData('has_options')){
|
311 |
-
$has_custom_options = true;
|
312 |
-
// Start custom options
|
313 |
-
$all_custom_option_array = array();
|
314 |
-
$attVal = $product->getOptions();
|
315 |
-
$optStr = "";
|
316 |
-
$inc=0;
|
317 |
-
$has_custom_option = 0;
|
318 |
-
|
319 |
-
foreach($attVal as $optionKey => $optionVal):
|
320 |
-
|
321 |
-
$has_custom_option = 1;
|
322 |
-
$all_custom_option_array[$inc]['custom_option_name']=$optionVal->getTitle();
|
323 |
-
$all_custom_option_array[$inc]['custom_option_id']=$optionVal->getId();
|
324 |
-
$all_custom_option_array[$inc]['custom_option_is_required']=$optionVal->getIsRequire();
|
325 |
-
$all_custom_option_array[$inc]['custom_option_type']=$optionVal->getType();
|
326 |
-
$all_custom_option_array[$inc]['sort_order'] = $optionVal->getSortOrder();
|
327 |
-
$all_custom_option_array[$inc]['all'] = $optionVal->getData();
|
328 |
-
|
329 |
-
if($all_custom_option_array[$inc]['all']['default_price_type'] == "percent")
|
330 |
-
$all_custom_option_array[$inc]['all']['price'] = number_format((($product->getFinalPrice()*round($all_custom_option_array[$inc]['all']['price']*10,2)/10)/100),2);
|
331 |
-
else
|
332 |
-
$all_custom_option_array[$inc]['all']['price'] = number_format($all_custom_option_array[$inc]['all']['price'],2);
|
333 |
-
|
334 |
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
$all_custom_option_array[$inc]['custom_option_value_array'];
|
339 |
-
$inner_inc =0;
|
340 |
-
|
341 |
-
foreach($optionVal->getValues() as $valuesKey => $valuesVal):
|
342 |
-
|
343 |
-
$all_custom_option_array[$inc]['custom_option_value_array'][$inner_inc]['id'] = $valuesVal->getId();
|
344 |
-
$all_custom_option_array[$inc]['custom_option_value_array'][$inner_inc]['title'] = $valuesVal->getTitle();
|
345 |
-
|
346 |
-
$defaultcustomprice = str_replace(",","",($valuesVal->getPrice()));
|
347 |
-
$all_custom_option_array[$inc]['custom_option_value_array'][$inner_inc]['price'] = strval(round($this->convert_currency($defaultcustomprice,$basecurrencycode,$currentcurrencycode),2));
|
348 |
-
$all_custom_option_array[$inc]['custom_option_value_array'][$inner_inc]['price_type'] = $valuesVal->getPriceType();
|
349 |
-
$all_custom_option_array[$inc]['custom_option_value_array'][$inner_inc]['sku'] = $valuesVal->getSku();
|
350 |
-
$all_custom_option_array[$inc]['custom_option_value_array'][$inner_inc]['sort_order'] = $valuesVal->getSortOrder();
|
351 |
-
|
352 |
-
if($valuesVal->getPriceType() == "percent"){
|
353 |
-
|
354 |
-
$defaultcustomprice = str_replace(",","", ($product->getFinalPrice()));
|
355 |
-
$customproductprice = strval(round($this->convert_currency($defaultcustomprice,$basecurrencycode,$currentcurrencycode),2));
|
356 |
-
$all_custom_option_array[$inc]['custom_option_value_array'][$inner_inc]['price'] = str_replace(",","", round((floatval($customproductprice) * floatval(round($valuesVal->getPrice(),1))/100),2));
|
357 |
-
}
|
358 |
-
|
359 |
-
$inner_inc++;
|
360 |
-
endforeach;
|
361 |
-
|
362 |
-
$inc++;
|
363 |
-
endforeach;
|
364 |
-
|
365 |
-
}
|
366 |
-
else
|
367 |
-
{
|
368 |
-
$has_custom_options = false;
|
369 |
-
}
|
370 |
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
376 |
|
377 |
-
$bundle = array();
|
378 |
-
$array = array();
|
379 |
-
foreach($collection as $item) {
|
380 |
-
$array['entity_id'] = $item['entity_id'];
|
381 |
-
$array['entity_type_id'] = $item['entity_type_id'];
|
382 |
-
$array['attribute_set_id'] = $item['attribute_set_id'];
|
383 |
-
$array['type_id'] = $item['type_id'];
|
384 |
-
$array['sku'] = $item['sku'];
|
385 |
-
$array['is_default'] = $item['is_default'];
|
386 |
-
$array['required_options'] = $item['required_options'];
|
387 |
-
$array['selection_id'] = $item['selection_id'];
|
388 |
-
$array['price_value'] = $item['selection_price_value'];
|
389 |
-
$array['section_quantity'] = $item['selection_qty'];
|
390 |
-
$array['selection_can_change_qty'] = $item['selection_can_change_qty'];
|
391 |
-
$array['selection_price_type'] = $item['selection_price_type'];
|
392 |
-
$array['selection_qty'] = $item['selection_qty'];
|
393 |
-
array_push($bundle,$array);
|
394 |
-
}
|
395 |
-
$productdetail = array (
|
396 |
-
'entity_id' => $product->getId (),
|
397 |
-
'product_type'=> $product->getTypeId(),
|
398 |
-
'sku' => $product->getSku (),
|
399 |
-
'name' => $product->getName (),
|
400 |
-
'news_from_date' => $product->getNewsFromDate (),
|
401 |
-
'news_to_date' => $product->getNewsToDate (),
|
402 |
-
'special_from_date' => $product->getSpecialFromDate (),
|
403 |
-
'special_to_date' => $product->getSpecialToDate (),
|
404 |
-
'image_url' => Mage::helper('connector')-> Imageresize($product->getImage(),'product','500','500'),
|
405 |
-
'url_key' => $product->getProductUrl().'?shareid='.$product->getId(),
|
406 |
-
'is_in_stock' => $product->isAvailable (),
|
407 |
-
/*'has_custom_options' => $has_custom_options,*/
|
408 |
-
'regular_price_with_tax' => number_format ( Mage::helper ( 'directory' )->currencyConvert ( $product->getPrice (), $baseCurrency, $currentCurrency ), 2, '.', '' ),
|
409 |
-
'final_price_with_tax' => number_format ( Mage::helper ( 'directory' )
|
410 |
-
->currencyConvert (
|
411 |
-
Mage::helper('tax')->getPrice($product, $product->getFinalPrice(),
|
412 |
-
true, null, null, null, null, false),
|
413 |
-
$baseCurrency, $currentCurrency ), 2, '.', '' ),
|
414 |
-
'storeUrl' => $storeUrl,
|
415 |
-
'description' => $description,
|
416 |
-
'short_description'=>nl2br ($product->getShortDescription()),
|
417 |
-
'symbol' => Mage::helper('connector')->getCurrencysymbolByCode($this->currency),
|
418 |
-
'weight'=>$product->getWeight(),
|
419 |
-
'review'=>$reviews,
|
420 |
-
'rating'=>$rating,
|
421 |
-
'product_type'=>$product->getTypeId(),
|
422 |
-
'wishlist' => Mage::helper('connector')->check_wishlist($product->getId ()),
|
423 |
-
'additional'=>$addtionatt,
|
424 |
-
'specialprice'=>number_format (Mage::helper('connector')->getSpecialPriceByProductId($product->getId ()), 2, '.', '' ),
|
425 |
-
);
|
426 |
-
if(count($all_custom_option_array))
|
427 |
-
$productdetail["custom_option"] = $all_custom_option_array;
|
428 |
-
|
429 |
-
if(count($bundle))
|
430 |
-
$productdetail["bundleProduct"] = $bundle;
|
431 |
-
echo json_encode ( $productdetail );
|
432 |
-
}
|
433 |
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
'specialprice'=>number_format (Mage::helper('connector')->getSpecialPriceByProductId($product->getId ()), 2, '.', '' ),
|
525 |
-
);
|
526 |
-
if(count($all_custom_option_array))
|
527 |
-
$productdetail["custom_option"] = $all_custom_option_array;
|
528 |
|
529 |
-
|
|
|
|
|
530 |
|
531 |
-
|
532 |
-
|
533 |
|
534 |
|
535 |
public function getPicListsAction() {
|
@@ -694,7 +582,7 @@ class Mss_Connector_ProductsController extends Mage_Core_Controller_Front_Action
|
|
694 |
->setPageSize ($limit)
|
695 |
->addAttributeToFilter(array(
|
696 |
array('attribute'=>'name', 'like' => '%'.$searchstring.'%'),
|
697 |
-
|
698 |
))
|
699 |
->addAttributeToFilter ( 'status', 1 )
|
700 |
->addAttributeToFilter ( 'visibility', array ('neq' => 1 ) )
|
@@ -730,7 +618,7 @@ class Mss_Connector_ProductsController extends Mage_Core_Controller_Front_Action
|
|
730 |
'product_type'=>$product->getTypeId(),
|
731 |
'wishlist' => Mage::helper('connector')->check_wishlist($product->getId ()),
|
732 |
'categoryid' => end($product->getCategoryIds()),
|
733 |
-
'specialprice'=>number_format (Mage::helper('connector')->
|
734 |
);
|
735 |
}
|
736 |
|
@@ -838,6 +726,43 @@ class Mss_Connector_ProductsController extends Mage_Core_Controller_Front_Action
|
|
838 |
echo json_encode(array('status'=>'success','message'=>'Review added sucessfully.'));
|
839 |
exit;
|
840 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
841 |
|
842 |
|
843 |
}
|
78 |
$newPrice = Mage::helper('directory')->currencyConvert($price, $from, $to);
|
79 |
return $newPrice;
|
80 |
}
|
81 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
public function getproductdetailAction() {
|
83 |
$this->productdetail($this->getRequest ()->getParam ( 'productid' ));
|
84 |
}
|
93 |
}
|
94 |
|
95 |
public function productdetail($productid) {
|
96 |
+
$productdetail = array ();
|
97 |
+
$baseCurrency = Mage::app ()->getStore ()->getBaseCurrency ()->getCode ();
|
98 |
+
|
99 |
+
$currentCurrency = $this->currency;
|
100 |
+
/*$productid = $this->getRequest ()->getParam ( 'productid' );*/
|
101 |
+
|
102 |
+
$model = Mage::getModel ( "catalog/product" );
|
103 |
+
$product = $model->load ( $productid );
|
104 |
+
|
105 |
+
/*get product rating*/
|
106 |
+
|
107 |
+
$reviews = Mage::getModel('review/review')
|
108 |
+
->getResourceCollection()
|
109 |
+
->addStoreFilter(Mage::app()->getStore()->getId())
|
110 |
+
->addEntityFilter('product', $productid)
|
111 |
+
->addStatusFilter(Mage_Review_Model_Review::STATUS_APPROVED)
|
112 |
+
->setDateOrder()
|
113 |
+
->addRateVotes();
|
114 |
+
$avg = 0;
|
115 |
+
$ratings = array();
|
116 |
+
$rdetails=array();
|
117 |
+
$all_custom_option_array = array();
|
118 |
+
|
119 |
+
if (count($reviews) > 0):
|
120 |
+
foreach ($reviews->getItems() as $review):
|
121 |
+
|
122 |
+
$review_rating=0;
|
123 |
+
|
124 |
+
foreach( $review->getRatingVotes() as $vote ):
|
125 |
+
$review_rating = $vote->getPercent();
|
126 |
+
$ratings[] = $vote->getPercent();
|
127 |
+
endforeach;
|
128 |
+
|
129 |
+
if($review_rating)
|
130 |
+
$rating_by = ($review_rating/20);
|
131 |
+
|
132 |
+
$rdetails[]= array(
|
133 |
+
'title'=>$review->getTitle(),
|
134 |
+
'description'=>$review->getDetail(),
|
135 |
+
'reviewby'=>$review->getNickname(),
|
136 |
+
'rating_by'=>$rating_by,
|
137 |
+
'rating_date'=>date("d-m-Y", strtotime($review->getCreatedAt())),
|
138 |
+
);
|
139 |
+
endforeach;
|
140 |
+
$avg = array_sum($ratings)/count($ratings);
|
141 |
+
endif;
|
142 |
+
|
143 |
+
$rating=ceil($avg/20);
|
144 |
+
$reviews=$rdetails;
|
145 |
+
|
146 |
+
/*get product rating*/
|
147 |
+
|
148 |
+
if($product->getTypeId() == "configurable"):
|
149 |
+
$productdetail = array();
|
150 |
+
$config = $product->getTypeInstance(true);
|
151 |
+
|
152 |
+
$conf = Mage::getModel('catalog/product_type_configurable')->setProduct($product);
|
153 |
+
$simple_collection = $conf->getUsedProductCollection()->addAttributeToSelect('*')->addFilterByRequiredOptions()->getData();
|
154 |
+
|
155 |
+
$storeUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
|
156 |
+
$description = nl2br ( $product->getDescription () );
|
157 |
+
$description = str_replace("{{media url=\"",$storeUrl,$description);
|
158 |
+
$description = str_replace("\"}}","",$description);
|
159 |
+
|
160 |
+
$c_ops=array();
|
161 |
+
|
162 |
+
if($product->getData('has_options')):
|
163 |
+
$has_custom_options = true;
|
164 |
+
// Start custom options
|
165 |
+
$all_custom_option_array = array();
|
166 |
+
$attVal = $product->getOptions();
|
167 |
+
$optStr = "";
|
168 |
+
$inc=0;
|
169 |
+
$has_custom_option = 0;
|
170 |
+
|
171 |
+
foreach($attVal as $optionKey => $optionVal):
|
172 |
+
|
173 |
+
$has_custom_option = 1;
|
174 |
+
$all_custom_option_array[$inc]['custom_option_name']=$optionVal->getTitle();
|
175 |
+
$all_custom_option_array[$inc]['custom_option_id']=$optionVal->getId();
|
176 |
+
$all_custom_option_array[$inc]['custom_option_is_required']=$optionVal->getIsRequire();
|
177 |
+
$all_custom_option_array[$inc]['custom_option_type']=$optionVal->getType();
|
178 |
+
$all_custom_option_array[$inc]['sort_order'] = $optionVal->getSortOrder();
|
179 |
+
$all_custom_option_array[$inc]['all'] = $optionVal->getData();
|
180 |
+
|
181 |
+
if($all_custom_option_array[$inc]['all']['default_price_type'] == "percent")
|
182 |
+
$all_custom_option_array[$inc]['all']['price'] = number_format((($product->getFinalPrice()*round($all_custom_option_array[$inc]['all']['price']*10,2)/10)/100),2);
|
183 |
+
else
|
184 |
+
$all_custom_option_array[$inc]['all']['price'] = number_format($all_custom_option_array[$inc]['all']['price'],2);
|
185 |
+
|
186 |
+
|
187 |
+
$all_custom_option_array[$inc]['all']['price'] = str_replace(",","",$all_custom_option_array[$inc]['all']['price']);
|
188 |
+
$all_custom_option_array[$inc]['all']['price'] = strval(round($this->convert_currency($all_custom_option_array[$inc]['all']['price'],$basecurrencycode,$currentcurrencycode),2));
|
189 |
+
|
190 |
+
$all_custom_option_array[$inc]['custom_option_value_array'];
|
191 |
+
$inner_inc =0;
|
192 |
+
|
193 |
+
foreach($optionVal->getValues() as $valuesKey => $valuesVal):
|
194 |
+
|
195 |
+
$all_custom_option_array[$inc]['custom_option_value_array'][$inner_inc]['id'] = $valuesVal->getId();
|
196 |
+
$all_custom_option_array[$inc]['custom_option_value_array'][$inner_inc]['title'] = $valuesVal->getTitle();
|
197 |
+
|
198 |
+
$defaultcustomprice = str_replace(",","",($valuesVal->getPrice()));
|
199 |
+
$all_custom_option_array[$inc]['custom_option_value_array'][$inner_inc]['price'] = strval(round($this->convert_currency($defaultcustomprice,$basecurrencycode,$currentcurrencycode),2));
|
200 |
+
$all_custom_option_array[$inc]['custom_option_value_array'][$inner_inc]['price_type'] = $valuesVal->getPriceType();
|
201 |
+
$all_custom_option_array[$inc]['custom_option_value_array'][$inner_inc]['sku'] = $valuesVal->getSku();
|
202 |
+
$all_custom_option_array[$inc]['custom_option_value_array'][$inner_inc]['sort_order'] = $valuesVal->getSortOrder();
|
203 |
+
|
204 |
+
if($valuesVal->getPriceType() == "percent"):
|
205 |
+
|
206 |
+
$defaultcustomprice = str_replace(",","", ($product->getFinalPrice()));
|
207 |
+
$customproductprice = strval(round($this->convert_currency($defaultcustomprice,$basecurrencycode,$currentcurrencycode),2));
|
208 |
+
$all_custom_option_array[$inc]['custom_option_value_array'][$inner_inc]['price'] = str_replace(",","", round((floatval($customproductprice) * floatval(round($valuesVal->getPrice(),1))/100),2));
|
209 |
+
endif;
|
210 |
+
|
211 |
+
$inner_inc++;
|
212 |
+
endforeach;
|
213 |
+
|
214 |
+
$inc++;
|
215 |
+
endforeach;
|
216 |
+
|
217 |
+
|
218 |
+
else:
|
219 |
+
$has_custom_options = false;
|
220 |
+
endif;
|
221 |
+
|
222 |
+
$addtionatt=$this->_getAditional();
|
223 |
+
|
224 |
+
|
225 |
+
/*get confiogurable product attributes*/
|
226 |
+
Mage::register('product', $product);
|
227 |
+
Mage::helper('catalog/product')->setSkipSaleableCheck(true);
|
228 |
+
|
229 |
+
$config_attributes = new Mage_Catalog_Block_Product_View_Type_Configurable;
|
230 |
+
$condigurable_data = json_decode($config_attributes->getJsonConfig(),1);
|
231 |
+
$baseCurrency = Mage::app ()->getStore ()->getBaseCurrency ()->getCode ();
|
232 |
+
$currentCurrency = $this->currency;
|
233 |
+
$configurable = array();
|
234 |
+
$childProducts = array();
|
235 |
+
$new_array = array();
|
236 |
+
foreach($condigurable_data['attributes'] as $key => $value){
|
237 |
+
$configurable[] = $value;
|
238 |
+
$childProducts[] = $value['options'];
|
239 |
+
}
|
240 |
+
|
241 |
+
// print_r($value['options']); die(';s');
|
242 |
+
$load_product_model = Mage::getModel('catalog/product');
|
243 |
+
foreach ($childProducts as $key => $values) {
|
244 |
+
foreach ($values as $key => $valuess) {
|
245 |
+
foreach ($valuess['products'] as $key => $val) {
|
246 |
+
$load_product_data =$load_product_model->load($val);
|
247 |
+
$new_array1['name'] = $load_product_data->getName ();
|
248 |
+
$finalPrice = ($load_product_data->getData('final_price'))?:$load_product_data->getData('special_price');
|
249 |
+
$new_array1['regular_price_with_tax'] = number_format($load_product_data->getPrice (), 2, '.', '');
|
250 |
+
|
251 |
+
/* $new_array1['final_price_with_tax'] = number_format ( Mage::helper ( 'directory' )->currencyConvert (
|
252 |
+
Mage::helper('tax')->getPrice($load_product_data, $load_product_data->getFinalPrice(),
|
253 |
+
true, null, null, null, null, false),*/
|
254 |
+
$new_array1['final_price_with_tax'] = number_format ( Mage::helper ( 'directory' )
|
255 |
+
->currencyConvert (
|
256 |
+
Mage::helper('tax')->getPrice($load_product_data, $finalPrice,
|
257 |
+
true, null, null, null, null, false),
|
258 |
+
$baseCurrency, $currentCurrency ), 2, '.', '' );
|
259 |
+
$new_array1['id'] = $load_product_data->getId ();
|
260 |
+
$new_array[] = $new_array1;
|
261 |
+
}
|
262 |
+
|
263 |
+
}
|
264 |
+
|
265 |
+
}
|
266 |
+
//$finalPrice = ($product->getData('final_price'))?:$product->getData('special_price');
|
267 |
+
$productdetail = array (
|
268 |
+
'entity_id' => $product->getId (),
|
269 |
+
'sku' => $product->getSku (),
|
270 |
+
'name' => $product->getName (),
|
271 |
+
'news_from_date' => $product->getNewsFromDate (),
|
272 |
+
'news_to_date' => $product->getNewsToDate (),
|
273 |
+
'special_from_date' => $product->getSpecialFromDate (),
|
274 |
+
'special_to_date' => $product->getSpecialToDate (),
|
275 |
+
'image_url' => Mage::helper('connector')-> Imageresize($product->getImage(),'product','500','500'),
|
276 |
+
'url_key' => $product->getProductUrl().'?shareid='.$product->getId(),
|
277 |
+
'is_in_stock' => $product->isAvailable (),
|
278 |
+
'has_custom_options' => $has_custom_options,
|
279 |
+
/* 'regular_price_with_tax' => number_format ( Mage::helper ( 'directory' )->currencyConvert ( $product->getData('price'), $baseCurrency, $currentCurrency ), 2, '.', '' ),
|
280 |
+
'final_price_with_tax' => number_format ( Mage::helper ( 'directory' )
|
281 |
+
->currencyConvert (
|
282 |
+
Mage::helper('tax')->getPrice($product, $finalPrice,
|
283 |
+
true, null, null, null, null, false),
|
284 |
+
$baseCurrency, $currentCurrency ), 2, '.', '' ),*/
|
285 |
+
'regular_price_with_tax' => number_format ( Mage::helper ( 'directory' )->currencyConvert ( $product->getPrice (), $baseCurrency, $currentCurrency ), 2, '.', '' ),
|
286 |
+
'final_price_with_tax' => number_format ( Mage::helper ( 'directory' )
|
287 |
+
->currencyConvert (
|
288 |
+
Mage::helper('tax')->getPrice($product, $product->getFinalPrice(),
|
289 |
+
true, null, null, null, null, false),
|
290 |
+
$baseCurrency, $currentCurrency ), 2, '.', '' ),
|
291 |
+
'storeUrl' => $storeUrl,
|
292 |
+
'description' => $description,
|
293 |
+
'short_description'=>nl2br ($product->getShortDescription()),
|
294 |
+
'symbol' => Mage::helper('connector')->getCurrencysymbolByCode($this->currency),
|
295 |
+
'weight'=>$product->getWeight(),
|
296 |
+
'review'=>$reviews,
|
297 |
+
'rating'=>$rating,
|
298 |
+
'wishlist' => Mage::helper('connector')->check_wishlist($product->getId ()),
|
299 |
+
'additional'=>$addtionatt,
|
300 |
+
'specialprice'=>number_format (Mage::helper('connector')->
|
301 |
+
getSpecialPriceProduct($product->getId ()), 2, '.', '' ),
|
302 |
+
/*'specialprice'=>number_format (($finalPrice <= $product->getData('special_price'))?$finalPrice : $product->getData('special_price'), 2, '.', '' )*/
|
303 |
+
);
|
304 |
|
305 |
+
if(count($all_custom_option_array))
|
306 |
+
$productdetail["custom_option"] = $all_custom_option_array;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
307 |
|
308 |
+
if(count($configurable))
|
309 |
+
$productdetail["configurable"] = $configurable;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
310 |
|
311 |
+
if(count($new_array))
|
312 |
+
$productdetail["childProducts"] = $new_array;
|
313 |
+
|
314 |
+
|
315 |
+
echo json_encode ( $productdetail );
|
316 |
+
|
317 |
+
else:
|
318 |
+
$storeUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
|
319 |
+
$description = nl2br ( $product->getDescription () );
|
320 |
+
$description = str_replace("{{media url=\"",$storeUrl,$description);
|
321 |
+
$description = str_replace("\"}}","",$description);
|
322 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
|
324 |
+
$c_ops=array();
|
325 |
+
|
326 |
+
if ($product->getData('has_options')):
|
327 |
+
$has_custom_options = true;
|
328 |
+
|
329 |
+
$all_custom_option_array = array();
|
330 |
+
$attVal = $product->getOptions();
|
331 |
+
$optStr = "";
|
332 |
+
$inc=0;
|
333 |
+
$has_custom_option = 0;
|
334 |
+
foreach($attVal as $optionKey => $optionVal):
|
335 |
+
|
336 |
+
$has_custom_option = 1;
|
337 |
+
$all_custom_option_array[$inc]['custom_option_name']=$optionVal->getTitle();
|
338 |
+
$all_custom_option_array[$inc]['custom_option_id']=$optionVal->getId();
|
339 |
+
$all_custom_option_array[$inc]['custom_option_is_required']=$optionVal->getIsRequire();
|
340 |
+
$all_custom_option_array[$inc]['custom_option_type']=$optionVal->getType();
|
341 |
+
$all_custom_option_array[$inc]['sort_order'] = $optionVal->getSortOrder();
|
342 |
+
$all_custom_option_array[$inc]['all'] = $optionVal->getData();
|
343 |
+
|
344 |
+
if($all_custom_option_array[$inc]['all']['default_price_type'] == "percent")
|
345 |
+
$all_custom_option_array[$inc]['all']['price'] = number_format((($product->getFinalPrice()*round($all_custom_option_array[$inc]['all']['price']*10,2)/10)/100),2);
|
346 |
+
else
|
347 |
+
$all_custom_option_array[$inc]['all']['price'] = number_format($all_custom_option_array[$inc]['all']['price'],2);
|
348 |
+
|
349 |
+
|
350 |
+
$all_custom_option_array[$inc]['all']['price'] = str_replace(",","",$all_custom_option_array[$inc]['all']['price']);
|
351 |
+
$all_custom_option_array[$inc]['all']['price'] = strval(round($this->convert_currency($all_custom_option_array[$inc]['all']['price'],$basecurrencycode,$currentcurrencycode),2));
|
352 |
+
|
353 |
+
$all_custom_option_array[$inc]['custom_option_value_array'];
|
354 |
+
$inner_inc =0;
|
355 |
+
|
356 |
+
foreach($optionVal->getValues() as $valuesKey => $valuesVal):
|
357 |
+
|
358 |
+
$all_custom_option_array[$inc]['custom_option_value_array'][$inner_inc]['id'] = $valuesVal->getId();
|
359 |
+
$all_custom_option_array[$inc]['custom_option_value_array'][$inner_inc]['title'] = $valuesVal->getTitle();
|
360 |
+
$defaultcustomprice = str_replace(",","",($valuesVal->getPrice()));
|
361 |
+
$all_custom_option_array[$inc]['custom_option_value_array'][$inner_inc]['price'] = strval(round($this->convert_currency($defaultcustomprice,$basecurrencycode,$currentcurrencycode),2));
|
362 |
+
$all_custom_option_array[$inc]['custom_option_value_array'][$inner_inc]['price_type'] = $valuesVal->getPriceType();
|
363 |
+
$all_custom_option_array[$inc]['custom_option_value_array'][$inner_inc]['sku'] = $valuesVal->getSku();
|
364 |
+
$all_custom_option_array[$inc]['custom_option_value_array'][$inner_inc]['sort_order'] = $valuesVal->getSortOrder();
|
365 |
+
|
366 |
+
if($valuesVal->getPriceType() == "percent"):
|
367 |
+
$defaultcustomprice = str_replace(",","", ($product->getFinalPrice()));
|
368 |
+
$customproductprice = strval(round($this->convert_currency($defaultcustomprice,$basecurrencycode,$currentcurrencycode),2));
|
369 |
+
$all_custom_option_array[$inc]['custom_option_value_array'][$inner_inc]['price'] = str_replace(",","", round((floatval($customproductprice) * floatval(round($valuesVal->getPrice(),1))/100),2));
|
370 |
+
endif;
|
371 |
+
|
372 |
+
$inner_inc++;
|
373 |
+
endforeach;
|
374 |
+
$inc++;
|
375 |
+
|
376 |
+
endforeach;
|
377 |
+
else:
|
378 |
+
$has_custom_options = false;
|
379 |
+
endif;
|
380 |
+
|
381 |
+
$addtionatt=$this->_getAditional();
|
382 |
+
$productdetail = array (
|
383 |
+
'entity_id' => $product->getId (),
|
384 |
+
'sku' => $product->getSku (),
|
385 |
+
'name' => $product->getName (),
|
386 |
+
'news_from_date' => $product->getNewsFromDate (),
|
387 |
+
'news_to_date' => $product->getNewsToDate (),
|
388 |
+
'special_from_date' => $product->getSpecialFromDate (),
|
389 |
+
'special_to_date' => $product->getSpecialToDate (),
|
390 |
+
'image_url' => Mage::helper('connector')-> Imageresize($product->getImage(),'product_main','500','500'),
|
391 |
+
'url_key' => $product->getProductUrl().'?shareid='.$product->getId(),
|
392 |
+
'is_in_stock' => $product->isAvailable (),
|
393 |
+
'has_custom_options' => $has_custom_options,
|
394 |
+
'regular_price_with_tax' => number_format ( Mage::helper ( 'directory' )->currencyConvert ( $product->getPrice (), $baseCurrency, $currentCurrency ), 2, '.', '' ),
|
395 |
+
'final_price_with_tax' => number_format ( Mage::helper ( 'directory' )
|
396 |
+
->currencyConvert (
|
397 |
+
Mage::helper('tax')->getPrice($product, $product->getFinalPrice(),
|
398 |
+
true, null, null, null, null, false),
|
399 |
+
$baseCurrency, $currentCurrency ), 2, '.', '' ),
|
400 |
+
'storeUrl' => $storeUrl,
|
401 |
+
'description' => $description,
|
402 |
+
'short_description'=>nl2br ($product->getShortDescription()),
|
403 |
+
'symbol' => Mage::helper('connector')->getCurrencysymbolByCode($this->currency) ,
|
404 |
+
'weight'=>$product->getWeight(),
|
405 |
+
'qty'=>(int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($product->getId())->getQty(),
|
406 |
+
'review'=>$reviews,
|
407 |
+
'rating'=>$rating,
|
408 |
+
'wishlist' => Mage::helper('connector')->check_wishlist($product->getId ()),
|
409 |
+
'additional'=>$addtionatt,
|
410 |
+
'specialprice'=>number_format (Mage::helper('connector')->getSpecialPriceProduct($product->getId ()), 2, '.', '' ),
|
411 |
+
);
|
412 |
+
if(count($all_custom_option_array))
|
413 |
+
$productdetail["custom_option"] = $all_custom_option_array;
|
|
|
|
|
|
|
|
|
414 |
|
415 |
+
|
416 |
+
|
417 |
+
echo json_encode ( $productdetail );
|
418 |
|
419 |
+
endif;
|
420 |
+
}
|
421 |
|
422 |
|
423 |
public function getPicListsAction() {
|
582 |
->setPageSize ($limit)
|
583 |
->addAttributeToFilter(array(
|
584 |
array('attribute'=>'name', 'like' => '%'.$searchstring.'%'),
|
585 |
+
// array('attribute'=>'description', 'like' => '%'.$searchstring.'%'),
|
586 |
))
|
587 |
->addAttributeToFilter ( 'status', 1 )
|
588 |
->addAttributeToFilter ( 'visibility', array ('neq' => 1 ) )
|
618 |
'product_type'=>$product->getTypeId(),
|
619 |
'wishlist' => Mage::helper('connector')->check_wishlist($product->getId ()),
|
620 |
'categoryid' => end($product->getCategoryIds()),
|
621 |
+
'specialprice'=>number_format (Mage::helper('connector')->getSpecialPriceProduct($product->getId ()), 2, '.', '' ),
|
622 |
);
|
623 |
}
|
624 |
|
726 |
echo json_encode(array('status'=>'success','message'=>'Review added sucessfully.'));
|
727 |
exit;
|
728 |
}
|
729 |
+
public function getrelatedProductAction(){
|
730 |
+
|
731 |
+
$product_id =$this->getRequest ()->getParam ( 'productid' );
|
732 |
+
$productdetail = array ();
|
733 |
+
$relArray = array();
|
734 |
+
$RelProduct = Mage::getModel('catalog/product')->load($product_id)->getRelatedProductIds();
|
735 |
+
$baseCurrency = Mage::app ()->getStore ()->getBaseCurrency ()->getCode ();
|
736 |
+
$currentCurrency = $this->currency;
|
737 |
+
foreach ($RelProduct as $id) {
|
738 |
+
$collection = Mage::getModel('catalog/product');
|
739 |
+
$products = $collection->load($id);
|
740 |
+
$product = $products->getData();
|
741 |
+
|
742 |
+
if($products->getTypeId() == "configurable")
|
743 |
+
$qty = Mage::helper('connector')->getProductStockInfoById($products->getId());
|
744 |
+
else
|
745 |
+
$qty = (int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($products->getId())->getQty();
|
746 |
+
|
747 |
+
$relArray['entity_id'] = $product['entity_id'];
|
748 |
+
$relArray['sku'] = $product['sku'];
|
749 |
+
$relArray['name'] = $product['name'];
|
750 |
+
$relArray['image']= Mage::helper('connector')-> Imageresize($products->getImage(),'product','300','300');
|
751 |
+
$relArray['url_key'] = $products->getProductUrl ();
|
752 |
+
$relArray['regular_price_with_tax'] = number_format ( Mage::helper ( 'directory' )->currencyConvert ( $products->getPrice (), $baseCurrency, $currentCurrency ), 2, '.', '' );
|
753 |
+
$relArray['final_price_with_tax'] = number_format ( Mage::helper ( 'directory' )->currencyConvert (
|
754 |
+
Mage::helper('tax')->getPrice($products, $products->getFinalPrice(),
|
755 |
+
true, null, null, null, null, false),
|
756 |
+
$baseCurrency, $currentCurrency ), 2, '.', '' );
|
757 |
+
$relArray['symbol']=Mage::helper('connector')->getCurrencysymbolByCode($this->currency);
|
758 |
+
$relArray['qty']=$qty;
|
759 |
+
$relArray['wishlist'] = Mage::helper('connector')->check_wishlist($products->getId ());
|
760 |
+
$relArray['specialprice']=number_format (Mage::helper('connector')->getSpecialPriceProduct($products->getId ()), 2, '.', '' );
|
761 |
+
|
762 |
+
array_push($productdetail, $relArray);
|
763 |
+
}
|
764 |
+
echo json_encode($productdetail);
|
765 |
+
}
|
766 |
|
767 |
|
768 |
}
|
app/code/local/Mss/Connector/controllers/TokenController.php
CHANGED
@@ -172,6 +172,7 @@ class Mss_Connector_TokenController extends Mage_Core_Controller_Front_Action {
|
|
172 |
$adminSessionLifetime = (int)Mage::getStoreConfig('admin/security/session_cookie_lifetime');
|
173 |
if($adminSessionLifetime < 86400)
|
174 |
$this->saveConfig('admin/security/session_cookie_lifetime','86400');
|
|
|
175 |
|
176 |
return true;
|
177 |
}
|
172 |
$adminSessionLifetime = (int)Mage::getStoreConfig('admin/security/session_cookie_lifetime');
|
173 |
if($adminSessionLifetime < 86400)
|
174 |
$this->saveConfig('admin/security/session_cookie_lifetime','86400');
|
175 |
+
$this->saveConfig('admin/cookie/cookie_lifetime','86400000');
|
176 |
|
177 |
return true;
|
178 |
}
|
app/code/local/Mss/Connector/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Mss_Connector>
|
5 |
-
<version>2.
|
6 |
</Mss_Connector>
|
7 |
</modules>
|
8 |
<frontend>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Mss_Connector>
|
5 |
+
<version>2.5.0</version>
|
6 |
</Mss_Connector>
|
7 |
</modules>
|
8 |
<frontend>
|
app/code/local/Mss/Payu/controllers/IndexController.php
CHANGED
@@ -40,7 +40,7 @@ class Mss_Payu_IndexController extends Mage_Core_Controller_Front_Action{
|
|
40 |
->setShouldCloseParentTransaction(true)
|
41 |
->setIsTransactionClosed(1)
|
42 |
->registerCaptureNotification();
|
43 |
-
|
44 |
endif;
|
45 |
|
46 |
$order->save();
|
40 |
->setShouldCloseParentTransaction(true)
|
41 |
->setIsTransactionClosed(1)
|
42 |
->registerCaptureNotification();
|
43 |
+
$order->sendNewOrderEmail();
|
44 |
endif;
|
45 |
|
46 |
$order->save();
|
app/code/local/Mss/Pushnotification/Helper/Data.php
CHANGED
@@ -60,7 +60,7 @@ class Mss_Pushnotification_Helper_Data extends Mage_Core_Helper_Abstract
|
|
60 |
$passphrase = Mage::getStoreConfig(self::SEND_IOS_PASSWORD);
|
61 |
|
62 |
$ctx = stream_context_create();
|
63 |
-
stream_context_set_option($ctx, 'ssl', 'local_cert', Mage::
|
64 |
stream_context_set_option($ctx, 'ssl', 'passphrase', $passphrase);
|
65 |
|
66 |
$ios_mode=(!Mage::getStoreConfig(self::IOS_MODE))?'ssl://gateway.sandbox.push.apple.com:2195':'ssl://gateway.push.apple.com:2195';
|
@@ -72,7 +72,6 @@ class Mss_Pushnotification_Helper_Data extends Mage_Core_Helper_Abstract
|
|
72 |
if (!$fp)
|
73 |
exit("The detail entered for IOS is not correct: $err $errstr" . PHP_EOL);
|
74 |
|
75 |
-
echo 'Connected to APNS' . PHP_EOL;
|
76 |
|
77 |
// Create the payload body
|
78 |
$body['aps'] = array(
|
@@ -116,7 +115,7 @@ class Mss_Pushnotification_Helper_Data extends Mage_Core_Helper_Abstract
|
|
116 |
|
117 |
$fields = array(
|
118 |
'registration_ids' => $registration_id,
|
119 |
-
'data'
|
120 |
|
121 |
);
|
122 |
|
60 |
$passphrase = Mage::getStoreConfig(self::SEND_IOS_PASSWORD);
|
61 |
|
62 |
$ctx = stream_context_create();
|
63 |
+
stream_context_set_option($ctx, 'ssl', 'local_cert', Mage::getBaseDir().'/media/pem/'.Mage::getStoreConfig(self::IOS_PEM));
|
64 |
stream_context_set_option($ctx, 'ssl', 'passphrase', $passphrase);
|
65 |
|
66 |
$ios_mode=(!Mage::getStoreConfig(self::IOS_MODE))?'ssl://gateway.sandbox.push.apple.com:2195':'ssl://gateway.push.apple.com:2195';
|
72 |
if (!$fp)
|
73 |
exit("The detail entered for IOS is not correct: $err $errstr" . PHP_EOL);
|
74 |
|
|
|
75 |
|
76 |
// Create the payload body
|
77 |
$body['aps'] = array(
|
115 |
|
116 |
$fields = array(
|
117 |
'registration_ids' => $registration_id,
|
118 |
+
'data' =>$message
|
119 |
|
120 |
);
|
121 |
|
package.xml
CHANGED
@@ -1,25 +1,21 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Mss_Connector</name>
|
4 |
-
<version>2.
|
5 |
<stability>stable</stability>
|
6 |
-
<license
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Mobile Multi store app for Android and Iphone</summary>
|
10 |
-
<description>Mobile
|
11 |
-
<notes>Fixes:-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
4) Banner conflicting resolved.
|
16 |
-
5) Push Notification issue resolved.
|
17 |
-
6) coupon issue resolved.
|
18 |
-
</notes>
|
19 |
<authors><author><name>mss</name><user>mss</user><email>mss.yogendra@gmail.com</email></author></authors>
|
20 |
-
<date>2016-09
|
21 |
-
<time>
|
22 |
-
<contents><target name="magelocal"><dir name="Mss"><dir name="Bannersliderapp"><dir name="Block"><dir name="Adminhtml"><dir name="Bannersliderapp"><dir name="Edit"><file name="Form.php" hash="c55bbba3b00c98a068bec9b9b12c4a40"/><dir name="Tab"><file name="Form.php" hash="486798bdd6429c53886bd15fb0fcf12b"/></dir><file name="Tabs.php" hash="ec6e540fda2b39feedc0a4c1192a3c7d"/></dir><file name="Edit.php" hash="010f4999a1ddc53e411562d83c3ad3f8"/><file name="Grid.php" hash="28c70476bdd3d44aa2cac9dc9f423ebb"/><dir name="Helper"><file name="Image.php" hash="d2ce47b0d7ab6ef5c31d0989fcc05f78"/></dir></dir><file name="Grid.php" hash="9c86bf7a2daa24e9416ff254396b2aa0"/><dir name="Renderer"><file name="Image.php" hash="0a9b4358a9409e7933e96c1eb157717e"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="db48c09c76d16ad7c094d32224329276"/></dir><dir name="Model"><file name="Bannersliderapp.php" hash="61f481ac93c5c494889d5ea7cb306bc0"/><dir name="Mysql4"><dir name="Bannersliderapp"><file name="Collection.php" hash="5d6543bbf3dee4d17b73244dbd0f843f"/></dir><file name="Bannersliderapp.php" hash="e000805a295e083e81f7163df7b92197"/></dir><file name="Observer.php" hash="65004e950e366b77a2cd1cb177d0f1ab"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="BannersliderappController.php" hash="6f9f94fd96e35225ed3bd8fdf7a3dc22"/></dir><file name="BannerController.php" hash="f20def146a84a727835d9cc827702367"/></dir><dir name="etc"><file name="adminhtml.xml" hash="dab3fdde55b6523faadc3fad70702c28"/><file name="config.xml" hash="1b31db628fae02e58e48c0e961351c2a"/></dir><dir name="sql"><dir name="bannersliderapp_setup"><file name="mysql4-install-0.1.1.php" hash="bbc6f32eb101c83a52cdef67c8b6a806"/></dir></dir></dir><dir name="Connector"><dir name="Block"><dir name="Adminhtml"><file name="Notifications.php" hash="6f24014b5a24a4f56410e9754b8aa2d5"/><file name="Support.php" hash="d120e7f8945a01d791d0f3d2c32dcfcf"/></dir><dir name="System"><dir name="Config"><file name="About.php" hash="2e9dc040ee2d42a57d5c9411f0b999e4"/><file name="Authorizenet.php" hash="ed644e9814fef74147bdddf24cfd75c1"/><file name="Banktransfer.php" hash="77f6ebf2074462cdadf4bccbe2f0d19a"/><file name="Checkmo.php" hash="edfc0fc0b233cd349392e563eeac57ed"/><file name="Cod.php" hash="37d1757764340fd02b8be7ac32434967"/><file name="Mpaypal.php" hash="e69d6a2d58618cf741d4cf503ede70ca"/><file name="Payu.php" hash="d0307013bdf58700a29aa7838ee94e51"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="
|
23 |
<compatible/>
|
24 |
<dependencies><required><php><min>5.3.0</min><max>7.0.5</max></php></required></dependencies>
|
25 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Mss_Connector</name>
|
4 |
+
<version>2.5.0</version>
|
5 |
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">OSLv1.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Mobile Multi store app for Android and Iphone</summary>
|
10 |
+
<description>Mobile Multi store app for Android and Iphone</description>
|
11 |
+
<notes>Fixes:- 
|
12 |
+
We have implanted the functionality of shipping and billing address.
|
13 |
+
Price functionality updated.
|
14 |
+
Minor bug fixes.</notes>
|
|
|
|
|
|
|
|
|
15 |
<authors><author><name>mss</name><user>mss</user><email>mss.yogendra@gmail.com</email></author></authors>
|
16 |
+
<date>2016-11-09</date>
|
17 |
+
<time>10:22:18</time>
|
18 |
+
<contents><target name="magelocal"><dir name="Mss"><dir name="Bannersliderapp"><dir name="Block"><dir name="Adminhtml"><dir name="Bannersliderapp"><dir name="Edit"><file name="Form.php" hash="c55bbba3b00c98a068bec9b9b12c4a40"/><dir name="Tab"><file name="Form.php" hash="486798bdd6429c53886bd15fb0fcf12b"/></dir><file name="Tabs.php" hash="ec6e540fda2b39feedc0a4c1192a3c7d"/></dir><file name="Edit.php" hash="010f4999a1ddc53e411562d83c3ad3f8"/><file name="Grid.php" hash="28c70476bdd3d44aa2cac9dc9f423ebb"/><dir name="Helper"><file name="Image.php" hash="d2ce47b0d7ab6ef5c31d0989fcc05f78"/></dir></dir><file name="Grid.php" hash="9c86bf7a2daa24e9416ff254396b2aa0"/><dir name="Renderer"><file name="Image.php" hash="0a9b4358a9409e7933e96c1eb157717e"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="db48c09c76d16ad7c094d32224329276"/></dir><dir name="Model"><file name="Bannersliderapp.php" hash="61f481ac93c5c494889d5ea7cb306bc0"/><dir name="Mysql4"><dir name="Bannersliderapp"><file name="Collection.php" hash="5d6543bbf3dee4d17b73244dbd0f843f"/></dir><file name="Bannersliderapp.php" hash="e000805a295e083e81f7163df7b92197"/></dir><file name="Observer.php" hash="65004e950e366b77a2cd1cb177d0f1ab"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="BannersliderappController.php" hash="6f9f94fd96e35225ed3bd8fdf7a3dc22"/></dir><file name="BannerController.php" hash="f20def146a84a727835d9cc827702367"/></dir><dir name="etc"><file name="adminhtml.xml" hash="dab3fdde55b6523faadc3fad70702c28"/><file name="config.xml" hash="1b31db628fae02e58e48c0e961351c2a"/></dir><dir name="sql"><dir name="bannersliderapp_setup"><file name="mysql4-install-0.1.1.php" hash="bbc6f32eb101c83a52cdef67c8b6a806"/></dir></dir></dir><dir name="Connector"><dir name="Block"><dir name="Adminhtml"><file name="Notifications.php" hash="6f24014b5a24a4f56410e9754b8aa2d5"/><file name="Support.php" hash="d120e7f8945a01d791d0f3d2c32dcfcf"/></dir><dir name="System"><dir name="Config"><file name="About.php" hash="2e9dc040ee2d42a57d5c9411f0b999e4"/><file name="Authorizenet.php" hash="ed644e9814fef74147bdddf24cfd75c1"/><file name="Banktransfer.php" hash="77f6ebf2074462cdadf4bccbe2f0d19a"/><file name="Checkmo.php" hash="edfc0fc0b233cd349392e563eeac57ed"/><file name="Cod.php" hash="37d1757764340fd02b8be7ac32434967"/><file name="Mpaypal.php" hash="e69d6a2d58618cf741d4cf503ede70ca"/><file name="Payu.php" hash="d0307013bdf58700a29aa7838ee94e51"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="2b2b667df63e7cd32c974d21620c6a91"/></dir><dir name="Model"><file name="Connector.php" hash="e9a927bc0a5974d092ab3af257ee7607"/><dir name="Mysql4"><dir name="Connector"><file name="Collection.php" hash="1f3bb37f160abdf974859f7419a19b65"/></dir><file name="Connector.php" hash="185189264d3275af813349e721ee46fb"/></dir><file name="Observer.php" hash="e6dacba5f08eaa4d02434ed50509ee8e"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="SupportController.php" hash="0f5afef5730673f0145cd5c8bbf1ed77"/></dir><file name="CartController.php" hash="1d72a22b74e7bf4ccdaef1b697ca8086"/><file name="CreditController.php" hash="a489dd0ed95914fb2b58491410f6f92f"/><file name="CustomerController.php" hash="5d2cd6f582560e777ad55f3d8e82038f"/><file name="FeedbackController.php" hash="2b9e092984c0c64397cd25fe1d2266d5"/><file name="IndexController.php" hash="097b645c1cd1ec9c2e9a93d74af3c172"/><file name="ItemsController.php" hash="03aeb9fceec3173e1aa678e03582b226"/><file name="ProductsController.php" hash="c0d8d3ee1b8fd1c31b9fc439a74d3314"/><file name="StaticpagesController.php" hash="86bfe2d07268507d60c4ee3c8834de08"/><file name="StoreinfoController.php" hash="c7600983d865fe529e020344e485cbed"/><file name="TokenController.php" hash="30e09062bb6f613c2ec3167da27cd571"/><file name="WishlistController.php" hash="082445ed48fde71569305aba02177337"/></dir><dir name="etc"><file name="adminhtml.xml" hash="dace418dcc6eee76831169b5c70176e7"/><file name="config.xml" hash="fefe81a8e5d9f1414b57f13afbfc1e68"/><file name="system.xml" hash="09be5e92b65afa6e91d062b3f7082e57"/></dir><dir name="sql"><dir name="connector_setup"><file name="mysql4-install-0.1.0.php" hash="4325ba30b21f9680b11d4b124b9e8181"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="eaa00e880b38ba41580b67785b33ed10"/></dir></dir></dir><dir name="Mpaypal"><dir name="Helper"><file name="Data.php" hash="c3ba57e7cc86210346b1b3f279083c0f"/></dir><dir name="Model"><file name="Mpaypal.php" hash="f49b32aad7d7bed49333534139fd07b7"/><file name="Observer.php" hash="4b92aaf547f0b080d8495cf064574d10"/></dir><dir name="controllers"><file name="IndexController.php" hash="c12439366cff0f0d0813543a2fd90f7f"/></dir><dir name="etc"><file name="config.xml" hash="9ed76ff53b5e0232b4ea442a7e046b14"/><file name="system.xml" hash="2f51ad686858a69e07e8c21baf5d690e"/></dir></dir><dir name="Payu"><dir name="Block"><file name="Index.php" hash="f6a324c1ac4b0c1dcfac775c51c2a34c"/></dir><dir name="Helper"><file name="Data.php" hash="7800e0e58258b78d0f23a7fec482d120"/></dir><dir name="controllers"><file name="IndexController.php" hash="46ec9fef2d62fa7c4e67f937f40685af"/></dir><dir name="etc"><file name="config.xml" hash="c6867fb0cc7efdde39c32a3ecbf62433"/></dir></dir><dir name="Pushnotification"><dir name="Block"><dir name="Adminhtml"><file name="Pushnotificationbackend.php" hash="6b9e143ee7b5fe4fc2642eee977b44bf"/></dir></dir><dir name="Helper"><file name="Data.php" hash="d84a29d3aa0fb6655300cab13a70f0cd"/></dir><dir name="Model"><dir name="Entity"><file name="Resource.php" hash="93b6a261762541433fa601aefb60d0a7"/></dir><dir name="Mysql4"><dir name="Pushnotification"><file name="Collection.php" hash="392612adedcb14ec5dcaaa4ea9858091"/></dir><file name="Pushnotification.php" hash="77f6cadb7682377a1de6b275310c1cf6"/></dir><file name="Pushnotification.php" hash="ad5fe0f74049c61402ff99fc32d8164a"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="File.php" hash="d7c74e49b78bb9da3453bd5f414a445f"/><file name="Image.php" hash="e1d98dbf511fe16581b37a8b7b43f5b4"/><file name="Iosmode.php" hash="ff1794ef4844019b7af64192fbd4e122"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="PushnotificationbackendController.php" hash="ec4ebd0ad1cfee78d2e67a69698a14e5"/></dir></dir><dir name="etc"><file name="config.xml" hash="daafb506dc1ed6bd54d8f8049e2e9595"/><file name="system.xml" hash="23a622dec8250a355bbaed9e83f1f82d"/></dir><dir name="sql"><dir name="pushnotification_setup"><file name="mysql4-install-0.1.0.php" hash="418e997bb72afa725389593d4ca2f111"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="e5939f147e797d9d8b7a9643f8cda7d8"/></dir></dir></dir><dir name="Sociallogin"><dir name="Helper"><file name="Data.php" hash="8965f0b6a0127d0965d99987aa0a300c"/></dir><dir name="Model"><dir name="Mysql4"><file name="Sociallogin.php" hash="b881bc47c5ee70b1c4c02b59501ffbc5"/></dir><file name="Sociallogin.php" hash="0ba90dadb0f34528c2296704c5cea233"/></dir><dir name="etc"><file name="config.xml" hash="eac1dc2364bc283a9cd5326eb7e852a9"/></dir><dir name="sql"><dir name="sociallogin_setup"><file name="mysql4-install-0.1.0.php" hash="163332cb130dae297af332cbefde58f3"/></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="pushnotification"><file name="pushnotificationbackend.phtml" hash="138add7171fdd7fb326abc4a4f9dbe5a"/></dir><dir name="connector"><file name="landing.phtml" hash="6efda7cca18e7bc62ce40c9f25a9510b"/><file name="notification.phtml" hash="164e5f9e7dcfc5c2d2451f0e77776d77"/><file name="support.phtml" hash="7c799c058795eafbf96239e16e3326ca"/></dir></dir><dir name="layout"><file name="bannersliderapp.xml" hash="f18034448b9f74646c870a23bfc0b6fd"/><file name="pushnotification.xml" hash="f7fd974e63c4c7eb5ffac7b059470946"/><file name="connector.xml" hash="003166428e55a52301f71826a37f8283"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="payu.xml" hash="473595488f536cb588c5588a744915a3"/><file name="mpaypal.xml" hash="7b75c5bed6f3142c8bc9e4c1233bf1e9"/></dir><dir name="template"><dir name="payu"><file name="index.phtml" hash="5f9e2dfb00a991707e31a00b39cfebef"/><file name="test.phtml" hash="da4701ff5b2c64444a49f77571e8a00c"/></dir><dir name="mpaypal"><file name="index.phtml" hash="df077c063b2006b9321c96cd6744b19f"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Mss_Bannersliderapp.xml" hash="de3e077185056246492c3a2ff01a531f"/><file name="Mss_Connector.xml" hash="ba8a5609c9c8c3636f183c5bfe04d664"/><file name="Mss_Payu.xml" hash="5feac03d698b481473223fbe6a8814b1"/><file name="Mss_Pushnotification.xml" hash="2e8e9bc56a5f0ff8bb42f43fb5a3a3db"/><file name="Mss_Sociallogin.xml" hash="8671199bdad3bdecbfe0c47ce9ff05e6"/><file name="Mss_Mpaypal.xml" hash="4d6a7f8d862de8c449b1366727ef0a6d"/></dir></dir></target><target name="mageskin"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="magentomobileshop"><file name="magento_logo.png" hash="d1800a3c95de49500f158bfb6ca9c70c"/><file name="magentomobileshop_loader.gif" hash="453272c9cacd32efe6465961ea8a61dd"/></dir></dir></dir></dir></dir></dir></target></contents>
|
19 |
<compatible/>
|
20 |
<dependencies><required><php><min>5.3.0</min><max>7.0.5</max></php></required></dependencies>
|
21 |
</package>
|