Version Notes
Fixes:-
1) Shipping issue fix.
2) Layered navigation issue fix.
3) Pushnotification issue fix.
Features:-
1) Option to set mutliple CMS pages.
2) Option to set banner for catagory also.
3) Implement shortBy functionality.
4) Option to delete applied coupon.
Download this release
Release Info
| Developer | mss |
| Extension | Mss_Connector |
| Version | 2.6.0 |
| Comparing to | |
| See all releases | |
Code changes from version 2.5.2 to 2.6.0
- app/code/local/Mss/Bannersliderapp/Block/Adminhtml/Bannersliderapp/Edit/Tab/Form.php +22 -6
- app/code/local/Mss/Bannersliderapp/controllers/BannerController.php +1 -1
- app/code/local/Mss/Bannersliderapp/etc/config.xml +1 -1
- app/code/local/Mss/Bannersliderapp/sql/bannersliderapp_setup/mysql4-upgrade-0.1.1-0.1.2.php +13 -0
- app/code/local/Mss/Connector/controllers/CartController.php +162 -132
- app/code/local/Mss/Connector/controllers/CustomerController.php +1 -0
- app/code/local/Mss/Connector/controllers/IndexController.php +2 -7
- app/code/local/Mss/Connector/controllers/ProductsController.php +99 -67
- app/code/local/Mss/Connector/controllers/StaticpagesController.php +35 -71
- app/code/local/Mss/Connector/etc/config.xml +1 -1
- app/code/local/Mss/Connector/etc/system.xml +4 -32
- app/code/local/Mss/Mpaypal/controllers/IndexController.php +1 -1
- app/code/local/Mss/Pushnotification/sql/pushnotification_setup/mysql4-install-0.1.0.php +0 -51
- app/code/local/Mss/Twocheckout/Block/Form.php +0 -32
- app/code/local/Mss/Twocheckout/Block/Form.php@@ +0 -32
- app/code/local/Mss/Twocheckout/Block/Iframe.php +0 -42
- app/code/local/Mss/Twocheckout/Block/Info.php +0 -36
- app/code/local/Mss/Twocheckout/Block/Redirect.php +0 -49
- app/code/local/Mss/Twocheckout/Helper/Data.php +0 -25
- app/code/local/Mss/Twocheckout/Model/Checkout.php +0 -289
- app/code/local/Mss/Twocheckout/Model/Observer.php +0 -128
- app/code/local/Mss/Twocheckout/Model/Twocheckout.php +0 -289
- app/code/local/Mss/Twocheckout/controllers/NotificationController.php +0 -109
- app/code/local/Mss/Twocheckout/controllers/RedirectController.php +0 -96
- app/code/local/Mss/Twocheckout/etc/config.xml +0 -102
- package.xml +16 -8
app/code/local/Mss/Bannersliderapp/Block/Adminhtml/Bannersliderapp/Edit/Tab/Form.php
CHANGED
|
@@ -31,16 +31,14 @@ class Mss_Bannersliderapp_Block_Adminhtml_Bannersliderapp_Edit_Tab_Form extends
|
|
| 31 |
$fieldset->addField('order_banner', 'text',
|
| 32 |
array(
|
| 33 |
'label' => Mage::helper('bannersliderapp')->__('Order'),
|
| 34 |
-
|
| 35 |
-
|
| 36 |
|
| 37 |
'name' => 'order_banner',
|
| 38 |
));
|
| 39 |
-
|
| 40 |
array(
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
|
| 45 |
array(
|
| 46 |
'value' => 'Category',
|
|
@@ -54,6 +52,24 @@ class Mss_Bannersliderapp_Block_Adminhtml_Bannersliderapp_Edit_Tab_Form extends
|
|
| 54 |
|
| 55 |
'name' => 'url_type',
|
| 56 |
));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
$fieldset->addField('product_id', 'text',
|
| 59 |
array(
|
| 31 |
$fieldset->addField('order_banner', 'text',
|
| 32 |
array(
|
| 33 |
'label' => Mage::helper('bannersliderapp')->__('Order'),
|
|
|
|
|
|
|
| 34 |
|
| 35 |
'name' => 'order_banner',
|
| 36 |
));
|
| 37 |
+
$fieldset->addField('url_type', 'select',
|
| 38 |
array(
|
| 39 |
+
'label' => Mage::helper('bannersliderapp')->__('Link To'),
|
| 40 |
+
'after_element_html' => '<small>Add catagory link section</small>',
|
| 41 |
+
'values' => array(
|
| 42 |
|
| 43 |
array(
|
| 44 |
'value' => 'Category',
|
| 52 |
|
| 53 |
'name' => 'url_type',
|
| 54 |
));
|
| 55 |
+
/*custom field*/
|
| 56 |
+
$fieldset->addField('check_type', 'select',
|
| 57 |
+
array(
|
| 58 |
+
'label' => Mage::helper('bannersliderapp')->__('Display on page'),
|
| 59 |
+
'values' => array(
|
| 60 |
+
array(
|
| 61 |
+
'value' => 'home_view',
|
| 62 |
+
'label' => Mage::helper('core')->__('Home View'),
|
| 63 |
+
),
|
| 64 |
+
array(
|
| 65 |
+
'value' => 'category_view',
|
| 66 |
+
'label' => Mage::helper('core')->__('Category View'),
|
| 67 |
+
),
|
| 68 |
+
),
|
| 69 |
+
|
| 70 |
+
'name' => 'check_type',
|
| 71 |
+
));
|
| 72 |
+
/*custom field*/
|
| 73 |
|
| 74 |
$fieldset->addField('product_id', 'text',
|
| 75 |
array(
|
app/code/local/Mss/Bannersliderapp/controllers/BannerController.php
CHANGED
|
@@ -24,7 +24,6 @@ class Mss_Bannersliderapp_BannerController extends Mage_Core_Controller_Front_Ac
|
|
| 24 |
|
| 25 |
$alldata = array();
|
| 26 |
foreach($bannerCollection->getData() as $bannerdata){
|
| 27 |
-
|
| 28 |
|
| 29 |
$path = Mage::helper('bannersliderapp')->reImageName( $bannerdata['image']);
|
| 30 |
|
|
@@ -38,6 +37,7 @@ class Mss_Bannersliderapp_BannerController extends Mage_Core_Controller_Front_Ac
|
|
| 38 |
$data['link_type'] = $bannerdata['url_type'];
|
| 39 |
$data['product_id'] = $bannerdata['product_id'];
|
| 40 |
$data['category_id'] = $bannerdata['category_id'];
|
|
|
|
| 41 |
|
| 42 |
$alldata[] = $data;
|
| 43 |
|
| 24 |
|
| 25 |
$alldata = array();
|
| 26 |
foreach($bannerCollection->getData() as $bannerdata){
|
|
|
|
| 27 |
|
| 28 |
$path = Mage::helper('bannersliderapp')->reImageName( $bannerdata['image']);
|
| 29 |
|
| 37 |
$data['link_type'] = $bannerdata['url_type'];
|
| 38 |
$data['product_id'] = $bannerdata['product_id'];
|
| 39 |
$data['category_id'] = $bannerdata['category_id'];
|
| 40 |
+
$data['check_type'] = $bannerdata['check_type'];
|
| 41 |
|
| 42 |
$alldata[] = $data;
|
| 43 |
|
app/code/local/Mss/Bannersliderapp/etc/config.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Mss_Bannersliderapp>
|
| 5 |
-
<version>0.1.
|
| 6 |
</Mss_Bannersliderapp>
|
| 7 |
</modules>
|
| 8 |
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Mss_Bannersliderapp>
|
| 5 |
+
<version>0.1.2</version>
|
| 6 |
</Mss_Bannersliderapp>
|
| 7 |
</modules>
|
| 8 |
|
app/code/local/Mss/Bannersliderapp/sql/bannersliderapp_setup/mysql4-upgrade-0.1.1-0.1.2.php
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
$installer = $this;
|
| 3 |
+
$installer->startSetup();
|
| 4 |
+
|
| 5 |
+
$installer->getConnection()
|
| 6 |
+
->addColumn($installer->getTable('magentomobile_bannersliderapp'),'check_type', array(
|
| 7 |
+
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
| 8 |
+
'nullable' => false,
|
| 9 |
+
'length' => 255,
|
| 10 |
+
'after' => null, // column name to insert new column after
|
| 11 |
+
'comment' => 'Title'
|
| 12 |
+
));
|
| 13 |
+
$installer->endSetup();
|
app/code/local/Mss/Connector/controllers/CartController.php
CHANGED
|
@@ -437,84 +437,90 @@ class Mss_Connector_CartController extends Mage_Core_Controller_Front_Action {
|
|
| 437 |
|
| 438 |
|
| 439 |
public function postCouponAction() {
|
| 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 |
|
|
@@ -602,35 +608,35 @@ class Mss_Connector_CartController extends Mage_Core_Controller_Front_Action {
|
|
| 602 |
}
|
| 603 |
|
| 604 |
|
| 605 |
-
|
| 606 |
-
|
| 607 |
-
|
| 608 |
-
|
| 609 |
-
|
| 610 |
-
|
| 611 |
-
|
| 612 |
-
|
| 613 |
-
|
| 614 |
-
|
| 615 |
-
|
| 616 |
-
|
| 617 |
-
|
| 618 |
-
|
| 619 |
-
|
| 620 |
-
|
| 621 |
-
|
| 622 |
-
|
| 623 |
-
|
| 624 |
-
|
| 625 |
-
|
| 626 |
-
|
| 627 |
-
|
| 628 |
-
|
| 629 |
-
|
| 630 |
-
|
| 631 |
-
|
| 632 |
-
|
| 633 |
-
|
| 634 |
|
| 635 |
|
| 636 |
protected function _getMessage() {
|
|
@@ -862,34 +868,39 @@ class Mss_Connector_CartController extends Mage_Core_Controller_Front_Action {
|
|
| 862 |
|
| 863 |
|
| 864 |
####get all enabled shipping methods
|
| 865 |
-
public function getshippingmethodsAction(){
|
| 866 |
-
|
| 867 |
-
|
| 868 |
-
|
| 869 |
-
|
| 870 |
-
|
| 871 |
-
|
| 872 |
-
|
| 873 |
-
|
| 874 |
-
|
| 875 |
-
|
| 876 |
-
|
| 877 |
-
|
| 878 |
-
|
| 879 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 880 |
->getGroupedAllShippingRates();
|
| 881 |
|
| 882 |
-
|
| 883 |
-
|
| 884 |
|
| 885 |
-
|
| 886 |
-
|
| 887 |
-
|
| 888 |
-
|
| 889 |
-
|
| 890 |
-
|
| 891 |
-
|
| 892 |
-
|
| 893 |
|
| 894 |
|
| 895 |
####get all payment methods for now only paypal and cod
|
|
@@ -1608,5 +1619,24 @@ class Mss_Connector_CartController extends Mage_Core_Controller_Front_Action {
|
|
| 1608 |
endif;
|
| 1609 |
}
|
| 1610 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1611 |
|
| 1612 |
}
|
| 437 |
|
| 438 |
|
| 439 |
public function postCouponAction() {
|
| 440 |
+
$couponCode = ( string ) Mage::app ()->getRequest ()->getParam ( 'coupon_code' );
|
| 441 |
+
$cart = Mage::helper ( 'checkout/cart' )->getCart ();
|
| 442 |
+
|
| 443 |
+
$coupan_codes = array();
|
| 444 |
+
$rulesCollection = Mage::getModel('salesrule/rule')->getCollection();
|
| 445 |
+
foreach($rulesCollection as $rule){
|
| 446 |
+
$coupan_codes[] = $rule->getCode();
|
| 447 |
+
}
|
| 448 |
+
|
| 449 |
+
if (!in_array($couponCode, $coupan_codes))
|
| 450 |
+
{
|
| 451 |
+
echo json_encode ( array (
|
| 452 |
+
'status' => 'error',
|
| 453 |
+
'message' => $this->__("Coupon code is not Valid" )
|
| 454 |
+
));
|
| 455 |
+
return false;
|
| 456 |
+
}
|
| 457 |
+
|
| 458 |
+
if (! $cart->getItemsCount ()) {
|
| 459 |
+
echo json_encode ( array (
|
| 460 |
+
'status' => 'error',
|
| 461 |
+
'message' => $this->__("You can't use coupon code with an empty shopping cart"
|
| 462 |
+
) ));
|
| 463 |
+
return false;
|
| 464 |
+
}
|
| 465 |
+
if (Mage::app ()->getRequest ()->getParam ( 'remove' ) == 1) {
|
| 466 |
+
$couponCode = '';
|
| 467 |
+
}
|
| 468 |
+
$oldCouponCode = $cart->getQuote ()->getCouponCode ();
|
| 469 |
+
if (! strlen ( $couponCode ) && ! strlen ( $oldCouponCode )) {
|
| 470 |
+
echo json_encode ( array (
|
| 471 |
+
'status' => 'error',
|
| 472 |
+
'message' => "Emptyed."
|
| 473 |
+
) );
|
| 474 |
+
return false;
|
| 475 |
+
}
|
| 476 |
+
try {
|
| 477 |
+
$codeLength = strlen ( $couponCode );
|
| 478 |
+
$isCodeLengthValid = $codeLength && $codeLength <= Mage_Checkout_Helper_Cart::COUPON_CODE_MAX_LENGTH;
|
| 479 |
+
|
| 480 |
+
$cart->getQuote ()->getShippingAddress ()->setCollectShippingRates ( true );
|
| 481 |
+
$cart->getQuote ()->setCouponCode ( $isCodeLengthValid ? $couponCode : '' )->collectTotals ()->save ();
|
| 482 |
+
|
| 483 |
+
if ($codeLength) {
|
| 484 |
+
if ($isCodeLengthValid && $couponCode == $cart->getQuote ()->getCouponCode ()) {
|
| 485 |
+
$messages = array (
|
| 486 |
+
'status' => 'true',
|
| 487 |
+
'message' => $this->__ ( 'Coupon code "%s" was applied.', Mage::helper ( 'core' )->escapeHtml ( $couponCode ) )
|
| 488 |
+
);
|
| 489 |
+
} else {
|
| 490 |
+
$messages = array (
|
| 491 |
+
'status' => 'error',
|
| 492 |
+
'message' => $this->__ ( 'Coupon code "%s" is not valid.', Mage::helper ( 'core' )->escapeHtml ( $couponCode ) )
|
| 493 |
+
);
|
| 494 |
+
}
|
| 495 |
+
} else {
|
| 496 |
+
$messages = array (
|
| 497 |
+
'status' => 'error',
|
| 498 |
+
'message' => $this->__ ( 'Coupon code was canceled.' )
|
| 499 |
+
);
|
| 500 |
+
}
|
| 501 |
+
} catch ( Mage_Core_Exception $e ) {
|
| 502 |
+
$messages = array (
|
| 503 |
+
'status' => 'error',
|
| 504 |
+
'message' => $e->getMessage ()
|
| 505 |
+
);
|
| 506 |
+
} catch ( Exception $e ) {
|
| 507 |
+
$messages = array (
|
| 508 |
+
'status' => 'error',
|
| 509 |
+
'message' => $this->__ ( 'Cannot apply the coupon code.' )
|
| 510 |
+
);
|
| 511 |
+
}
|
| 512 |
+
$return = $this->_getCartTotal ();
|
| 513 |
+
if($return['coupon_code']){
|
| 514 |
+
|
| 515 |
+
echo json_encode ( $return);
|
| 516 |
+
}else{
|
| 517 |
+
$messages = array (
|
| 518 |
+
'status' => 'error',
|
| 519 |
+
'message' => $this->__ ( 'Coupon code "%s" is not valid.', Mage::helper ( 'core' )->escapeHtml ( $couponCode ) )
|
| 520 |
+
);
|
| 521 |
+
echo json_encode($messages);
|
| 522 |
+
}
|
| 523 |
+
}
|
| 524 |
|
| 525 |
|
| 526 |
|
| 608 |
}
|
| 609 |
|
| 610 |
|
| 611 |
+
protected function _getCartTotal() {
|
| 612 |
+
$cart = Mage::getSingleton ( 'checkout/cart' );
|
| 613 |
+
$totalItemsInCart = Mage::helper ( 'checkout/cart' )->getItemsCount (); // total items in cart
|
| 614 |
+
$totals = Mage::getSingleton ( 'checkout/session' )->getQuote ()->getTotals (); // Total object
|
| 615 |
+
$oldCouponCode = $cart->getQuote ()->getCouponCode ();
|
| 616 |
+
$oCoupon = Mage::getModel ( 'salesrule/coupon' )->load ( $oldCouponCode, 'code' );
|
| 617 |
+
$oRule = Mage::getModel ( 'salesrule/rule' )->load ( $oCoupon->getRuleId () );
|
| 618 |
+
|
| 619 |
+
$subtotal = number_format ( $totals ["subtotal"]->getValue (), 2, '.', '' ); // Subtotal value
|
| 620 |
+
$grandtotal = number_format ( $totals ["grand_total"]->getValue (), 2, '.', '' ); // Grandtotal value
|
| 621 |
+
if (isset ( $totals ['discount'] )) { // $totals['discount']->getValue()) {
|
| 622 |
+
$discount = number_format ( $totals ['discount']->getValue (), 2, '.', '' ); // Discount value if applied
|
| 623 |
+
} else {
|
| 624 |
+
$discount = '0';
|
| 625 |
+
}
|
| 626 |
+
if (isset ( $totals ['tax'] )) { // $totals['tax']->getValue()) {
|
| 627 |
+
$tax = number_format ( $totals ['tax']->getValue (), 2, '.', '' ); // Tax value if present
|
| 628 |
+
} else {
|
| 629 |
+
$tax = '';
|
| 630 |
+
}
|
| 631 |
+
return array (
|
| 632 |
+
'subtotal' => $subtotal,
|
| 633 |
+
'grandtotal' => $grandtotal,
|
| 634 |
+
'discount' => str_replace('-','',$discount),
|
| 635 |
+
'tax' => $tax,
|
| 636 |
+
'coupon_code' => $oldCouponCode,
|
| 637 |
+
'coupon_rule' => $oRule->getData ()
|
| 638 |
+
);
|
| 639 |
+
}
|
| 640 |
|
| 641 |
|
| 642 |
protected function _getMessage() {
|
| 868 |
|
| 869 |
|
| 870 |
####get all enabled shipping methods
|
| 871 |
+
public function getshippingmethodsAction(){
|
| 872 |
+
$shipMethods = array();
|
| 873 |
+
$country = $this->getRequest()->getParam('country_id');
|
| 874 |
+
$zipcode = $this->getRequest()->getParam('zipcode');
|
| 875 |
+
$region_id = $this->getRequest()->getParam('region_id');
|
| 876 |
+
|
| 877 |
+
|
| 878 |
+
if (!Zend_Validate::is($country, 'NotEmpty')):
|
| 879 |
+
echo json_encode(array('status'=>'error','message'=> $this->__('country id should not be empty')));
|
| 880 |
+
exit;
|
| 881 |
+
endif;
|
| 882 |
+
$cart = Mage::getSingleton('checkout/cart');
|
| 883 |
+
$address = $cart->getQuote()->getShippingAddress();
|
| 884 |
+
$address->setCountryId($country)
|
| 885 |
+
->setPostcode($zipcode)
|
| 886 |
+
->setRegionId($region_id)
|
| 887 |
+
->setCollectShippingrates(true);
|
| 888 |
+
$cart->save();
|
| 889 |
+
|
| 890 |
+
$rates = $address->collectShippingRates()
|
| 891 |
->getGroupedAllShippingRates();
|
| 892 |
|
| 893 |
+
foreach ($rates as $carrier) {
|
| 894 |
+
foreach ($carrier as $rate) {
|
| 895 |
|
| 896 |
+
$shipMethods[] =array('code'=>$rate->getData('code'),
|
| 897 |
+
'value'=>$rate->getData('carrier_title'),
|
| 898 |
+
'price'=>$rate->getData('price')
|
| 899 |
+
);
|
| 900 |
+
}
|
| 901 |
+
}
|
| 902 |
+
echo json_encode($shipMethods);
|
| 903 |
+
}
|
| 904 |
|
| 905 |
|
| 906 |
####get all payment methods for now only paypal and cod
|
| 1619 |
endif;
|
| 1620 |
}
|
| 1621 |
|
| 1622 |
+
/*Remove coupon code api from cart start*/
|
| 1623 |
+
|
| 1624 |
+
public function deleteCouponAction(){
|
| 1625 |
+
$custom_data = (string) Mage::app()->getRequest()->getParam('coupon_code');
|
| 1626 |
+
$cart = Mage::helper ( 'checkout/cart' )->getCart ();
|
| 1627 |
+
$applyCode = $cart->getQuote ()->getCouponCode ();
|
| 1628 |
+
if($custom_data == $applyCode):
|
| 1629 |
+
$carts = Mage::getSingleton('checkout/cart')->getQuote()->setCouponCode(' ')->collectTotals()->save();
|
| 1630 |
+
$product['subtotal'] = $carts->getSubtotal();
|
| 1631 |
+
$product['grandtotal'] = $carts->getGrandTotal();
|
| 1632 |
+
$product['totalitems'] = $carts->getItemsCount();
|
| 1633 |
+
$product['symbol'] = Mage::helper('connector')->getCurrencysymbolByCode($this->currency);
|
| 1634 |
+
echo json_encode(array('status'=>"success",'message'=> $product));
|
| 1635 |
+
else:
|
| 1636 |
+
echo json_encode(array('status'=>"error",'message'=> 'Coupon code missmatch'));
|
| 1637 |
+
endif;
|
| 1638 |
+
}
|
| 1639 |
+
/*Remove coupon code api from cart end*/
|
| 1640 |
+
|
| 1641 |
|
| 1642 |
}
|
app/code/local/Mss/Connector/controllers/CustomerController.php
CHANGED
|
@@ -57,6 +57,7 @@ class Mss_Connector_CustomerController extends Mage_Core_Controller_Front_Action
|
|
| 57 |
if (Mage::getSingleton ( 'customer/session' )->isLoggedIn()) {
|
| 58 |
$customer = Mage::getSingleton ( 'customer/session' )->getCustomer ();
|
| 59 |
$storeUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
|
|
|
|
| 60 |
|
| 61 |
$customerinfo = array (
|
| 62 |
'id'=>$customer->getId(),
|
| 57 |
if (Mage::getSingleton ( 'customer/session' )->isLoggedIn()) {
|
| 58 |
$customer = Mage::getSingleton ( 'customer/session' )->getCustomer ();
|
| 59 |
$storeUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
|
| 60 |
+
Mage::getSingleton('checkout/session')->setCustomer(Mage::getSingleton('customer/session')->getCustomer());
|
| 61 |
|
| 62 |
$customerinfo = array (
|
| 63 |
'id'=>$customer->getId(),
|
app/code/local/Mss/Connector/controllers/IndexController.php
CHANGED
|
@@ -211,8 +211,8 @@ class Mss_Connector_IndexController extends Mage_Core_Controller_Front_Action {
|
|
| 211 |
|
| 212 |
$price = explode(',',$filter[0]);
|
| 213 |
$price_filter = array('gt'=>$price['0'],'lt'=>$price['1']);
|
| 214 |
-
|
| 215 |
-
$collection = $collection->addAttributeToFilter ( 'price', array ('lt' => $price['1']) )
|
| 216 |
else:
|
| 217 |
$collection = $collection->addAttributeToFilter ( $key, array('in' => $filter) );
|
| 218 |
endif;
|
|
@@ -742,11 +742,6 @@ class Mss_Connector_IndexController extends Mage_Core_Controller_Front_Action {
|
|
| 742 |
|
| 743 |
}
|
| 744 |
|
| 745 |
-
|
| 746 |
-
|
| 747 |
-
|
| 748 |
-
|
| 749 |
-
|
| 750 |
public function getsaleproducts()
|
| 751 |
{
|
| 752 |
|
| 211 |
|
| 212 |
$price = explode(',',$filter[0]);
|
| 213 |
$price_filter = array('gt'=>$price['0'],'lt'=>$price['1']);
|
| 214 |
+
/*$collection = $collection->addAttributeToFilter ( 'price', array ('gt' => $price['0'] ) );
|
| 215 |
+
$collection = $collection->addAttributeToFilter ( 'price', array ('lt' => $price['1']) );*/
|
| 216 |
else:
|
| 217 |
$collection = $collection->addAttributeToFilter ( $key, array('in' => $filter) );
|
| 218 |
endif;
|
| 742 |
|
| 743 |
}
|
| 744 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 745 |
public function getsaleproducts()
|
| 746 |
{
|
| 747 |
|
app/code/local/Mss/Connector/controllers/ProductsController.php
CHANGED
|
@@ -534,35 +534,6 @@ class Mss_Connector_ProductsController extends Mage_Core_Controller_Front_Action
|
|
| 534 |
###Getting price range
|
| 535 |
|
| 536 |
|
| 537 |
-
public function getpricerange()
|
| 538 |
-
{
|
| 539 |
-
|
| 540 |
-
|
| 541 |
-
$maincategoryId=2;
|
| 542 |
-
|
| 543 |
-
$pricerange =array();
|
| 544 |
-
$layer = Mage::getModel('catalog/layer');
|
| 545 |
-
$category = Mage::getModel('catalog/category')->load($maincategoryId);
|
| 546 |
-
if ($category->getId()) {
|
| 547 |
-
$origCategory = $layer->getCurrentCategory();
|
| 548 |
-
$layer->setCurrentCategory($category);
|
| 549 |
-
}
|
| 550 |
-
$r=Mage::getModel('catalog/layer_filter_price')
|
| 551 |
-
->setLayer($layer);
|
| 552 |
-
|
| 553 |
-
$range = $r->getPriceRange();
|
| 554 |
-
$dbRanges = $r->getRangeItemCounts($range);
|
| 555 |
-
$data = array();
|
| 556 |
-
|
| 557 |
-
foreach ($dbRanges as $index=>$count) {
|
| 558 |
-
$data[] = array(
|
| 559 |
-
'label' => $this->_renderItemLabel($range, $index),
|
| 560 |
-
'value' => $this->_renderItemValue($range, $index),
|
| 561 |
-
'count' => $count,
|
| 562 |
-
);
|
| 563 |
-
}
|
| 564 |
-
return $data;
|
| 565 |
-
}
|
| 566 |
|
| 567 |
|
| 568 |
public function _renderItemLabel($range, $value)
|
|
@@ -669,45 +640,81 @@ class Mss_Connector_ProductsController extends Mage_Core_Controller_Front_Action
|
|
| 669 |
}
|
| 670 |
|
| 671 |
|
| 672 |
-
|
| 673 |
-
|
| 674 |
-
|
| 675 |
-
|
| 676 |
-
|
| 677 |
-
|
| 678 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 679 |
public function getFiltersAction(){
|
| 680 |
|
| 681 |
-
|
| 682 |
-
|
| 683 |
-
|
| 684 |
-
|
| 685 |
-
|
| 686 |
-
|
| 687 |
-
|
| 688 |
-
|
| 689 |
-
|
| 690 |
-
|
| 691 |
-
|
| 692 |
-
|
| 693 |
-
|
| 694 |
-
$attributeOptions = $attribute ->getSource()->getAllOptions(false);
|
| 695 |
-
|
| 696 |
-
if($attribute->getAttributeCode() == 'price')
|
| 697 |
-
$result[] = array('code' => $attribute->getAttributeCode(), 'label'=>$attribute->getFrontendLabel(),'value'=>$this->getpricerange());
|
| 698 |
-
else
|
| 699 |
-
if($attributeOptions)
|
| 700 |
-
$result[] = array('code' => $attribute->getAttributeCode(), 'label'=>$attribute->getFrontendLabel(),'value'=>$attributeOptions);
|
| 701 |
-
|
| 702 |
-
}
|
| 703 |
-
|
| 704 |
-
echo json_encode($result);
|
| 705 |
-
}
|
| 706 |
-
catch(exception $e){
|
| 707 |
|
| 708 |
-
|
| 709 |
-
|
| 710 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 711 |
|
| 712 |
/*getFilter API*/
|
| 713 |
|
|
@@ -801,5 +808,30 @@ class Mss_Connector_ProductsController extends Mage_Core_Controller_Front_Action
|
|
| 801 |
echo json_encode($productdetail);
|
| 802 |
}
|
| 803 |
|
| 804 |
-
|
| 805 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 534 |
###Getting price range
|
| 535 |
|
| 536 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 537 |
|
| 538 |
|
| 539 |
public function _renderItemLabel($range, $value)
|
| 640 |
}
|
| 641 |
|
| 642 |
|
| 643 |
+
public function getpricerange($maincategoryId) {
|
| 644 |
+
$pricerange =array();
|
| 645 |
+
$layer = Mage::getModel('catalog/layer');
|
| 646 |
+
$category = Mage::getModel('catalog/category')->load($maincategoryId);
|
| 647 |
+
if ($category->getId()) {
|
| 648 |
+
$origCategory = $layer->getCurrentCategory();
|
| 649 |
+
$layer->setCurrentCategory($category);
|
| 650 |
+
}
|
| 651 |
+
$r=Mage::getModel('catalog/layer_filter_price')
|
| 652 |
+
->setLayer($layer);
|
| 653 |
+
|
| 654 |
+
$range = $r->getPriceRange();
|
| 655 |
+
$dbRanges = $r->getRangeItemCounts($range);
|
| 656 |
+
$data = array();
|
| 657 |
+
|
| 658 |
+
foreach ($dbRanges as $index=>$count) {
|
| 659 |
+
$data[] = array(
|
| 660 |
+
'label' => $this->_renderItemLabel($range, $index),
|
| 661 |
+
'value' => $this->_renderItemValue($range, $index),
|
| 662 |
+
'count' => $count,
|
| 663 |
+
);
|
| 664 |
+
}
|
| 665 |
+
return $data;
|
| 666 |
+
}
|
| 667 |
+
|
| 668 |
+
|
| 669 |
+
|
| 670 |
public function getFiltersAction(){
|
| 671 |
|
| 672 |
+
$catId = Mage::app()->getRequest()->getParam('categoryid');
|
| 673 |
+
|
| 674 |
+
if(empty($catId)):
|
| 675 |
+
echo json_encode(array('status'=> false,'message'=>'Category id field is not empty'));
|
| 676 |
+
else:
|
| 677 |
+
try{
|
| 678 |
+
$json = array();
|
| 679 |
+
$layer = Mage::getModel("catalog/layer");
|
| 680 |
+
$category = Mage::getModel("catalog/category")->load($catId); // 3rd Category
|
| 681 |
+
$categories = $category->getChildrenCategories();
|
| 682 |
+
$counts = array();
|
| 683 |
+
foreach ($categories as $key => $value) {
|
| 684 |
+
$counts[] =array('subcategory'=> $value->getName() , 'url'=> $value->getUrl() , 'catId'=> $value->getId());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 685 |
|
| 686 |
+
}
|
| 687 |
+
|
| 688 |
+
$json['category'] = $counts?$counts:null;
|
| 689 |
+
|
| 690 |
+
|
| 691 |
+
$layer->setCurrentCategory($category);
|
| 692 |
+
$attributes = $layer->getFilterableAttributes();
|
| 693 |
+
foreach ($attributes as $attribute) {
|
| 694 |
+
$filterBlockName = 'catalog/layer_filter_attribute';
|
| 695 |
+
$result = Mage::app()->getLayout()->createBlock($filterBlockName)->setLayer($layer)->setAttributeModel($attribute)->init();
|
| 696 |
+
foreach($result->getItems() as $option) {
|
| 697 |
+
$count[] = array('code' => $option->getLabel(),'label' => $option->getValue());
|
| 698 |
+
}
|
| 699 |
+
|
| 700 |
+
if($attribute->getAttributeCode() == 'price')
|
| 701 |
+
$filters[] = array('code' => $attribute->getAttributeCode(), 'label'=>$attribute->getFrontendLabel(),'value'=>$this->getpricerange($catId));
|
| 702 |
+
|
| 703 |
+
if($count!=null AND $attribute->getAttributeCode() != 'price')
|
| 704 |
+
$filters[] = array('code'=>ucfirst($attribute->getAttributeCode()), 'label'=>$attribute->getFrontendLabel(),'value'=>$count);
|
| 705 |
+
/*if($count!=null){
|
| 706 |
+
$json[] = array('code'=>ucfirst($attribute->getAttributeCode()), 'label'=>$attribute->getFrontendLabel(),'value'=>$count,'category'=>$counts,'price'=>$array);
|
| 707 |
+
}*/
|
| 708 |
+
unset($count,$array);
|
| 709 |
+
}
|
| 710 |
+
$json['filters'] = $filters;
|
| 711 |
+
}
|
| 712 |
+
catch (Exception $e) {
|
| 713 |
+
$json = array('status' => false, 'message' => $e->getMessage());
|
| 714 |
+
}
|
| 715 |
+
echo json_encode(array($json));
|
| 716 |
+
endif;
|
| 717 |
+
}
|
| 718 |
|
| 719 |
/*getFilter API*/
|
| 720 |
|
| 808 |
echo json_encode($productdetail);
|
| 809 |
}
|
| 810 |
|
| 811 |
+
public function getshortbyListingAction(){
|
| 812 |
+
$category_id = $this->getRequest ()->getParam ( 'category_id' );
|
| 813 |
+
if($category_id) {
|
| 814 |
+
$attributes = Mage::getModel('catalog/category')->load($category_id)->getAvailableSortBy() ;
|
| 815 |
+
if($attributes){
|
| 816 |
+
$attributeArray = array();
|
| 817 |
+
foreach($attributes as $attribute) {
|
| 818 |
+
$attributeInfo = Mage::getResourceModel('eav/entity_attribute_collection')
|
| 819 |
+
->setCodeFilter($attribute)
|
| 820 |
+
->getFirstItem();
|
| 821 |
+
array_push($attributeArray, array($attribute => $attributeInfo->getData('frontend_label')));
|
| 822 |
+
}
|
| 823 |
+
|
| 824 |
+
echo json_encode($attributeArray);
|
| 825 |
+
} else {
|
| 826 |
+
$attributeArray = array();
|
| 827 |
+
foreach (Mage::getModel('catalog/config')->getAttributeUsedForSortByArray() as $key => $value) {
|
| 828 |
+
array_push($attributeArray, array($key => $value));
|
| 829 |
+
|
| 830 |
+
}
|
| 831 |
+
echo json_encode($attributeArray);
|
| 832 |
+
}
|
| 833 |
+
}else{
|
| 834 |
+
echo json_encode(array());
|
| 835 |
+
}
|
| 836 |
+
}
|
| 837 |
+
}
|
app/code/local/Mss/Connector/controllers/StaticpagesController.php
CHANGED
|
@@ -1,75 +1,39 @@
|
|
| 1 |
<?php
|
| 2 |
class Mss_Connector_StaticpagesController extends Mage_Core_Controller_Front_Action {
|
| 3 |
-
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
self::MSS_ABOUT_US_PAGE,
|
| 41 |
-
self::MSS_TERM_CONDITION_PAGE,
|
| 42 |
-
self::MSS_PRIVACY_POLICY_PAGE,
|
| 43 |
-
self::MSS_RETURN_PRIVACY_POLICY_PAGE
|
| 44 |
-
);
|
| 45 |
-
$data = array();
|
| 46 |
-
|
| 47 |
-
$helper = Mage::helper('cms');
|
| 48 |
-
$processor = $helper->getPageTemplateProcessor();
|
| 49 |
-
foreach($pages as $page):
|
| 50 |
-
|
| 51 |
-
if($page):
|
| 52 |
-
$identifier = Mage::getStoreConfig($page);
|
| 53 |
-
$page_model = Mage::getModel('cms/page')->load($identifier, 'identifier');
|
| 54 |
-
|
| 55 |
-
$data [] = array('page_title'=>$page_model->getTitle(),
|
| 56 |
-
'page_content'=>$processor->filter($page_model->getContent()));
|
| 57 |
-
endif;
|
| 58 |
-
endforeach;
|
| 59 |
-
|
| 60 |
-
if(sizeof($data)):
|
| 61 |
-
echo json_encode(array('status'=>'success','data'=>$data));
|
| 62 |
-
exit;
|
| 63 |
-
else:
|
| 64 |
-
echo json_encode(array('status'=>'error','message'=> $this->__('No page configured, please configure page first')));
|
| 65 |
-
exit;
|
| 66 |
-
endif;
|
| 67 |
-
}
|
| 68 |
-
catch(exception $e){
|
| 69 |
-
|
| 70 |
-
echo json_encode(array('status'=>'error','message'=> $this->__('Problem in loading data.')));
|
| 71 |
-
exit;
|
| 72 |
-
}
|
| 73 |
-
}
|
| 74 |
-
|
| 75 |
}
|
| 1 |
<?php
|
| 2 |
class Mss_Connector_StaticpagesController extends Mage_Core_Controller_Front_Action {
|
|
|
|
| 3 |
|
| 4 |
+
public function _construct(){
|
| 5 |
+
header('content-type: application/json; charset=utf-8');
|
| 6 |
+
header("access-control-allow-origin: *");
|
| 7 |
+
Mage::helper('connector')->loadParent(Mage::app()->getFrontController()->getRequest()->getHeader('token'));
|
| 8 |
+
parent::_construct();
|
| 9 |
+
}
|
| 10 |
+
public function getPagesAction()
|
| 11 |
+
{
|
| 12 |
+
try{
|
| 13 |
+
$data = array();
|
| 14 |
+
$helper = Mage::helper('cms');
|
| 15 |
+
$processor = $helper->getPageTemplateProcessor();
|
| 16 |
+
$identifier = Mage::getStoreConfig('mss/mss_config_group/about_us_page');
|
| 17 |
+
$pages = explode(',', $identifier);
|
| 18 |
+
foreach($pages as $page):
|
| 19 |
+
if($page):
|
| 20 |
+
$page_model = Mage::getModel('cms/page')->load($page, 'identifier');
|
| 21 |
+
$data [] = array('page_title'=>$page_model->getTitle(),
|
| 22 |
+
'page_content'=>$processor->filter($page_model->getContent()),
|
| 23 |
+
'identifier'=>$page_model->getIdentifier());
|
| 24 |
+
endif;
|
| 25 |
+
endforeach;
|
| 26 |
+
if(sizeof($data)):
|
| 27 |
+
echo json_encode(array('status'=>'success','count'=>COUNT($data),'data'=>$data));
|
| 28 |
+
exit;
|
| 29 |
+
else:
|
| 30 |
+
echo json_encode(array('status'=>'error','message'=> $this->__('No page configured, please configure page first')));
|
| 31 |
+
exit;
|
| 32 |
+
endif;
|
| 33 |
+
}
|
| 34 |
+
catch(exception $e){
|
| 35 |
+
echo json_encode(array('status'=>'error','message'=> $this->__('Problem in loading data.')));
|
| 36 |
+
exit;
|
| 37 |
+
}
|
| 38 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
}
|
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.6.0</version>
|
| 6 |
</Mss_Connector>
|
| 7 |
</modules>
|
| 8 |
<frontend>
|
app/code/local/Mss/Connector/etc/system.xml
CHANGED
|
@@ -78,44 +78,16 @@
|
|
| 78 |
<show_in_default>1</show_in_default>
|
| 79 |
<show_in_website>1</show_in_website>
|
| 80 |
<show_in_store>1</show_in_store>
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
<frontend_type>select</frontend_type>
|
| 86 |
<sort_order>2</sort_order>
|
| 87 |
<show_in_default>1</show_in_default>
|
| 88 |
<show_in_website>1</show_in_website>
|
| 89 |
<show_in_store>1</show_in_store>
|
| 90 |
<source_model>adminhtml/system_config_source_cms_page</source_model>
|
| 91 |
</about_us_page>
|
| 92 |
-
<term_condition_page translate="label">
|
| 93 |
-
<label>Term And Condition </label>
|
| 94 |
-
<frontend_type>select</frontend_type>
|
| 95 |
-
<sort_order>3</sort_order>
|
| 96 |
-
<show_in_default>1</show_in_default>
|
| 97 |
-
<show_in_website>1</show_in_website>
|
| 98 |
-
<show_in_store>1</show_in_store>
|
| 99 |
-
<source_model>adminhtml/system_config_source_cms_page</source_model>
|
| 100 |
-
</term_condition_page>
|
| 101 |
-
<privacy_policy_page translate="label">
|
| 102 |
-
<label>Privacy Policy </label>
|
| 103 |
-
<frontend_type>select</frontend_type>
|
| 104 |
-
<sort_order>4</sort_order>
|
| 105 |
-
<show_in_default>1</show_in_default>
|
| 106 |
-
<show_in_website>1</show_in_website>
|
| 107 |
-
<show_in_store>1</show_in_store>
|
| 108 |
-
<source_model>adminhtml/system_config_source_cms_page</source_model>
|
| 109 |
-
</privacy_policy_page>
|
| 110 |
-
<return_privacy_policy_page translate="label">
|
| 111 |
-
<label>Return Policy </label>
|
| 112 |
-
<frontend_type>select</frontend_type>
|
| 113 |
-
<sort_order>5</sort_order>
|
| 114 |
-
<show_in_default>1</show_in_default>
|
| 115 |
-
<show_in_website>1</show_in_website>
|
| 116 |
-
<show_in_store>1</show_in_store>
|
| 117 |
-
<source_model>adminhtml/system_config_source_cms_page</source_model>
|
| 118 |
-
</return_privacy_policy_page>
|
| 119 |
</fields>
|
| 120 |
</mss_config_group>
|
| 121 |
|
| 78 |
<show_in_default>1</show_in_default>
|
| 79 |
<show_in_website>1</show_in_website>
|
| 80 |
<show_in_store>1</show_in_store>
|
| 81 |
+
<fields>
|
| 82 |
+
<about_us_page translate="label">
|
| 83 |
+
<label>Multi Select CMS Pages</label>
|
| 84 |
+
<frontend_type>multiselect</frontend_type>
|
|
|
|
| 85 |
<sort_order>2</sort_order>
|
| 86 |
<show_in_default>1</show_in_default>
|
| 87 |
<show_in_website>1</show_in_website>
|
| 88 |
<show_in_store>1</show_in_store>
|
| 89 |
<source_model>adminhtml/system_config_source_cms_page</source_model>
|
| 90 |
</about_us_page>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
</fields>
|
| 92 |
</mss_config_group>
|
| 93 |
|
app/code/local/Mss/Mpaypal/controllers/IndexController.php
CHANGED
|
@@ -40,7 +40,7 @@ class Mss_Mpaypal_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/sql/pushnotification_setup/mysql4-install-0.1.0.php
CHANGED
|
@@ -3,57 +3,6 @@ $installer = $this;
|
|
| 3 |
|
| 4 |
$installer->startSetup();
|
| 5 |
|
| 6 |
-
|
| 7 |
-
/*create user Attribute*/
|
| 8 |
-
|
| 9 |
-
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
|
| 10 |
-
|
| 11 |
-
$entityTypeId = $setup->getEntityTypeId('customer');
|
| 12 |
-
$attributeSetId = $setup->getDefaultAttributeSetId($entityTypeId);
|
| 13 |
-
$attributeGroupId = $setup->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);
|
| 14 |
-
|
| 15 |
-
$installer->addAttribute("customer", "pushnotification", array(
|
| 16 |
-
"type" => "int",
|
| 17 |
-
"backend" => "",
|
| 18 |
-
"label" => "Push Notification",
|
| 19 |
-
"input" => "select",
|
| 20 |
-
"source" => "pushnotification/entity_resource",
|
| 21 |
-
"visible" => true,
|
| 22 |
-
"required" => false,
|
| 23 |
-
"default" => "",
|
| 24 |
-
"frontend" => "",
|
| 25 |
-
"unique" => false,
|
| 26 |
-
"note" => "Push Notification"
|
| 27 |
-
|
| 28 |
-
));
|
| 29 |
-
|
| 30 |
-
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "pushnotification");
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
$setup->addAttributeToGroup(
|
| 34 |
-
$entityTypeId,
|
| 35 |
-
$attributeSetId,
|
| 36 |
-
$attributeGroupId,
|
| 37 |
-
'module',
|
| 38 |
-
'999' //sort_order
|
| 39 |
-
);
|
| 40 |
-
|
| 41 |
-
$used_in_forms=array();
|
| 42 |
-
|
| 43 |
-
$used_in_forms[]="adminhtml_customer";
|
| 44 |
-
|
| 45 |
-
$attribute->setData("used_in_forms", $used_in_forms)
|
| 46 |
-
->setData("is_used_for_customer_segment", true)
|
| 47 |
-
->setData("is_system", 0)
|
| 48 |
-
->setData("is_user_defined", 1)
|
| 49 |
-
->setData("is_visible", 1)
|
| 50 |
-
->setData("sort_order", 100)
|
| 51 |
-
;
|
| 52 |
-
$attribute->save();
|
| 53 |
-
|
| 54 |
-
/*Create table script*/
|
| 55 |
-
|
| 56 |
-
|
| 57 |
$installer->run("DROP TABLE IF EXISTS {$this->getTable('notification')};
|
| 58 |
CREATE TABLE {$this->getTable('notification')} (
|
| 59 |
`id` int(11) unsigned NOT NULL auto_increment,
|
| 3 |
|
| 4 |
$installer->startSetup();
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
$installer->run("DROP TABLE IF EXISTS {$this->getTable('notification')};
|
| 7 |
CREATE TABLE {$this->getTable('notification')} (
|
| 8 |
`id` int(11) unsigned NOT NULL auto_increment,
|
app/code/local/Mss/Twocheckout/Block/Form.php
DELETED
|
@@ -1,32 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/*
|
| 4 |
-
* Magento
|
| 5 |
-
*
|
| 6 |
-
* NOTICE OF LICENSE
|
| 7 |
-
*
|
| 8 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 9 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 10 |
-
* It is also available through the world-wide-web at this URL:
|
| 11 |
-
* http://opensource.org/licenses/osl-3.0.php
|
| 12 |
-
* If you did not receive a copy of the license and are unable to
|
| 13 |
-
* obtain it through the world-wide-web, please send an email
|
| 14 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 15 |
-
*
|
| 16 |
-
* @category Craig Christenson
|
| 17 |
-
* @package Tco (2Checkout.com)
|
| 18 |
-
* @copyright Copyright (c) 2010 Craig Christenson
|
| 19 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 20 |
-
*/
|
| 21 |
-
|
| 22 |
-
class Craig_Tco_Block_Form extends Mage_Payment_Block_Form
|
| 23 |
-
{
|
| 24 |
-
protected function _construct()
|
| 25 |
-
{
|
| 26 |
-
parent::_construct();
|
| 27 |
-
$this->setTemplate('tco/form.phtml');
|
| 28 |
-
|
| 29 |
-
}
|
| 30 |
-
}
|
| 31 |
-
|
| 32 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mss/Twocheckout/Block/Form.php@@
DELETED
|
@@ -1,32 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/*
|
| 4 |
-
* Magento
|
| 5 |
-
*
|
| 6 |
-
* NOTICE OF LICENSE
|
| 7 |
-
*
|
| 8 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 9 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 10 |
-
* It is also available through the world-wide-web at this URL:
|
| 11 |
-
* http://opensource.org/licenses/osl-3.0.php
|
| 12 |
-
* If you did not receive a copy of the license and are unable to
|
| 13 |
-
* obtain it through the world-wide-web, please send an email
|
| 14 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 15 |
-
*
|
| 16 |
-
* @category Craig Christenson
|
| 17 |
-
* @package Tco (2Checkout.com)
|
| 18 |
-
* @copyright Copyright (c) 2010 Craig Christenson
|
| 19 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 20 |
-
*/
|
| 21 |
-
|
| 22 |
-
class Mss_Twocheckout_Block_Form extends Mage_Payment_Block_Form
|
| 23 |
-
{
|
| 24 |
-
protected function _construct()
|
| 25 |
-
{
|
| 26 |
-
parent::_construct();
|
| 27 |
-
$this->setTemplate('twocheckout/form.phtml');
|
| 28 |
-
|
| 29 |
-
}
|
| 30 |
-
}
|
| 31 |
-
|
| 32 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mss/Twocheckout/Block/Iframe.php
DELETED
|
@@ -1,42 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/*
|
| 4 |
-
* Magento
|
| 5 |
-
*
|
| 6 |
-
* NOTICE OF LICENSE
|
| 7 |
-
*
|
| 8 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 9 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 10 |
-
* It is also available through the world-wide-web at this URL:
|
| 11 |
-
* http://opensource.org/licenses/osl-3.0.php
|
| 12 |
-
* If you did not receive a copy of the license and are unable to
|
| 13 |
-
* obtain it through the world-wide-web, please send an email
|
| 14 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 15 |
-
*
|
| 16 |
-
* @category Craig Christenson
|
| 17 |
-
* @package Tco (2Checkout.com)
|
| 18 |
-
* @copyright Copyright (c) 2010 Craig Christenson
|
| 19 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 20 |
-
*/
|
| 21 |
-
|
| 22 |
-
class Craig_Tco_Block_Iframe extends Mage_Core_Block_Template
|
| 23 |
-
{
|
| 24 |
-
protected $_params = array();
|
| 25 |
-
|
| 26 |
-
protected function _construct()
|
| 27 |
-
{
|
| 28 |
-
parent::_construct();
|
| 29 |
-
$this->setTemplate('tco/iframe.phtml');
|
| 30 |
-
}
|
| 31 |
-
|
| 32 |
-
public function setParams($params)
|
| 33 |
-
{
|
| 34 |
-
$this->_params = $params;
|
| 35 |
-
return $this;
|
| 36 |
-
}
|
| 37 |
-
|
| 38 |
-
public function getParams()
|
| 39 |
-
{
|
| 40 |
-
return $this->_params;
|
| 41 |
-
}
|
| 42 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mss/Twocheckout/Block/Info.php
DELETED
|
@@ -1,36 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/*
|
| 4 |
-
* Magento
|
| 5 |
-
*
|
| 6 |
-
* NOTICE OF LICENSE
|
| 7 |
-
*
|
| 8 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 9 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 10 |
-
* It is also available through the world-wide-web at this URL:
|
| 11 |
-
* http://opensource.org/licenses/osl-3.0.php
|
| 12 |
-
* If you did not receive a copy of the license and are unable to
|
| 13 |
-
* obtain it through the world-wide-web, please send an email
|
| 14 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 15 |
-
*
|
| 16 |
-
* @category Craig Christenson
|
| 17 |
-
* @package Tco (2Checkout.com)
|
| 18 |
-
* @copyright Copyright (c) 2010 Craig Christenson
|
| 19 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 20 |
-
*/
|
| 21 |
-
|
| 22 |
-
class Craig_Tco_Block_Info extends Mage_Payment_Block_Info {
|
| 23 |
-
|
| 24 |
-
protected function _construct() {
|
| 25 |
-
parent::_construct();
|
| 26 |
-
$this->setTemplate('tco/info.phtml');
|
| 27 |
-
}
|
| 28 |
-
|
| 29 |
-
public function getMethodCode()
|
| 30 |
-
{
|
| 31 |
-
return $this->getInfo()->getMethodInstance()->getCode();
|
| 32 |
-
}
|
| 33 |
-
|
| 34 |
-
}
|
| 35 |
-
|
| 36 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mss/Twocheckout/Block/Redirect.php
DELETED
|
@@ -1,49 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/*
|
| 4 |
-
* Magento
|
| 5 |
-
*
|
| 6 |
-
* NOTICE OF LICENSE
|
| 7 |
-
*
|
| 8 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 9 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 10 |
-
* It is also available through the world-wide-web at this URL:
|
| 11 |
-
* http://opensource.org/licenses/osl-3.0.php
|
| 12 |
-
* If you did not receive a copy of the license and are unable to
|
| 13 |
-
* obtain it through the world-wide-web, please send an email
|
| 14 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 15 |
-
*
|
| 16 |
-
* @category Craig Christenson
|
| 17 |
-
* @package Tco (2Checkout.com)
|
| 18 |
-
* @copyright Copyright (c) 2010 Craig Christenson
|
| 19 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 20 |
-
*/
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
class Craig_Tco_Block_Redirect extends Mage_Core_Block_Abstract
|
| 25 |
-
{
|
| 26 |
-
protected function _toHtml()
|
| 27 |
-
{
|
| 28 |
-
$tco = Mage::getModel('tco/checkout');
|
| 29 |
-
|
| 30 |
-
$form = new Varien_Data_Form();
|
| 31 |
-
$form->setAction($tco->getUrl())
|
| 32 |
-
->setId('tcopay')
|
| 33 |
-
->setName('tcopay')
|
| 34 |
-
->setMethod('POST')
|
| 35 |
-
->setUseContainer(true);
|
| 36 |
-
$tco->getFormFields();
|
| 37 |
-
foreach ($tco->getFormFields() as $field=>$value) {
|
| 38 |
-
$form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value, 'size'=>200));
|
| 39 |
-
}
|
| 40 |
-
$form->addField('tcosubmit', 'submit', array('name'=>'tcosubmit'));
|
| 41 |
-
|
| 42 |
-
$html = '<style> #tcosubmit {display:none;} </style>';
|
| 43 |
-
$html .= $form->toHtml();
|
| 44 |
-
|
| 45 |
-
return $html;
|
| 46 |
-
}
|
| 47 |
-
}
|
| 48 |
-
|
| 49 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mss/Twocheckout/Helper/Data.php
DELETED
|
@@ -1,25 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/*
|
| 4 |
-
* Magento
|
| 5 |
-
*
|
| 6 |
-
* NOTICE OF LICENSE
|
| 7 |
-
*
|
| 8 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 9 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 10 |
-
* It is also available through the world-wide-web at this URL:
|
| 11 |
-
* http://opensource.org/licenses/osl-3.0.php
|
| 12 |
-
* If you did not receive a copy of the license and are unable to
|
| 13 |
-
* obtain it through the world-wide-web, please send an email
|
| 14 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 15 |
-
*
|
| 16 |
-
* @category Craig Christenson
|
| 17 |
-
* @package Tco (2Checkout.com)
|
| 18 |
-
* @copyright Copyright (c) 2010 Craig Christenson
|
| 19 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 20 |
-
*/
|
| 21 |
-
|
| 22 |
-
class Craig_Tco_Helper_Data extends Mage_Core_Helper_Abstract
|
| 23 |
-
{
|
| 24 |
-
|
| 25 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mss/Twocheckout/Model/Checkout.php
DELETED
|
@@ -1,289 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/*
|
| 4 |
-
* Magento
|
| 5 |
-
*
|
| 6 |
-
* NOTICE OF LICENSE
|
| 7 |
-
*
|
| 8 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 9 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 10 |
-
* It is also available through the world-wide-web at this URL:
|
| 11 |
-
* http://opensource.org/licenses/osl-3.0.php
|
| 12 |
-
* If you did not receive a copy of the license and are unable to
|
| 13 |
-
* obtain it through the world-wide-web, please send an email
|
| 14 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 15 |
-
*
|
| 16 |
-
* @category Craig Christenson
|
| 17 |
-
* @package Tco (2Checkout.com)
|
| 18 |
-
* @copyright Copyright (c) 2010 Craig Christenson
|
| 19 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 20 |
-
*/
|
| 21 |
-
|
| 22 |
-
class Craig_Tco_Model_Checkout extends Mage_Payment_Model_Method_Abstract {
|
| 23 |
-
|
| 24 |
-
protected $_code = 'tco';
|
| 25 |
-
protected $_paymentMethod = 'shared';
|
| 26 |
-
|
| 27 |
-
public function getCheckout() {
|
| 28 |
-
return Mage::getSingleton('checkout/session');
|
| 29 |
-
}
|
| 30 |
-
|
| 31 |
-
public function getOrderPlaceRedirectUrl() {
|
| 32 |
-
return Mage::getUrl('tco/redirect');
|
| 33 |
-
}
|
| 34 |
-
|
| 35 |
-
//get SID
|
| 36 |
-
public function getSid() {
|
| 37 |
-
$sid = $this->getConfigData('sid');
|
| 38 |
-
return $sid;
|
| 39 |
-
}
|
| 40 |
-
|
| 41 |
-
//get Demo Setting
|
| 42 |
-
public function getDemo() {
|
| 43 |
-
if ($this->getConfigData('demo') == '1') {
|
| 44 |
-
$demo = 'Y';
|
| 45 |
-
} else {
|
| 46 |
-
$demo = 'N';
|
| 47 |
-
}
|
| 48 |
-
return $demo;
|
| 49 |
-
}
|
| 50 |
-
|
| 51 |
-
//get Checkout Display
|
| 52 |
-
public function getDisplay() {
|
| 53 |
-
if ($this->getConfigData('inline') == '1') {
|
| 54 |
-
$display = true;
|
| 55 |
-
} else {
|
| 56 |
-
$display = false;
|
| 57 |
-
}
|
| 58 |
-
return $display;
|
| 59 |
-
}
|
| 60 |
-
|
| 61 |
-
//get purchase routine URL
|
| 62 |
-
public function getUrl() {
|
| 63 |
-
$url = "https://www.2checkout.com/checkout/purchase";
|
| 64 |
-
return $url;
|
| 65 |
-
}
|
| 66 |
-
|
| 67 |
-
//get checkout language
|
| 68 |
-
public function getLanguage() {
|
| 69 |
-
$lang = $this->getConfigData('checkout_language');
|
| 70 |
-
return $lang;
|
| 71 |
-
}
|
| 72 |
-
|
| 73 |
-
//get custom checkout message
|
| 74 |
-
public function getRedirectMessage() {
|
| 75 |
-
$redirect_message = $this->getConfigData('redirect_message');
|
| 76 |
-
return $redirect_message;
|
| 77 |
-
}
|
| 78 |
-
|
| 79 |
-
//get order
|
| 80 |
-
public function getQuote() {
|
| 81 |
-
$orderIncrementId = $this->getCheckout()->getLastRealOrderId();
|
| 82 |
-
$order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
|
| 83 |
-
return $order;
|
| 84 |
-
}
|
| 85 |
-
|
| 86 |
-
//get product data
|
| 87 |
-
public function getProductData() {
|
| 88 |
-
$products = array();
|
| 89 |
-
$items = $this->getQuote()->getAllItems();
|
| 90 |
-
if ($items) {
|
| 91 |
-
$i = 1;
|
| 92 |
-
foreach($items as $item){
|
| 93 |
-
if ($item->getParentItem()) {
|
| 94 |
-
continue;
|
| 95 |
-
}
|
| 96 |
-
$products['c_name_'.$i] = $item->getName();
|
| 97 |
-
$products['c_description_'.$i] = $item->getSku();
|
| 98 |
-
$products['c_price_'.$i] = number_format($item->getPrice(), 2, '.', '');
|
| 99 |
-
$products['c_prod_'.$i] = $item->getSku() . ',' . $item->getQtyToInvoice();
|
| 100 |
-
$i++;
|
| 101 |
-
}
|
| 102 |
-
}
|
| 103 |
-
return $products;
|
| 104 |
-
}
|
| 105 |
-
|
| 106 |
-
//get lineitem data
|
| 107 |
-
public function getLineitemData() {
|
| 108 |
-
$lineitems = array();
|
| 109 |
-
$items = $this->getQuote()->getAllItems();
|
| 110 |
-
$order_id = $this->getCheckout()->getLastRealOrderId();
|
| 111 |
-
$order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
|
| 112 |
-
$taxFull = $order->getFullTaxInfo();
|
| 113 |
-
$ship_method = $order->getShipping_description();
|
| 114 |
-
$coupon = $order->getCoupon_code();
|
| 115 |
-
$lineitem_total = 0;
|
| 116 |
-
$i = 1;
|
| 117 |
-
//get products
|
| 118 |
-
if ($items) {
|
| 119 |
-
foreach($items as $item){
|
| 120 |
-
if ($item->getParentItem()) {
|
| 121 |
-
continue;
|
| 122 |
-
}
|
| 123 |
-
$lineitems['li_'.$i.'_type'] = 'product';
|
| 124 |
-
$lineitems['li_'.$i.'_product_id'] = $item->getSku();
|
| 125 |
-
$lineitems['li_'.$i.'_quantity'] = $item->getQtyToInvoice();
|
| 126 |
-
$lineitems['li_'.$i.'_name'] = $item->getName();
|
| 127 |
-
$lineitems['li_'.$i.'_description'] = $item->getDescription();
|
| 128 |
-
$lineitems['li_'.$i.'_price'] = number_format($item->getPrice(), 2, '.', '');
|
| 129 |
-
$lineitem_total += number_format($item->getPrice(), 2, '.', '');
|
| 130 |
-
$i++;
|
| 131 |
-
}
|
| 132 |
-
}
|
| 133 |
-
//get taxes
|
| 134 |
-
if ($taxFull) {
|
| 135 |
-
foreach($taxFull as $rate){
|
| 136 |
-
$lineitems['li_'.$i.'_type'] = 'tax';
|
| 137 |
-
$lineitems['li_'.$i.'_name'] = $rate['rates']['0']['code'];
|
| 138 |
-
$lineitems['li_'.$i.'_price'] = round($rate['amount'], 2);
|
| 139 |
-
$lineitem_total += round($rate['amount'], 2);
|
| 140 |
-
$i++;
|
| 141 |
-
}
|
| 142 |
-
}
|
| 143 |
-
//get shipping
|
| 144 |
-
if ($ship_method) {
|
| 145 |
-
$lineitems['li_'.$i.'_type'] = 'shipping';
|
| 146 |
-
$lineitems['li_'.$i.'_name'] = $order->getShipping_description();
|
| 147 |
-
$lineitems['li_'.$i.'_price'] = round($order->getShippingAmount(), 2);
|
| 148 |
-
$lineitem_total += round($order->getShippingAmount(), 2);
|
| 149 |
-
$i++;
|
| 150 |
-
}
|
| 151 |
-
//get coupons
|
| 152 |
-
if ($coupon) {
|
| 153 |
-
$lineitems['li_'.$i.'_type'] = 'coupon';
|
| 154 |
-
$lineitems['li_'.$i.'_name'] = $order->getCoupon_code();
|
| 155 |
-
$lineitems['li_'.$i.'_price'] = trim(round($order->getBase_discount_amount(), 2), '-');
|
| 156 |
-
$lineitem_total -= trim(round($order->getBase_discount_amount(), 2), '-');
|
| 157 |
-
$i++;
|
| 158 |
-
}
|
| 159 |
-
return $lineitems;
|
| 160 |
-
}
|
| 161 |
-
|
| 162 |
-
//check total
|
| 163 |
-
public function checkTotal() {
|
| 164 |
-
$items = $this->getQuote()->getAllItems();
|
| 165 |
-
$order_id = $this->getCheckout()->getLastRealOrderId();
|
| 166 |
-
$order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
|
| 167 |
-
$taxFull = $order->getFullTaxInfo();
|
| 168 |
-
$ship_method = $order->getShipping_description();
|
| 169 |
-
$coupon = $order->getCoupon_code();
|
| 170 |
-
$lineitem_total = 0;
|
| 171 |
-
$i = 1;
|
| 172 |
-
//get products
|
| 173 |
-
if ($items) {
|
| 174 |
-
foreach($items as $item){
|
| 175 |
-
if ($item->getParentItem()) {
|
| 176 |
-
continue;
|
| 177 |
-
}
|
| 178 |
-
$lineitem_total += number_format($item->getPrice(), 2, '.', '');
|
| 179 |
-
}
|
| 180 |
-
}
|
| 181 |
-
//get taxes
|
| 182 |
-
if ($taxFull) {
|
| 183 |
-
foreach($taxFull as $rate){
|
| 184 |
-
$lineitem_total += round($rate['amount'], 2);
|
| 185 |
-
}
|
| 186 |
-
}
|
| 187 |
-
//get shipping
|
| 188 |
-
if ($ship_method) {
|
| 189 |
-
$lineitem_total += round($order->getShippingAmount(), 2);
|
| 190 |
-
}
|
| 191 |
-
//get coupons
|
| 192 |
-
if ($coupon) {
|
| 193 |
-
$lineitem_total -= trim(round($order->getBase_discount_amount(), 2), '-');
|
| 194 |
-
}
|
| 195 |
-
return $lineitem_total;
|
| 196 |
-
}
|
| 197 |
-
|
| 198 |
-
//get tax data
|
| 199 |
-
public function getTaxData() {
|
| 200 |
-
$order_id = $this->getCheckout()->getLastRealOrderId();
|
| 201 |
-
$order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
|
| 202 |
-
$taxes = array();
|
| 203 |
-
$taxFull = $order->getFullTaxInfo();
|
| 204 |
-
if ($taxFull) {
|
| 205 |
-
$i = 1;
|
| 206 |
-
foreach($taxFull as $rate){
|
| 207 |
-
$taxes['tax_id_'.$i] = $rate['rates']['0']['code'];
|
| 208 |
-
$taxes['tax_amount_'.$i] = round($rate['amount'], 2);
|
| 209 |
-
$i++;
|
| 210 |
-
}
|
| 211 |
-
}
|
| 212 |
-
return $taxes;
|
| 213 |
-
}
|
| 214 |
-
|
| 215 |
-
//get HTML form data
|
| 216 |
-
public function getFormFields() {
|
| 217 |
-
$order_id = $this->getCheckout()->getLastRealOrderId();
|
| 218 |
-
$order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
|
| 219 |
-
$amount = round($order->getGrandTotal(), 2);
|
| 220 |
-
$a = $this->getQuote()->getShippingAddress();
|
| 221 |
-
$b = $this->getQuote()->getBillingAddress();
|
| 222 |
-
$country = $b->getCountry();
|
| 223 |
-
$currency_code = $order->getOrderCurrencyCode();
|
| 224 |
-
$shipping = round($order->getShippingAmount(), 2);
|
| 225 |
-
$weight = round($order->getWeight(), 2);
|
| 226 |
-
$ship_method = $order->getShipping_description();
|
| 227 |
-
$tax = trim(round($order->getTaxAmount(), 2));
|
| 228 |
-
$productData = $this->getProductData();
|
| 229 |
-
$taxData = $this->getTaxData();
|
| 230 |
-
$cart_order_id = $order_id;
|
| 231 |
-
$lineitemData = $this->getLineitemData();
|
| 232 |
-
|
| 233 |
-
$tcoFields = array();
|
| 234 |
-
$tcoFields['sid'] = $this->getSid();
|
| 235 |
-
$tcoFields['lang'] = $this->getLanguage();
|
| 236 |
-
$tcoFields['purchase_step'] = 'payment-method';
|
| 237 |
-
$tcoFields['merchant_order_id'] = $order_id;
|
| 238 |
-
$tcoFields['email'] = $order->getData('customer_email');
|
| 239 |
-
$tcoFields['first_name'] = $b->getFirstname();
|
| 240 |
-
$tcoFields['last_name'] = $b->getLastname();
|
| 241 |
-
$tcoFields['phone'] = $b->getTelephone();
|
| 242 |
-
$tcoFields['country'] = $b->getCountry();
|
| 243 |
-
$tcoFields['street_address'] = $b->getStreet1();
|
| 244 |
-
$tcoFields['street_address2'] = $b->getStreet2();
|
| 245 |
-
$tcoFields['city'] = $b->getCity();
|
| 246 |
-
|
| 247 |
-
if ($country == 'US' || $country == 'CA') {
|
| 248 |
-
$tcoFields['state'] = $b->getRegion();
|
| 249 |
-
} else {
|
| 250 |
-
$tcoFields['state'] = 'XX';
|
| 251 |
-
}
|
| 252 |
-
|
| 253 |
-
$tcoFields['zip'] = $b->getPostcode();
|
| 254 |
-
|
| 255 |
-
if ($a) {
|
| 256 |
-
$tcoFields['ship_name'] = $a->getFirstname() . ' ' . $a->getLastname();
|
| 257 |
-
$tcoFields['ship_country'] = $a->getCountry();
|
| 258 |
-
$tcoFields['ship_street_address'] = $a->getStreet1();
|
| 259 |
-
$tcoFields['ship_street_address2'] = $a->getStreet2();
|
| 260 |
-
$tcoFields['ship_city'] = $a->getCity();
|
| 261 |
-
$tcoFields['ship_state'] = $a->getRegion();
|
| 262 |
-
$tcoFields['ship_zip'] = $a->getPostcode();
|
| 263 |
-
$tcoFields['sh_cost'] = $shipping;
|
| 264 |
-
$tcoFields['sh_weight'] = $weight;
|
| 265 |
-
$tcoFields['ship_method'] = $ship_method;
|
| 266 |
-
}
|
| 267 |
-
$tcoFields['2co_tax'] = $tax;
|
| 268 |
-
$tcoFields['2co_cart_type'] = 'magento';
|
| 269 |
-
$tcoFields['x_Receipt_Link_URL'] = Mage::getUrl('tco/redirect/success', array('_secure' => true));
|
| 270 |
-
$tcoFields['return_url'] = Mage::getUrl('tco/redirect/cart', array('_secure' => true));
|
| 271 |
-
$tcoFields['demo'] = $this->getDemo();
|
| 272 |
-
$tcoFields['currency_code'] = $currency_code;
|
| 273 |
-
|
| 274 |
-
//Check Integration mode
|
| 275 |
-
$lineitem_total = $this->checkTotal();
|
| 276 |
-
if ($lineitem_total != $amount) {
|
| 277 |
-
$tcoFields['id_type'] = '1';
|
| 278 |
-
$tcoFields['total'] = $amount;
|
| 279 |
-
$tcoFields['cart_order_id'] = $order_id;
|
| 280 |
-
$result = $productData + $taxData + $tcoFields;
|
| 281 |
-
} else {
|
| 282 |
-
$tcoFields['mode'] = '2CO';
|
| 283 |
-
$result = $tcoFields + $lineitemData;
|
| 284 |
-
}
|
| 285 |
-
|
| 286 |
-
return $result;
|
| 287 |
-
}
|
| 288 |
-
|
| 289 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mss/Twocheckout/Model/Observer.php
DELETED
|
@@ -1,128 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class Craig_Tco_Model_Observer extends Mage_Core_Block_Abstract {
|
| 4 |
-
|
| 5 |
-
public function issue_creditmemo_refund(Varien_Object $payment) {
|
| 6 |
-
|
| 7 |
-
$refund = Mage::getStoreConfig('payment/tco/refund');
|
| 8 |
-
|
| 9 |
-
if ($refund == '1') {
|
| 10 |
-
$order = $payment->getCreditmemo()->getOrder();
|
| 11 |
-
$creditmemo = $payment->getCreditmemo()->getOrder()->getData();
|
| 12 |
-
$creditmemo_amount = $payment->getCreditmemo()->getData();
|
| 13 |
-
$creditmemo_comment = $payment->getCreditmemo()->getCommentsCollection()->toArray();
|
| 14 |
-
|
| 15 |
-
if(isset($creditmemo_comment['items'][0]['comment'])) {
|
| 16 |
-
$comment = $creditmemo_comment['items'][0]['comment'];
|
| 17 |
-
} else {
|
| 18 |
-
$comment = 'Refund issued by seller';
|
| 19 |
-
}
|
| 20 |
-
|
| 21 |
-
$username = Mage::getStoreConfig('payment/tco/username');
|
| 22 |
-
$password = Mage::getStoreConfig('payment/tco/password');
|
| 23 |
-
$auth = 'Basic ' . base64_encode($username . ':' . $password);
|
| 24 |
-
|
| 25 |
-
$data = array();
|
| 26 |
-
$data['sale_id'] = $creditmemo['ext_order_id'];
|
| 27 |
-
$data['comment'] = $comment;
|
| 28 |
-
$data['category'] = '5';
|
| 29 |
-
$data['amount'] = $creditmemo_amount['grand_total'];
|
| 30 |
-
$data['currency'] = 'vendor';
|
| 31 |
-
|
| 32 |
-
$headers = array(
|
| 33 |
-
'Authorization: ' . $auth,
|
| 34 |
-
'Accept: application/json'
|
| 35 |
-
);
|
| 36 |
-
|
| 37 |
-
$url = 'https://www.2checkout.com/api/sales/refund_invoice';
|
| 38 |
-
|
| 39 |
-
$config = array(
|
| 40 |
-
'timeout' => 30
|
| 41 |
-
);
|
| 42 |
-
|
| 43 |
-
try {
|
| 44 |
-
$http = new Varien_Http_Adapter_Curl();
|
| 45 |
-
$http->setConfig($config);
|
| 46 |
-
$http->write(Zend_Http_Client::POST, $url, '1.1', $headers, $data);
|
| 47 |
-
$response = $http->read();
|
| 48 |
-
$order->addStatusHistoryComment($response);
|
| 49 |
-
$order->save();
|
| 50 |
-
} catch (Exception $e) {
|
| 51 |
-
Mage::throwException(Mage::helper('core')->__($e->getMessage()));
|
| 52 |
-
}
|
| 53 |
-
}
|
| 54 |
-
}
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
public function output_tco_redirect(Varien_Object $observer) {
|
| 58 |
-
if (isset($_POST['payment']['method']) && $_POST['payment']['method'] == "tco") {
|
| 59 |
-
$controller = $observer->getEvent()->getData('controller_action');
|
| 60 |
-
$result = Mage::helper('core')->jsonDecode(
|
| 61 |
-
$controller->getResponse()->getBody('default'),
|
| 62 |
-
Zend_Json::TYPE_ARRAY
|
| 63 |
-
);
|
| 64 |
-
|
| 65 |
-
if (Mage::getStoreConfig('payment/tco/inline') == '1') {
|
| 66 |
-
$js = '<script>
|
| 67 |
-
document.getElementById("review-please-wait").style["display"] = "block";
|
| 68 |
-
if ($$("a.top-link-cart")) {
|
| 69 |
-
$$("a.top-link-cart")[0].href = "'.Mage::getUrl('tco/redirect/cart', array('_secure' => true)).'";
|
| 70 |
-
}
|
| 71 |
-
if ($$("p.f-left").length !== 0) {
|
| 72 |
-
$$("p.f-left")[0].style["display"] = "none";
|
| 73 |
-
}
|
| 74 |
-
function formSubmit() {
|
| 75 |
-
$("tcosubmit").click();
|
| 76 |
-
}
|
| 77 |
-
var tcohead = $$("head")[0];
|
| 78 |
-
var tcoscript = new Element("script", { type: "text/javascript", src: "https://www.2checkout.com/static/checkout/javascript/direct.min.js" });
|
| 79 |
-
tcohead.appendChild(tcoscript);
|
| 80 |
-
var checkoutOrderBtn = $$("button.btn-checkout");
|
| 81 |
-
checkoutOrderBtn[0].removeAttribute("onclick");
|
| 82 |
-
checkoutOrderBtn[0].observe("click", formSubmit);
|
| 83 |
-
new PeriodicalExecuter(function(pe) {
|
| 84 |
-
if (typeof window["inline_2Checkout"] != "undefined")
|
| 85 |
-
{
|
| 86 |
-
formSubmit();
|
| 87 |
-
pe.stop();
|
| 88 |
-
}
|
| 89 |
-
}, 0.50);
|
| 90 |
-
</script>';
|
| 91 |
-
} else {
|
| 92 |
-
$js = '<script>
|
| 93 |
-
document.getElementById("review-please-wait").style["display"] = "block";
|
| 94 |
-
if ($$("a.top-link-cart")) {
|
| 95 |
-
$$("a.top-link-cart")[0].href = "'.Mage::getUrl('tco/redirect/cart', array('_secure' => true)).'";
|
| 96 |
-
}
|
| 97 |
-
if ($$("p.f-left").length !== 0) {
|
| 98 |
-
$$("p.f-left")[0].style["display"] = "none";
|
| 99 |
-
}
|
| 100 |
-
function formSubmit() {
|
| 101 |
-
$("tcosubmit").click();
|
| 102 |
-
}
|
| 103 |
-
var checkoutOrderBtn = $$("button.btn-checkout");
|
| 104 |
-
checkoutOrderBtn[0].removeAttribute("onclick");
|
| 105 |
-
checkoutOrderBtn[0].observe("click", formSubmit);
|
| 106 |
-
formSubmit();
|
| 107 |
-
</script>';
|
| 108 |
-
}
|
| 109 |
-
|
| 110 |
-
if (empty($result['error'])) {
|
| 111 |
-
$controller->loadLayout('checkout_onepage_review');
|
| 112 |
-
$html = $controller->getLayout()->createBlock('tco/redirect')->toHtml();
|
| 113 |
-
$html .= $js;
|
| 114 |
-
$result['update_section'] = array(
|
| 115 |
-
'name' => 'tcoiframe',
|
| 116 |
-
'html' => $html
|
| 117 |
-
);
|
| 118 |
-
$result['redirect'] = false;
|
| 119 |
-
$result['success'] = false;
|
| 120 |
-
$controller->getResponse()->clearHeader('Location');
|
| 121 |
-
$controller->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
|
| 122 |
-
}
|
| 123 |
-
}
|
| 124 |
-
return $this;
|
| 125 |
-
}
|
| 126 |
-
|
| 127 |
-
}
|
| 128 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mss/Twocheckout/Model/Twocheckout.php
DELETED
|
@@ -1,289 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/*
|
| 4 |
-
* Magento
|
| 5 |
-
*
|
| 6 |
-
* NOTICE OF LICENSE
|
| 7 |
-
*
|
| 8 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 9 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 10 |
-
* It is also available through the world-wide-web at this URL:
|
| 11 |
-
* http://opensource.org/licenses/osl-3.0.php
|
| 12 |
-
* If you did not receive a copy of the license and are unable to
|
| 13 |
-
* obtain it through the world-wide-web, please send an email
|
| 14 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 15 |
-
*
|
| 16 |
-
* @category Craig Christenson
|
| 17 |
-
* @package Tco (2Checkout.com)
|
| 18 |
-
* @copyright Copyright (c) 2010 Craig Christenson
|
| 19 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 20 |
-
*/
|
| 21 |
-
|
| 22 |
-
class Mss_Twocheckout_Model_Twocheckout extends Mage_Payment_Model_Method_Abstract {
|
| 23 |
-
|
| 24 |
-
protected $_code = 'twocheckout';
|
| 25 |
-
protected $_paymentMethod = 'shared';
|
| 26 |
-
|
| 27 |
-
public function getCheckout() {
|
| 28 |
-
return Mage::getSingleton('checkout/session');
|
| 29 |
-
}
|
| 30 |
-
|
| 31 |
-
public function getOrderPlaceRedirectUrl() {
|
| 32 |
-
return Mage::getUrl('twocheckout/redirect');
|
| 33 |
-
}
|
| 34 |
-
|
| 35 |
-
//get SID
|
| 36 |
-
public function getSid() {
|
| 37 |
-
$sid = $this->getConfigData('sid');
|
| 38 |
-
return $sid;
|
| 39 |
-
}
|
| 40 |
-
|
| 41 |
-
//get Demo Setting
|
| 42 |
-
public function getDemo() {
|
| 43 |
-
if ($this->getConfigData('demo') == '1') {
|
| 44 |
-
$demo = 'Y';
|
| 45 |
-
} else {
|
| 46 |
-
$demo = 'N';
|
| 47 |
-
}
|
| 48 |
-
return $demo;
|
| 49 |
-
}
|
| 50 |
-
|
| 51 |
-
//get Checkout Display
|
| 52 |
-
public function getDisplay() {
|
| 53 |
-
if ($this->getConfigData('inline') == '1') {
|
| 54 |
-
$display = true;
|
| 55 |
-
} else {
|
| 56 |
-
$display = false;
|
| 57 |
-
}
|
| 58 |
-
return $display;
|
| 59 |
-
}
|
| 60 |
-
|
| 61 |
-
//get purchase routine URL
|
| 62 |
-
public function getUrl() {
|
| 63 |
-
$url = "https://www.2checkout.com/checkout/purchase";
|
| 64 |
-
return $url;
|
| 65 |
-
}
|
| 66 |
-
|
| 67 |
-
//get checkout language
|
| 68 |
-
public function getLanguage() {
|
| 69 |
-
$lang = $this->getConfigData('checkout_language');
|
| 70 |
-
return $lang;
|
| 71 |
-
}
|
| 72 |
-
|
| 73 |
-
//get custom checkout message
|
| 74 |
-
public function getRedirectMessage() {
|
| 75 |
-
$redirect_message = $this->getConfigData('redirect_message');
|
| 76 |
-
return $redirect_message;
|
| 77 |
-
}
|
| 78 |
-
|
| 79 |
-
//get order
|
| 80 |
-
public function getQuote() {
|
| 81 |
-
$orderIncrementId = $this->getCheckout()->getLastRealOrderId();
|
| 82 |
-
$order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
|
| 83 |
-
return $order;
|
| 84 |
-
}
|
| 85 |
-
|
| 86 |
-
//get product data
|
| 87 |
-
public function getProductData() {
|
| 88 |
-
$products = array();
|
| 89 |
-
$items = $this->getQuote()->getAllItems();
|
| 90 |
-
if ($items) {
|
| 91 |
-
$i = 1;
|
| 92 |
-
foreach($items as $item){
|
| 93 |
-
if ($item->getParentItem()) {
|
| 94 |
-
continue;
|
| 95 |
-
}
|
| 96 |
-
$products['c_name_'.$i] = $item->getName();
|
| 97 |
-
$products['c_description_'.$i] = $item->getSku();
|
| 98 |
-
$products['c_price_'.$i] = number_format($item->getPrice(), 2, '.', '');
|
| 99 |
-
$products['c_prod_'.$i] = $item->getSku() . ',' . $item->getQtyToInvoice();
|
| 100 |
-
$i++;
|
| 101 |
-
}
|
| 102 |
-
}
|
| 103 |
-
return $products;
|
| 104 |
-
}
|
| 105 |
-
|
| 106 |
-
//get lineitem data
|
| 107 |
-
public function getLineitemData() {
|
| 108 |
-
$lineitems = array();
|
| 109 |
-
$items = $this->getQuote()->getAllItems();
|
| 110 |
-
$order_id = $this->getCheckout()->getLastRealOrderId();
|
| 111 |
-
$order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
|
| 112 |
-
$taxFull = $order->getFullTaxInfo();
|
| 113 |
-
$ship_method = $order->getShipping_description();
|
| 114 |
-
$coupon = $order->getCoupon_code();
|
| 115 |
-
$lineitem_total = 0;
|
| 116 |
-
$i = 1;
|
| 117 |
-
//get products
|
| 118 |
-
if ($items) {
|
| 119 |
-
foreach($items as $item){
|
| 120 |
-
if ($item->getParentItem()) {
|
| 121 |
-
continue;
|
| 122 |
-
}
|
| 123 |
-
$lineitems['li_'.$i.'_type'] = 'product';
|
| 124 |
-
$lineitems['li_'.$i.'_product_id'] = $item->getSku();
|
| 125 |
-
$lineitems['li_'.$i.'_quantity'] = $item->getQtyToInvoice();
|
| 126 |
-
$lineitems['li_'.$i.'_name'] = $item->getName();
|
| 127 |
-
$lineitems['li_'.$i.'_description'] = $item->getDescription();
|
| 128 |
-
$lineitems['li_'.$i.'_price'] = number_format($item->getPrice(), 2, '.', '');
|
| 129 |
-
$lineitem_total += number_format($item->getPrice(), 2, '.', '');
|
| 130 |
-
$i++;
|
| 131 |
-
}
|
| 132 |
-
}
|
| 133 |
-
//get taxes
|
| 134 |
-
if ($taxFull) {
|
| 135 |
-
foreach($taxFull as $rate){
|
| 136 |
-
$lineitems['li_'.$i.'_type'] = 'tax';
|
| 137 |
-
$lineitems['li_'.$i.'_name'] = $rate['rates']['0']['code'];
|
| 138 |
-
$lineitems['li_'.$i.'_price'] = round($rate['amount'], 2);
|
| 139 |
-
$lineitem_total += round($rate['amount'], 2);
|
| 140 |
-
$i++;
|
| 141 |
-
}
|
| 142 |
-
}
|
| 143 |
-
//get shipping
|
| 144 |
-
if ($ship_method) {
|
| 145 |
-
$lineitems['li_'.$i.'_type'] = 'shipping';
|
| 146 |
-
$lineitems['li_'.$i.'_name'] = $order->getShipping_description();
|
| 147 |
-
$lineitems['li_'.$i.'_price'] = round($order->getShippingAmount(), 2);
|
| 148 |
-
$lineitem_total += round($order->getShippingAmount(), 2);
|
| 149 |
-
$i++;
|
| 150 |
-
}
|
| 151 |
-
//get coupons
|
| 152 |
-
if ($coupon) {
|
| 153 |
-
$lineitems['li_'.$i.'_type'] = 'coupon';
|
| 154 |
-
$lineitems['li_'.$i.'_name'] = $order->getCoupon_code();
|
| 155 |
-
$lineitems['li_'.$i.'_price'] = trim(round($order->getBase_discount_amount(), 2), '-');
|
| 156 |
-
$lineitem_total -= trim(round($order->getBase_discount_amount(), 2), '-');
|
| 157 |
-
$i++;
|
| 158 |
-
}
|
| 159 |
-
return $lineitems;
|
| 160 |
-
}
|
| 161 |
-
|
| 162 |
-
//check total
|
| 163 |
-
public function checkTotal() {
|
| 164 |
-
$items = $this->getQuote()->getAllItems();
|
| 165 |
-
$order_id = $this->getCheckout()->getLastRealOrderId();
|
| 166 |
-
$order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
|
| 167 |
-
$taxFull = $order->getFullTaxInfo();
|
| 168 |
-
$ship_method = $order->getShipping_description();
|
| 169 |
-
$coupon = $order->getCoupon_code();
|
| 170 |
-
$lineitem_total = 0;
|
| 171 |
-
$i = 1;
|
| 172 |
-
//get products
|
| 173 |
-
if ($items) {
|
| 174 |
-
foreach($items as $item){
|
| 175 |
-
if ($item->getParentItem()) {
|
| 176 |
-
continue;
|
| 177 |
-
}
|
| 178 |
-
$lineitem_total += number_format($item->getPrice(), 2, '.', '');
|
| 179 |
-
}
|
| 180 |
-
}
|
| 181 |
-
//get taxes
|
| 182 |
-
if ($taxFull) {
|
| 183 |
-
foreach($taxFull as $rate){
|
| 184 |
-
$lineitem_total += round($rate['amount'], 2);
|
| 185 |
-
}
|
| 186 |
-
}
|
| 187 |
-
//get shipping
|
| 188 |
-
if ($ship_method) {
|
| 189 |
-
$lineitem_total += round($order->getShippingAmount(), 2);
|
| 190 |
-
}
|
| 191 |
-
//get coupons
|
| 192 |
-
if ($coupon) {
|
| 193 |
-
$lineitem_total -= trim(round($order->getBase_discount_amount(), 2), '-');
|
| 194 |
-
}
|
| 195 |
-
return $lineitem_total;
|
| 196 |
-
}
|
| 197 |
-
|
| 198 |
-
//get tax data
|
| 199 |
-
public function getTaxData() {
|
| 200 |
-
$order_id = $this->getCheckout()->getLastRealOrderId();
|
| 201 |
-
$order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
|
| 202 |
-
$taxes = array();
|
| 203 |
-
$taxFull = $order->getFullTaxInfo();
|
| 204 |
-
if ($taxFull) {
|
| 205 |
-
$i = 1;
|
| 206 |
-
foreach($taxFull as $rate){
|
| 207 |
-
$taxes['tax_id_'.$i] = $rate['rates']['0']['code'];
|
| 208 |
-
$taxes['tax_amount_'.$i] = round($rate['amount'], 2);
|
| 209 |
-
$i++;
|
| 210 |
-
}
|
| 211 |
-
}
|
| 212 |
-
return $taxes;
|
| 213 |
-
}
|
| 214 |
-
|
| 215 |
-
//get HTML form data
|
| 216 |
-
public function getFormFields() {
|
| 217 |
-
$order_id = $this->getCheckout()->getLastRealOrderId();
|
| 218 |
-
$order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
|
| 219 |
-
$amount = round($order->getGrandTotal(), 2);
|
| 220 |
-
$a = $this->getQuote()->getShippingAddress();
|
| 221 |
-
$b = $this->getQuote()->getBillingAddress();
|
| 222 |
-
$country = $b->getCountry();
|
| 223 |
-
$currency_code = $order->getOrderCurrencyCode();
|
| 224 |
-
$shipping = round($order->getShippingAmount(), 2);
|
| 225 |
-
$weight = round($order->getWeight(), 2);
|
| 226 |
-
$ship_method = $order->getShipping_description();
|
| 227 |
-
$tax = trim(round($order->getTaxAmount(), 2));
|
| 228 |
-
$productData = $this->getProductData();
|
| 229 |
-
$taxData = $this->getTaxData();
|
| 230 |
-
$cart_order_id = $order_id;
|
| 231 |
-
$lineitemData = $this->getLineitemData();
|
| 232 |
-
|
| 233 |
-
$tcoFields = array();
|
| 234 |
-
$tcoFields['sid'] = $this->getSid();
|
| 235 |
-
$tcoFields['lang'] = $this->getLanguage();
|
| 236 |
-
$tcoFields['purchase_step'] = 'payment-method';
|
| 237 |
-
$tcoFields['merchant_order_id'] = $order_id;
|
| 238 |
-
$tcoFields['email'] = $order->getData('customer_email');
|
| 239 |
-
$tcoFields['first_name'] = $b->getFirstname();
|
| 240 |
-
$tcoFields['last_name'] = $b->getLastname();
|
| 241 |
-
$tcoFields['phone'] = $b->getTelephone();
|
| 242 |
-
$tcoFields['country'] = $b->getCountry();
|
| 243 |
-
$tcoFields['street_address'] = $b->getStreet1();
|
| 244 |
-
$tcoFields['street_address2'] = $b->getStreet2();
|
| 245 |
-
$tcoFields['city'] = $b->getCity();
|
| 246 |
-
|
| 247 |
-
if ($country == 'US' || $country == 'CA') {
|
| 248 |
-
$tcoFields['state'] = $b->getRegion();
|
| 249 |
-
} else {
|
| 250 |
-
$tcoFields['state'] = 'XX';
|
| 251 |
-
}
|
| 252 |
-
|
| 253 |
-
$tcoFields['zip'] = $b->getPostcode();
|
| 254 |
-
|
| 255 |
-
if ($a) {
|
| 256 |
-
$tcoFields['ship_name'] = $a->getFirstname() . ' ' . $a->getLastname();
|
| 257 |
-
$tcoFields['ship_country'] = $a->getCountry();
|
| 258 |
-
$tcoFields['ship_street_address'] = $a->getStreet1();
|
| 259 |
-
$tcoFields['ship_street_address2'] = $a->getStreet2();
|
| 260 |
-
$tcoFields['ship_city'] = $a->getCity();
|
| 261 |
-
$tcoFields['ship_state'] = $a->getRegion();
|
| 262 |
-
$tcoFields['ship_zip'] = $a->getPostcode();
|
| 263 |
-
$tcoFields['sh_cost'] = $shipping;
|
| 264 |
-
$tcoFields['sh_weight'] = $weight;
|
| 265 |
-
$tcoFields['ship_method'] = $ship_method;
|
| 266 |
-
}
|
| 267 |
-
$tcoFields['2co_tax'] = $tax;
|
| 268 |
-
$tcoFields['2co_cart_type'] = 'magento';
|
| 269 |
-
$tcoFields['x_Receipt_Link_URL'] = Mage::getUrl('twocheckout/redirect/success', array('_secure' => true));
|
| 270 |
-
$tcoFields['return_url'] = Mage::getUrl('twocheckout/redirect/cart', array('_secure' => true));
|
| 271 |
-
$tcoFields['demo'] = $this->getDemo();
|
| 272 |
-
$tcoFields['currency_code'] = $currency_code;
|
| 273 |
-
|
| 274 |
-
//Check Integration mode
|
| 275 |
-
$lineitem_total = $this->checkTotal();
|
| 276 |
-
if ($lineitem_total != $amount) {
|
| 277 |
-
$tcoFields['id_type'] = '1';
|
| 278 |
-
$tcoFields['total'] = $amount;
|
| 279 |
-
$tcoFields['cart_order_id'] = $order_id;
|
| 280 |
-
$result = $productData + $taxData + $tcoFields;
|
| 281 |
-
} else {
|
| 282 |
-
$tcoFields['mode'] = '2CO';
|
| 283 |
-
$result = $tcoFields + $lineitemData;
|
| 284 |
-
}
|
| 285 |
-
|
| 286 |
-
return $result;
|
| 287 |
-
}
|
| 288 |
-
|
| 289 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mss/Twocheckout/controllers/NotificationController.php
DELETED
|
@@ -1,109 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/*
|
| 4 |
-
* Magento
|
| 5 |
-
*
|
| 6 |
-
* NOTICE OF LICENSE
|
| 7 |
-
*
|
| 8 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 9 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 10 |
-
* It is also available through the world-wide-web at this URL:
|
| 11 |
-
* http://opensource.org/licenses/osl-3.0.php
|
| 12 |
-
* If you did not receive a copy of the license and are unable to
|
| 13 |
-
* obtain it through the world-wide-web, please send an email
|
| 14 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 15 |
-
*
|
| 16 |
-
* @category Craig Christenson
|
| 17 |
-
* @package Tco (2Checkout.com)
|
| 18 |
-
* @copyright Copyright (c) 2010 Craig Christenson
|
| 19 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 20 |
-
*/
|
| 21 |
-
|
| 22 |
-
class Craig_Tco_NotificationController extends Mage_Core_Controller_Front_Action {
|
| 23 |
-
|
| 24 |
-
public function indexAction() {
|
| 25 |
-
if (!$this->getRequest()->isPost()) {
|
| 26 |
-
return;
|
| 27 |
-
$insMessage = $this->getRequest()->getPost();
|
| 28 |
-
}
|
| 29 |
-
}
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
public function insAction() {
|
| 33 |
-
$insMessage = $this->getRequest()->getPost();
|
| 34 |
-
foreach ($_REQUEST as $k => $v) {
|
| 35 |
-
$v = htmlspecialchars($v);
|
| 36 |
-
$v = stripslashes($v);
|
| 37 |
-
$insMessage[$k] = $v;
|
| 38 |
-
}
|
| 39 |
-
|
| 40 |
-
$order = Mage::getModel('sales/order');
|
| 41 |
-
$order->loadByIncrementId($insMessage['vendor_order_id']);
|
| 42 |
-
$invoice_on_fraud = Mage::getStoreConfig('payment/tco/invoice_on_fraud');
|
| 43 |
-
$invoice_on_order = Mage::getStoreConfig('payment/tco/invoice_on_order');
|
| 44 |
-
$hashSecretWord = Mage::getStoreConfig('payment/tco/secret_word');
|
| 45 |
-
$hashSid = $insMessage['vendor_id'];
|
| 46 |
-
$hashOrder = $insMessage['sale_id'];
|
| 47 |
-
$hashInvoice = $insMessage['invoice_id'];
|
| 48 |
-
$StringToHash = strtoupper(md5($hashOrder . $hashSid . $hashInvoice . $hashSecretWord));
|
| 49 |
-
|
| 50 |
-
if ($StringToHash != $insMessage['md5_hash'] && number_format($order->getGrandTotal(), 2, '.', '') != $insMessage['invoice_list_amount']) {
|
| 51 |
-
$order->addStatusHistoryComment('Hash or total did not match!');
|
| 52 |
-
$order->save();
|
| 53 |
-
die('Hash Incorrect');
|
| 54 |
-
} else {
|
| 55 |
-
if ($insMessage['message_type'] == 'FRAUD_STATUS_CHANGED') {
|
| 56 |
-
if ($insMessage['fraud_status'] == 'fail') {
|
| 57 |
-
$order->setState(Mage_Sales_Model_Order::STATE_CANCELED, true)->addStatusHistoryComment('Order failed fraud review.')->save();
|
| 58 |
-
} else if ($insMessage['fraud_status'] == 'pass') {
|
| 59 |
-
$order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true)->addStatusHistoryComment('Order passed fraud review.')->save();
|
| 60 |
-
if ($invoice_on_fraud == '1') {
|
| 61 |
-
try {
|
| 62 |
-
if(!$order->canInvoice()) {
|
| 63 |
-
Mage::throwException(Mage::helper('core')->__('Cannot create an invoice.'));
|
| 64 |
-
}
|
| 65 |
-
$invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice();
|
| 66 |
-
if (!$invoice->getTotalQty()) {
|
| 67 |
-
Mage::throwException(Mage::helper('core')->__('Cannot create an invoice without products.'));
|
| 68 |
-
}
|
| 69 |
-
$invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_OFFLINE);
|
| 70 |
-
$invoice->register();
|
| 71 |
-
$transactionSave = Mage::getModel('core/resource_transaction')
|
| 72 |
-
->addObject($invoice)
|
| 73 |
-
->addObject($invoice->getOrder());
|
| 74 |
-
$transactionSave->save();
|
| 75 |
-
} catch (Mage_Core_Exception $e) {
|
| 76 |
-
echo $e;
|
| 77 |
-
}
|
| 78 |
-
}
|
| 79 |
-
} else if ($insMessage['fraud_status'] == 'wait') {
|
| 80 |
-
$order->addStatusHistoryComment('Order undergoing additional fraud investigation.');
|
| 81 |
-
$order->save();
|
| 82 |
-
}
|
| 83 |
-
} else if ($insMessage['message_type'] == 'ORDER_CREATED') {
|
| 84 |
-
if ($invoice_on_order == '1') {
|
| 85 |
-
try {
|
| 86 |
-
if(!$order->canInvoice()) {
|
| 87 |
-
Mage::throwException(Mage::helper('core')->__('Cannot create an invoice.'));
|
| 88 |
-
}
|
| 89 |
-
$invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice();
|
| 90 |
-
if (!$invoice->getTotalQty()) {
|
| 91 |
-
Mage::throwException(Mage::helper('core')->__('Cannot create an invoice without products.'));
|
| 92 |
-
}
|
| 93 |
-
|
| 94 |
-
$invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_OFFLINE);
|
| 95 |
-
$invoice->register();
|
| 96 |
-
$transactionSave = Mage::getModel('core/resource_transaction')
|
| 97 |
-
->addObject($invoice)
|
| 98 |
-
->addObject($invoice->getOrder());
|
| 99 |
-
$transactionSave->save();
|
| 100 |
-
} catch (Mage_Core_Exception $e) {
|
| 101 |
-
echo $e;
|
| 102 |
-
}
|
| 103 |
-
}
|
| 104 |
-
}
|
| 105 |
-
}
|
| 106 |
-
}
|
| 107 |
-
}
|
| 108 |
-
|
| 109 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mss/Twocheckout/controllers/RedirectController.php
DELETED
|
@@ -1,96 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/*
|
| 4 |
-
* Magento
|
| 5 |
-
*
|
| 6 |
-
* NOTICE OF LICENSE
|
| 7 |
-
*
|
| 8 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 9 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 10 |
-
* It is also available through the world-wide-web at this URL:
|
| 11 |
-
* http://opensource.org/licenses/osl-3.0.php
|
| 12 |
-
* If you did not receive a copy of the license and are unable to
|
| 13 |
-
* obtain it through the world-wide-web, please send an email
|
| 14 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 15 |
-
*
|
| 16 |
-
* @category Craig Christenson
|
| 17 |
-
* @package Tco (2Checkout.com)
|
| 18 |
-
* @copyright Copyright (c) 2010 Craig Christenson
|
| 19 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 20 |
-
*/
|
| 21 |
-
|
| 22 |
-
class Craig_Tco_RedirectController extends Mage_Core_Controller_Front_Action {
|
| 23 |
-
|
| 24 |
-
public function getCheckout() {
|
| 25 |
-
return Mage::getSingleton('checkout/session');
|
| 26 |
-
}
|
| 27 |
-
|
| 28 |
-
protected $order;
|
| 29 |
-
|
| 30 |
-
protected function _expireAjax() {
|
| 31 |
-
if (!Mage::getSingleton('checkout/session')->getQuote()->hasItems()) {
|
| 32 |
-
$this->getResponse()->setHeader('HTTP/1.1','403 Session Expired');
|
| 33 |
-
exit;
|
| 34 |
-
}
|
| 35 |
-
}
|
| 36 |
-
|
| 37 |
-
public function indexAction() {
|
| 38 |
-
$this->loadLayout();
|
| 39 |
-
$block = $this->getLayout()->createBlock('tco/redirect');
|
| 40 |
-
$this->getLayout()->getBlock('content')->append($block);
|
| 41 |
-
$this->renderLayout();
|
| 42 |
-
}
|
| 43 |
-
|
| 44 |
-
public function successAction() {
|
| 45 |
-
$post = $this->getRequest()->getPost();
|
| 46 |
-
foreach ($_REQUEST as $k => $v) {
|
| 47 |
-
$v = htmlspecialchars($v);
|
| 48 |
-
$v = stripslashes($v);
|
| 49 |
-
$post[$k] = $v;
|
| 50 |
-
}
|
| 51 |
-
|
| 52 |
-
$session = Mage::getSingleton('checkout/session');
|
| 53 |
-
$session->setQuoteId($post['merchant_order_id']);
|
| 54 |
-
Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();
|
| 55 |
-
$order = Mage::getModel('sales/order');
|
| 56 |
-
$order->loadByIncrementId($session->getLastRealOrderId());
|
| 57 |
-
$hashSecretWord = Mage::getStoreConfig('payment/tco/secret_word');
|
| 58 |
-
$hashSid = Mage::getStoreConfig('payment/tco/sid');
|
| 59 |
-
$hashTotal = number_format($order->getGrandTotal(), 2, '.', '');
|
| 60 |
-
|
| 61 |
-
if (Mage::getStoreConfig('payment/tco/demo') == '1') {
|
| 62 |
-
$hashOrder = '1';
|
| 63 |
-
} else {
|
| 64 |
-
$hashOrder = $post['order_number'];
|
| 65 |
-
}
|
| 66 |
-
|
| 67 |
-
$StringToHash = strtoupper(md5($hashSecretWord . $hashSid . $hashOrder . $hashTotal));
|
| 68 |
-
|
| 69 |
-
if ($StringToHash == $post['key']) {
|
| 70 |
-
$this->_redirect('checkout/onepage/success');
|
| 71 |
-
$order->sendNewOrderEmail();
|
| 72 |
-
$order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true)->save();
|
| 73 |
-
$order->setData('ext_order_id',$post['order_number'] );
|
| 74 |
-
$order->save();
|
| 75 |
-
} else {
|
| 76 |
-
$this->_redirect('checkout/onepage/success');
|
| 77 |
-
$order->addStatusHistoryComment($hashTotal);
|
| 78 |
-
$order->addStatusHistoryComment('Hash did not match, check secret word.');
|
| 79 |
-
$order->save();
|
| 80 |
-
}
|
| 81 |
-
}
|
| 82 |
-
|
| 83 |
-
public function cartAction() {
|
| 84 |
-
$session = Mage::getSingleton('checkout/session');
|
| 85 |
-
if ($session->getLastRealOrderId()) {
|
| 86 |
-
$order = Mage::getModel('sales/order')->loadByIncrementId($session->getLastRealOrderId());
|
| 87 |
-
if ($order->getId()) {
|
| 88 |
-
$order->cancel()->save();
|
| 89 |
-
}
|
| 90 |
-
$quote = Mage::getModel('sales/quote')->load($order->getQuoteId());
|
| 91 |
-
$quote->setIsActive(true)->save();
|
| 92 |
-
}
|
| 93 |
-
$this->_redirect('checkout/cart');
|
| 94 |
-
}
|
| 95 |
-
|
| 96 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mss/Twocheckout/etc/config.xml
DELETED
|
@@ -1,102 +0,0 @@
|
|
| 1 |
-
<?xml version="1.0"?>
|
| 2 |
-
<config>
|
| 3 |
-
<modules>
|
| 4 |
-
<Mss_Twocheckout>
|
| 5 |
-
<version>2.4.4</version>
|
| 6 |
-
</Mss_Twocheckout>
|
| 7 |
-
</modules>
|
| 8 |
-
<global>
|
| 9 |
-
<models>
|
| 10 |
-
<twocheckout>
|
| 11 |
-
<class>Mss_Twocheckout_Model</class>
|
| 12 |
-
</twocheckout>
|
| 13 |
-
</models>
|
| 14 |
-
<helpers>
|
| 15 |
-
<twocheckout>
|
| 16 |
-
<class>Mss_Twocheckout_Helper</class>
|
| 17 |
-
</twocheckout>
|
| 18 |
-
</helpers>
|
| 19 |
-
<blocks>
|
| 20 |
-
<twocheckout>
|
| 21 |
-
<class>Mss_Twocheckout_Block</class>
|
| 22 |
-
</twocheckout>
|
| 23 |
-
</blocks>
|
| 24 |
-
<resources>
|
| 25 |
-
<twocheckout_setup>
|
| 26 |
-
<setup>
|
| 27 |
-
<module>Mss_Twocheckout</module>
|
| 28 |
-
</setup>
|
| 29 |
-
<connection>
|
| 30 |
-
<use>directory_setup</use>
|
| 31 |
-
</connection>
|
| 32 |
-
</twocheckout_setup>
|
| 33 |
-
<twocheckout_write>
|
| 34 |
-
<connection>
|
| 35 |
-
<use>local_write</use>
|
| 36 |
-
</connection>
|
| 37 |
-
</twocheckout_write>
|
| 38 |
-
<twocheckout_read>
|
| 39 |
-
<connection>
|
| 40 |
-
<use>local_read</use>
|
| 41 |
-
</connection>
|
| 42 |
-
</twocheckout_read>
|
| 43 |
-
</resources>
|
| 44 |
-
<events>
|
| 45 |
-
<controller_action_postdispatch_checkout_onepage_saveOrder>
|
| 46 |
-
<observers>
|
| 47 |
-
<output_twocheckout_redirect>
|
| 48 |
-
<type>singleton</type>
|
| 49 |
-
<class>Mss_Twocheckout_Model_Observer</class>
|
| 50 |
-
<method>output_mss_twocheckout</method>
|
| 51 |
-
</output_twocheckout_redirect>
|
| 52 |
-
</observers>
|
| 53 |
-
</controller_action_postdispatch_checkout_onepage_saveOrder>
|
| 54 |
-
<sales_order_creditmemo_refund>
|
| 55 |
-
<observers>
|
| 56 |
-
<issue_creditmemo_refund>
|
| 57 |
-
<type>singleton</type>
|
| 58 |
-
<class>Mss_Twocheckout_Model_Observer</class>
|
| 59 |
-
<method>issue_creditmemo_refund</method>
|
| 60 |
-
</issue_creditmemo_refund>
|
| 61 |
-
</observers>
|
| 62 |
-
</sales_order_creditmemo_refund>
|
| 63 |
-
</events>
|
| 64 |
-
</global>
|
| 65 |
-
<frontend>
|
| 66 |
-
<layout>
|
| 67 |
-
<updates>
|
| 68 |
-
<twocheckout>
|
| 69 |
-
<file>twocheckout.xml</file>
|
| 70 |
-
</twocheckout>
|
| 71 |
-
</updates>
|
| 72 |
-
</layout>
|
| 73 |
-
<routers>
|
| 74 |
-
<twocheckout>
|
| 75 |
-
<use>standard</use>
|
| 76 |
-
<args>
|
| 77 |
-
<module>Mss_Twocheckout</module>
|
| 78 |
-
<frontName>twocheckout</frontName>
|
| 79 |
-
</args>
|
| 80 |
-
</twocheckout>
|
| 81 |
-
</routers>
|
| 82 |
-
<secure_url>
|
| 83 |
-
<twocheckout_redirect>/twocheckout/redirect/</twocheckout_redirect>
|
| 84 |
-
</secure_url>
|
| 85 |
-
</frontend>
|
| 86 |
-
<!-- <default>
|
| 87 |
-
<payment>
|
| 88 |
-
<twocheckout>
|
| 89 |
-
<twocheckout_active>1</twocheckout_active>
|
| 90 |
-
<twocheckout_submit_url>1</twocheckout_submit_url>
|
| 91 |
-
<model>twocheckout/checkout</twocheckout_model>
|
| 92 |
-
<twocheckout_title>2Checkout (Visa, MasterCard, Amex, Discover, JCB, Diners Club, Debit Card, PayPal)
|
| 93 |
-
</twocheckout_title>
|
| 94 |
-
<twocheckout_sid>Enter 2Checkout Account Number</twocheckout_sid>
|
| 95 |
-
<twocheckout_secret_word>Enter your Secret Word</twocheckout_secret_word>
|
| 96 |
-
<twocheckout_submit_url>1</twocheckout_submit_url>
|
| 97 |
-
<twocheckout_demo>0</twocheckout_demo>
|
| 98 |
-
<twocheckout_sort_order>1</twocheckout_sort_order>
|
| 99 |
-
</twocheckout>
|
| 100 |
-
</payment>
|
| 101 |
-
</default> -->
|
| 102 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package.xml
CHANGED
|
@@ -1,19 +1,27 @@
|
|
| 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 |
<authors><author><name>mss</name><user>mss</user><email>mss.yogendra@gmail.com</email></author></authors>
|
| 14 |
-
<date>
|
| 15 |
-
<time>
|
| 16 |
-
<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="80e81c93a07f909bcf4b8285ec634cad"/><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="2f5accecae640a77426e082b41d644b0"/><file name="StaticpagesController.php" hash="9931b8663599c304c3b4517d6fdff55b"/><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="bfb46694ea6dab66f3e5a4fc398ece7a"/><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 name="Twocheckout"><dir name="Block"><file name="Form.php" hash="b552018543f57090c42784d939004dd4"/><file name="Form.php@@" hash="21ceeab9ffedd1d35f399b053218ade8"/><file name="Iframe.php" hash="c8a410448492f2722d8f9891d8470ef7"/><file name="Info.php" hash="ceb4ec03e4de3e4f1dafaf5d7da9b982"/><file name="Redirect.php" hash="3e14d21923564ffebbda371461904895"/></dir><dir name="Helper"><file name="Data.php" hash="de7680011db7d6821c1f68d70a8fa684"/></dir><dir name="Model"><file name="Checkout.php" hash="9471947098baeba75bc1a6c285e2842d"/><file name="Observer.php" hash="ec961a9b67110ae344d6a3fc0165748c"/><file name="Twocheckout.php" hash="6001c873587a81d9f8b7d4e36e860b63"/></dir><dir name="controllers"><file name="NotificationController.php" hash="5bf12db9cfc0719deea1f82dfe3fe1a2"/><file name="RedirectController.php" hash="116f9d6b3a5bf6386a00486ccfabdb63"/></dir><dir name="etc"><file name="config.xml" hash="3b319f9ce10e4df17d046ae0521b5b1c"/></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>
|
| 17 |
<compatible/>
|
| 18 |
<dependencies><required><php><min>5.3.0</min><max>7.0.5</max></php></required></dependencies>
|
| 19 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Mss_Connector</name>
|
| 4 |
+
<version>2.6.0</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
+
<license>OSL v1.0</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
<summary>Mobile Multi store app for Android and Iphone</summary>
|
| 10 |
+
<description>Mobile Multistore app for Android and Iphone</description>
|
| 11 |
+
<notes>Fixes:- 
|
| 12 |
+
1) Shipping issue fix.
|
| 13 |
+
2) Layered navigation issue fix.
|
| 14 |
+
3) Pushnotification issue fix.
|
| 15 |
+

|
| 16 |
+
Features:-
|
| 17 |
+
1) Option to set mutliple CMS pages.
|
| 18 |
+
2) Option to set banner for catagory also.
|
| 19 |
+
3) Implement shortBy functionality.
|
| 20 |
+
4) Option to delete applied coupon.</notes>
|
| 21 |
<authors><author><name>mss</name><user>mss</user><email>mss.yogendra@gmail.com</email></author></authors>
|
| 22 |
+
<date>2017-01-23</date>
|
| 23 |
+
<time>04:40:15</time>
|
| 24 |
+
<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="337f9ecaa1f491cd779ed018f65316ae"/></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="36bd22c81ff14c2f6d04c40916020b6d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="dab3fdde55b6523faadc3fad70702c28"/><file name="config.xml" hash="17c28ecccbd87140087d4e870c3a7f97"/></dir><dir name="sql"><dir name="bannersliderapp_setup"><file name="mysql4-install-0.1.1.php" hash="bbc6f32eb101c83a52cdef67c8b6a806"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="6df036187a26ac6dcea3473d8065f59a"/></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="859fe560c0460806c36ee4eedf083535"/><file name="CreditController.php" hash="a489dd0ed95914fb2b58491410f6f92f"/><file name="CustomerController.php" hash="1fb524e6c082786bb1210d5b646654e6"/><file name="FeedbackController.php" hash="2b9e092984c0c64397cd25fe1d2266d5"/><file name="IndexController.php" hash="d8e6da9179ab52608608fca26eace779"/><file name="ItemsController.php" hash="03aeb9fceec3173e1aa678e03582b226"/><file name="ProductsController.php" hash="e864cd359f8079384e9f1ad325b85a77"/><file name="StaticpagesController.php" hash="f49d4cef2d1baf269e5ac19994619037"/><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="a9ef3c83246f612944adf86010d589b9"/><file name="system.xml" hash="b5782f2d21d04ba07cf411563fcf98a1"/></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="14098d1e6290ba8f8439c564335e1a2a"/></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="571b53fa424e343507d73689708b0596"/><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>
|
| 25 |
<compatible/>
|
| 26 |
<dependencies><required><php><min>5.3.0</min><max>7.0.5</max></php></required></dependencies>
|
| 27 |
</package>
|
