SHARE
TWEET

Untitled

a guest Jan 12th, 2017 95 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public function afterInitCheckout($subject, $result)
  2. {
  3.     $this->_logger->critical('running! 1');
  4.     $this->_logger->critical(get_class($result));
  5.  
  6.     return $result;
  7. }
  8.  
  9. <?xml version="1.0"?>
  10.    
  11. public function initCheckout()
  12. {
  13.     $checkout = $this->getCheckout();
  14.     $customerSession = $this->getCustomerSession();
  15.     if (is_array($checkout->getStepData())) {
  16.         foreach ($checkout->getStepData() as $step => $data) {
  17.             if (!($step === 'login' || $customerSession->isLoggedIn() && $step === 'billing')) {
  18.                 $checkout->setStepData($step, 'allow', false);
  19.             }
  20.         }
  21.     }
  22.  
  23.     $quote = $this->getQuote();
  24.     if ($quote->isMultipleShippingAddresses()) {
  25.         $quote->removeAllAddresses();
  26.         $this->quoteRepository->save($quote);
  27.     }
  28.  
  29.     /*
  30.      * want to load the correct customer information by assigning to address
  31.      * instead of just loading from sales/quote_address
  32.      */
  33.     $customer = $customerSession->getCustomerDataObject();
  34.     if ($customer) {
  35.         $quote->assignCustomer($customer);
  36.     }
  37.     return $this;
  38. }
  39.    
  40. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
  41.     <type name="MagentoCheckoutModelTypeOnepage">
  42.         <plugin name="onepage-order" type="ElcometerCheckoutPluginModelTypeOnepagePlugin" sortOrder="1" disabled="false" />
  43.     </type>
  44. </config>
  45.    
  46. [2017-01-12 11:00:13] main.DEBUG: SQL Select:  {"0":"(website_id = :website_id)","1":"AND (dest_country_id = :country_id AND dest_region_id = :region_id AND STRCMP(LOWER(dest_city),LOWER(:city))= 0  AND :postcode LIKE dest_zip )","2":"AND (condition_name = :condition_name)","3":"AND (condition_from_value < :condition_value)","4":"AND (condition_to_value >= :condition_value)","is_exception":false} []
  47. [2017-01-12 11:00:13] main.DEBUG: Bindings:  {":country_id":"GB",":region_id":0,":city":"Bury",":postcode":"OL10 3DA",":website_id":1,":condition_name":"package_weight",":condition_value":null,"is_exception":false} []
  48. [2017-01-12 11:00:13] main.DEBUG: SQL Select:  {"0":"(website_id = :website_id)","1":"AND (dest_country_id = :country_id AND dest_region_id = :region_id AND dest_city=''  AND :postcode LIKE dest_zip )","2":"AND (condition_name = :condition_name)","3":"AND (condition_from_value < :condition_value)","4":"AND (condition_to_value >= :condition_value)","is_exception":false} []
  49. [2017-01-12 11:00:13] main.DEBUG: Bindings:  {":country_id":"GB",":region_id":0,":postcode":"OL10 3DA",":website_id":1,":condition_name":"package_weight",":condition_value":null,"is_exception":false} []
  50. [2017-01-12 11:00:13] main.DEBUG: SQL Select:  {"0":"(website_id = :website_id)","1":"AND (dest_country_id = :country_id AND dest_region_id = :region_id AND STRCMP(LOWER(dest_city),LOWER(:city))= 0 AND dest_zip ='*')","2":"AND (condition_name = :condition_name)","3":"AND (condition_from_value < :condition_value)","4":"AND (condition_to_value >= :condition_value)","is_exception":false} []
  51. [2017-01-12 11:00:13] main.DEBUG: Bindings:  {":country_id":"GB",":region_id":0,":city":"Bury",":website_id":1,":condition_name":"package_weight",":condition_value":null,"is_exception":false} []
  52. [2017-01-12 11:00:13] main.DEBUG: SQL Select:  {"0":"(website_id = :website_id)","1":"AND (dest_country_id = :country_id AND dest_region_id = '0' AND STRCMP(LOWER(dest_city),LOWER(:city))= 0 AND dest_zip ='*')","2":"AND (condition_name = :condition_name)","3":"AND (condition_from_value < :condition_value)","4":"AND (condition_to_value >= :condition_value)","is_exception":false} []
  53. [2017-01-12 11:00:13] main.DEBUG: Bindings:  {":country_id":"GB",":city":"Bury",":website_id":1,":condition_name":"package_weight",":condition_value":null,"is_exception":false} []
  54. [2017-01-12 11:00:13] main.DEBUG: SQL Select:  {"0":"(website_id = :website_id)","1":"AND (dest_country_id = :country_id AND dest_region_id = '0' AND dest_city ='*'  AND :postcode LIKE dest_zip )","2":"AND (condition_name = :condition_name)","3":"AND (condition_from_value < :condition_value)","4":"AND (condition_to_value >= :condition_value)","is_exception":false} []
  55. [2017-01-12 11:00:13] main.DEBUG: Bindings:  {":country_id":"GB",":postcode":"OL10 3DA",":website_id":1,":condition_name":"package_weight",":condition_value":null,"is_exception":false} []
  56. [2017-01-12 11:00:13] main.DEBUG: SQL Select:  {"0":"(website_id = :website_id)","1":"AND (dest_country_id = :country_id AND dest_region_id = :region_id  AND dest_city ='*' AND dest_zip ='*')","2":"AND (condition_name = :condition_name)","3":"AND (condition_from_value < :condition_value)","4":"AND (condition_to_value >= :condition_value)","is_exception":false} []
  57. [2017-01-12 11:00:13] main.DEBUG: Bindings:  {":country_id":"GB",":region_id":0,":website_id":1,":condition_name":"package_weight",":condition_value":null,"is_exception":false} []
  58. [2017-01-12 11:00:13] main.DEBUG: SQL Select:  {"0":"(website_id = :website_id)","1":"AND (dest_country_id = :country_id AND dest_region_id = '0' AND dest_city ='*' AND dest_zip ='*')","2":"AND (condition_name = :condition_name)","3":"AND (condition_from_value < :condition_value)","4":"AND (condition_to_value >= :condition_value)","is_exception":false} []
  59. [2017-01-12 11:00:13] main.DEBUG: Bindings:  {":country_id":"GB",":website_id":1,":condition_name":"package_weight",":condition_value":null,"is_exception":false} []
  60. [2017-01-12 11:00:13] main.DEBUG: SQL Select:  {"0":"(website_id = :website_id)","1":"AND (dest_country_id = '0' AND dest_region_id = '0' AND dest_city ='*' AND dest_zip ='*')","2":"AND (condition_name = :condition_name)","3":"AND (condition_from_value < :condition_value)","4":"AND (condition_to_value >= :condition_value)","is_exception":false} []
RAW Paste Data
Top