@@ -111,7 +111,7 @@ |
||
111 | 111 | Table::TYPE_TIMESTAMP, |
112 | 112 | null, |
113 | 113 | array('nullable'=>false, |
114 | - 'default'=>Table::TIMESTAMP_INIT) |
|
114 | + 'default'=>Table::TIMESTAMP_INIT) |
|
115 | 115 | ); |
116 | 116 | return $dbConnection->createTable($table); |
117 | 117 | } |
@@ -111,7 +111,7 @@ |
||
111 | 111 | Table::TYPE_TIMESTAMP, |
112 | 112 | null, |
113 | 113 | array('nullable'=>false, |
114 | - 'default'=>Table::TIMESTAMP_INIT) |
|
114 | + 'default'=>Table::TIMESTAMP_INIT) |
|
115 | 115 | ); |
116 | 116 | return $dbConnection->createTable($table); |
117 | 117 | } |
@@ -24,22 +24,22 @@ discard block |
||
24 | 24 | $installer->startSetup(); |
25 | 25 | |
26 | 26 | $table = $installer->getConnection() |
27 | - ->newTable($installer->getTable(self::CONFIG_TABLE)) |
|
28 | - ->addColumn( |
|
29 | - 'id', |
|
30 | - \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, |
|
31 | - null, |
|
32 | - ['identity' => true, 'unsigned' => true, 'nullable' => |
|
33 | - false, 'primary' => true], |
|
34 | - 'Entity ID' |
|
35 | - ) |
|
36 | - ->addColumn( |
|
37 | - 'config', |
|
38 | - \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, |
|
39 | - 60, |
|
40 | - ['nullable' => false], |
|
41 | - 'Config' |
|
42 | - ) |
|
27 | + ->newTable($installer->getTable(self::CONFIG_TABLE)) |
|
28 | + ->addColumn( |
|
29 | + 'id', |
|
30 | + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, |
|
31 | + null, |
|
32 | + ['identity' => true, 'unsigned' => true, 'nullable' => |
|
33 | + false, 'primary' => true], |
|
34 | + 'Entity ID' |
|
35 | + ) |
|
36 | + ->addColumn( |
|
37 | + 'config', |
|
38 | + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, |
|
39 | + 60, |
|
40 | + ['nullable' => false], |
|
41 | + 'Config' |
|
42 | + ) |
|
43 | 43 | ->addColumn( |
44 | 44 | 'value', |
45 | 45 | \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | ['nullable' => false], |
48 | 48 | 'Value' |
49 | 49 | ) |
50 | - ->setComment('Pagantis config table'); |
|
50 | + ->setComment('Pagantis config table'); |
|
51 | 51 | |
52 | 52 | $installer->getConnection()->createTable($table); |
53 | 53 |
@@ -24,21 +24,21 @@ |
||
24 | 24 | * @var array $defaultConfigs |
25 | 25 | */ |
26 | 26 | public $defaultConfigs = array('PAGANTIS_TITLE'=>'Paga en cuotas', |
27 | - 'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'pgSDK.simulator.types.SIMPLE', |
|
28 | - 'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'pgSDK.simulator.skins.BLUE', |
|
29 | - 'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons', |
|
30 | - 'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3, |
|
31 | - 'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12, |
|
32 | - 'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default', |
|
33 | - 'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'pgSDK.simulator.positions.INNER', |
|
34 | - 'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'default', |
|
35 | - 'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default', |
|
36 | - 'PAGANTIS_FORM_DISPLAY_TYPE'=>0, |
|
37 | - 'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1, |
|
38 | - 'PAGANTIS_DISPLAY_MAX_AMOUNT'=>0, |
|
39 | - 'PAGANTIS_URL_OK'=>'', |
|
40 | - 'PAGANTIS_URL_KO'=>'', |
|
41 | - 'PAGANTIS_TITLE_EXTRA' => 'Pay up to 12 comfortable installments with Pagantis. Completely online and sympathetic request, and the answer is immediate!' |
|
27 | + 'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'pgSDK.simulator.types.SIMPLE', |
|
28 | + 'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'pgSDK.simulator.skins.BLUE', |
|
29 | + 'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons', |
|
30 | + 'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3, |
|
31 | + 'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12, |
|
32 | + 'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default', |
|
33 | + 'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'pgSDK.simulator.positions.INNER', |
|
34 | + 'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'default', |
|
35 | + 'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default', |
|
36 | + 'PAGANTIS_FORM_DISPLAY_TYPE'=>0, |
|
37 | + 'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1, |
|
38 | + 'PAGANTIS_DISPLAY_MAX_AMOUNT'=>0, |
|
39 | + 'PAGANTIS_URL_OK'=>'', |
|
40 | + 'PAGANTIS_URL_KO'=>'', |
|
41 | + 'PAGANTIS_TITLE_EXTRA' => 'Pay up to 12 comfortable installments with Pagantis. Completely online and sympathetic request, and the answer is immediate!' |
|
42 | 42 | ); |
43 | 43 | |
44 | 44 | /** |
@@ -24,21 +24,21 @@ |
||
24 | 24 | * @var array $defaultConfigs |
25 | 25 | */ |
26 | 26 | public $defaultConfigs = array('PAGANTIS_TITLE'=>'Paga en cuotas', |
27 | - 'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'pgSDK.simulator.types.SIMPLE', |
|
28 | - 'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'pgSDK.simulator.skins.BLUE', |
|
29 | - 'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons', |
|
30 | - 'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3, |
|
31 | - 'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12, |
|
32 | - 'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default', |
|
33 | - 'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'pgSDK.simulator.positions.INNER', |
|
34 | - 'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'default', |
|
35 | - 'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default', |
|
36 | - 'PAGANTIS_FORM_DISPLAY_TYPE'=>0, |
|
37 | - 'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1, |
|
38 | - 'PAGANTIS_DISPLAY_MAX_AMOUNT'=>0, |
|
39 | - 'PAGANTIS_URL_OK'=>'', |
|
40 | - 'PAGANTIS_URL_KO'=>'', |
|
41 | - 'PAGANTIS_TITLE_EXTRA' => 'Pay up to 12 comfortable installments with Pagantis. Completely online and sympathetic request, and the answer is immediate!' |
|
27 | + 'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'pgSDK.simulator.types.SIMPLE', |
|
28 | + 'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'pgSDK.simulator.skins.BLUE', |
|
29 | + 'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons', |
|
30 | + 'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3, |
|
31 | + 'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12, |
|
32 | + 'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default', |
|
33 | + 'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'pgSDK.simulator.positions.INNER', |
|
34 | + 'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'default', |
|
35 | + 'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default', |
|
36 | + 'PAGANTIS_FORM_DISPLAY_TYPE'=>0, |
|
37 | + 'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1, |
|
38 | + 'PAGANTIS_DISPLAY_MAX_AMOUNT'=>0, |
|
39 | + 'PAGANTIS_URL_OK'=>'', |
|
40 | + 'PAGANTIS_URL_KO'=>'', |
|
41 | + 'PAGANTIS_TITLE_EXTRA' => 'Pay up to 12 comfortable installments with Pagantis. Completely online and sympathetic request, and the answer is immediate!' |
|
42 | 42 | ); |
43 | 43 | |
44 | 44 | /** |
@@ -234,9 +234,9 @@ |
||
234 | 234 | if ($promotedProduct == 'true') { |
235 | 235 | $promotedAmount+=$product->getAmount()*$item->getQty(); |
236 | 236 | $promotedMessage = 'Promoted Item: ' . $item->getName() . |
237 | - ' Price: ' . $item->getPrice() . |
|
238 | - ' Qty: ' . $item->getQty() . |
|
239 | - ' Item ID: ' . $item->getItemId(); |
|
237 | + ' Price: ' . $item->getPrice() . |
|
238 | + ' Qty: ' . $item->getQty() . |
|
239 | + ' Item ID: ' . $item->getItemId(); |
|
240 | 240 | $metadataOrder->addMetadata('promotedProduct', $promotedMessage); |
241 | 241 | } |
242 | 242 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | ); |
62 | 62 | foreach ($newConfigs as $config => $value) { |
63 | 63 | $setup->getConnection() |
64 | - ->insert($prefixedTableName, array('config' => $config, 'value' => $value)); |
|
64 | + ->insert($prefixedTableName, array('config' => $config, 'value' => $value)); |
|
65 | 65 | } |
66 | 66 | } |
67 | 67 | |
@@ -72,14 +72,14 @@ discard block |
||
72 | 72 | ); |
73 | 73 | foreach ($newConfigs as $config => $value) { |
74 | 74 | $setup->getConnection() |
75 | - ->insert($prefixedTableName, array('config' => $config, 'value' => $value)); |
|
75 | + ->insert($prefixedTableName, array('config' => $config, 'value' => $value)); |
|
76 | 76 | } |
77 | 77 | $setup->getConnection() |
78 | - ->update( |
|
79 | - $prefixedTableName, |
|
80 | - array('value' => 'sdk.simulator.types.PRODUCT_PAGE'), |
|
81 | - "config='PAGANTIS_SIMULATOR_DISPLAY_TYPE'" |
|
82 | - ); |
|
78 | + ->update( |
|
79 | + $prefixedTableName, |
|
80 | + array('value' => 'sdk.simulator.types.PRODUCT_PAGE'), |
|
81 | + "config='PAGANTIS_SIMULATOR_DISPLAY_TYPE'" |
|
82 | + ); |
|
83 | 83 | |
84 | 84 | } |
85 | 85 | |
@@ -93,14 +93,14 @@ discard block |
||
93 | 93 | ); |
94 | 94 | foreach ($newConfigs as $config => $value) { |
95 | 95 | $setup->getConnection() |
96 | - ->insert($prefixedTableName, array('config' => $config, 'value' => $value)); |
|
96 | + ->insert($prefixedTableName, array('config' => $config, 'value' => $value)); |
|
97 | 97 | } |
98 | 98 | $setup->getConnection() |
99 | - ->update( |
|
100 | - $prefixedTableName, |
|
101 | - array('value' => 'Instant financing'), |
|
102 | - "config='PAGANTIS_TITLE'" |
|
103 | - ); |
|
99 | + ->update( |
|
100 | + $prefixedTableName, |
|
101 | + array('value' => 'Instant financing'), |
|
102 | + "config='PAGANTIS_TITLE'" |
|
103 | + ); |
|
104 | 104 | } |
105 | 105 | } |
106 | 106 | $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]); |
@@ -16,28 +16,28 @@ discard block |
||
16 | 16 | * @var array $defaultConfigs |
17 | 17 | */ |
18 | 18 | public $defaultConfigs = array( |
19 | - 'PAGANTIS_TITLE'=>'Instant financing', |
|
20 | - 'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'sdk.simulator.types.PRODUCT_PAGE', |
|
21 | - 'PAGANTIS_SIMULATOR_DISPLAY_TYPE_CHECKOUT'=>'sdk.simulator.types.CHECKOUT_PAGE', |
|
22 | - 'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'sdk.simulator.skins.BLUE', |
|
23 | - 'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons', |
|
24 | - 'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3, |
|
25 | - 'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12, |
|
26 | - 'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default', |
|
27 | - 'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'sdk.simulator.positions.INNER', |
|
28 | - 'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'default', |
|
29 | - 'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default', |
|
30 | - 'PAGANTIS_FORM_DISPLAY_TYPE'=>0, |
|
31 | - 'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1, |
|
32 | - 'PAGANTIS_DISPLAY_MAX_AMOUNT'=>0, |
|
33 | - 'PAGANTIS_URL_OK'=>'', |
|
34 | - 'PAGANTIS_URL_KO'=>'', |
|
35 | - 'PAGANTIS_TITLE_EXTRA' => 'Pay up to 12 comfortable installments with Pagantis. Completely online and sympathetic request, and the answer is immediate!', |
|
36 | - 'PAGANTIS_ALLOWED_COUNTRIES' => 'a:3:{i:0;s:2:"es";i:1;s:2:"it";i:2;s:2:"fr";}', |
|
37 | - 'PAGANTIS_PROMOTION_EXTRA' => '<p class="promoted">Finance this product <span class="pg-no-interest">without interest!</span></p>', |
|
38 | - 'PAGANTIS_SIMULATOR_THOUSANDS_SEPARATOR' => '.', |
|
39 | - 'PAGANTIS_SIMULATOR_DECIMAL_SEPARATOR' => ',', |
|
40 | - 'PAGANTIS_SIMULATOR_DISPLAY_SITUATION' => '', |
|
19 | + 'PAGANTIS_TITLE'=>'Instant financing', |
|
20 | + 'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'sdk.simulator.types.PRODUCT_PAGE', |
|
21 | + 'PAGANTIS_SIMULATOR_DISPLAY_TYPE_CHECKOUT'=>'sdk.simulator.types.CHECKOUT_PAGE', |
|
22 | + 'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'sdk.simulator.skins.BLUE', |
|
23 | + 'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons', |
|
24 | + 'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3, |
|
25 | + 'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12, |
|
26 | + 'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default', |
|
27 | + 'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'sdk.simulator.positions.INNER', |
|
28 | + 'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'default', |
|
29 | + 'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default', |
|
30 | + 'PAGANTIS_FORM_DISPLAY_TYPE'=>0, |
|
31 | + 'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1, |
|
32 | + 'PAGANTIS_DISPLAY_MAX_AMOUNT'=>0, |
|
33 | + 'PAGANTIS_URL_OK'=>'', |
|
34 | + 'PAGANTIS_URL_KO'=>'', |
|
35 | + 'PAGANTIS_TITLE_EXTRA' => 'Pay up to 12 comfortable installments with Pagantis. Completely online and sympathetic request, and the answer is immediate!', |
|
36 | + 'PAGANTIS_ALLOWED_COUNTRIES' => 'a:3:{i:0;s:2:"es";i:1;s:2:"it";i:2;s:2:"fr";}', |
|
37 | + 'PAGANTIS_PROMOTION_EXTRA' => '<p class="promoted">Finance this product <span class="pg-no-interest">without interest!</span></p>', |
|
38 | + 'PAGANTIS_SIMULATOR_THOUSANDS_SEPARATOR' => '.', |
|
39 | + 'PAGANTIS_SIMULATOR_DECIMAL_SEPARATOR' => ',', |
|
40 | + 'PAGANTIS_SIMULATOR_DISPLAY_SITUATION' => '', |
|
41 | 41 | //4x |
42 | 42 | 'PAGANTIS_DISPLAY_MIN_AMOUNT_4x'=>0, |
43 | 43 | 'PAGANTIS_DISPLAY_MAX_AMOUNT_4x'=>800, |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | if ($setup->tableExists($prefixedTableName)) { |
55 | 55 | foreach ($this->defaultConfigs as $config => $value) { |
56 | 56 | $setup->getConnection() |
57 | - ->insert(self::CONFIG_TABLE, array('config' => $config, 'value' => $value)); |
|
57 | + ->insert(self::CONFIG_TABLE, array('config' => $config, 'value' => $value)); |
|
58 | 58 | } |
59 | 59 | } |
60 | 60 | } |
@@ -589,11 +589,11 @@ discard block |
||
589 | 589 | } |
590 | 590 | |
591 | 591 | $this->magentoOrder->addStatusHistoryComment($metadataInfo) |
592 | - ->setIsCustomerNotified(false) |
|
593 | - ->setEntityName('order') |
|
594 | - ->setTitle($this->getProduct()) |
|
595 | - ->setPayment($this->getProduct()) |
|
596 | - ->save(); |
|
592 | + ->setIsCustomerNotified(false) |
|
593 | + ->setEntityName('order') |
|
594 | + ->setTitle($this->getProduct()) |
|
595 | + ->setPayment($this->getProduct()) |
|
596 | + ->save(); |
|
597 | 597 | |
598 | 598 | $comment = sprintf( |
599 | 599 | 'pagantisOrderId: %s || pagantisOrderStatus: %s || via: %s || product: %s', |
@@ -604,9 +604,9 @@ discard block |
||
604 | 604 | ); |
605 | 605 | |
606 | 606 | $this->magentoOrder->addStatusHistoryComment($comment) |
607 | - ->setIsCustomerNotified(false) |
|
608 | - ->setEntityName('order') |
|
609 | - ->save(); |
|
607 | + ->setIsCustomerNotified(false) |
|
608 | + ->setEntityName('order') |
|
609 | + ->save(); |
|
610 | 610 | |
611 | 611 | if ($this->magentoOrderId == '') { |
612 | 612 | throw new UnknownException('Order can not be saved'); |