Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 protected function getUrl(array $urlParameters = [])
 {
     if (!isset($urlParameters['number'])) {
         throw new \InvalidArgumentException(sprintf('This page %s requires order number to be passed as parameter', self::class));
     }
     return parent::getUrl($urlParameters);
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['apply_coupon_button' => 'button:contains("Apply coupon")', 'cart_items' => '#sylius-cart-items', 'cart_total' => '#sylius-cart-button', 'clear_button' => '#sylius-cart-clear', 'coupon_field' => '#sylius_cart_promotionCoupon', 'grand_total' => '#sylius-cart-grand-total', 'product_discounted_total' => '#sylius-cart-items tr:contains("%name%") .sylius-discounted-total', 'product_row' => '#sylius-cart-items tbody tr:contains("%name%")', 'product_total' => '#sylius-cart-items tr:contains("%name%") .sylius-total', 'product_unit_price' => '#sylius-cart-items tr:contains("%name%") .sylius-unit-price', 'product_unit_regular_price' => '#sylius-cart-items tr:contains("%name%") .sylius-regular-unit-price', 'promotion_total' => '#sylius-cart-promotion-total', 'save_button' => '#sylius-save', 'shipping_total' => '#sylius-cart-shipping-total', 'tax_total' => '#sylius-cart-tax-total', 'update_button' => '#sylius-cart-update', 'validation_errors' => '.sylius-validation-error']);
 }
Exemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['addresses' => '#sylius-addresses', 'default_address' => '#sylius-default-address']);
 }
Exemplo n.º 4
0
 /**
  * @param Session $session
  * @param array $parameters
  * @param RouterInterface $router
  * @param string $resourceName
  */
 public function __construct(Session $session, array $parameters, RouterInterface $router, $resourceName)
 {
     parent::__construct($session, $parameters, $router);
     $this->resourceName = strtolower($resourceName);
 }
Exemplo n.º 5
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['addressing_step_label' => '.steps a:contains("Address")', 'billing_address' => '#billing-address', 'extra_notes' => '#sylius_checkout_complete_notes', 'items_table' => '#sylius-order', 'currency' => '#currency', 'locale' => '#locale', 'order_total' => 'td:contains("Total")', 'payment_method' => '#payment-method', 'payment_step_label' => '.steps a:contains("Payment")', 'product_row' => 'tbody tr:contains("%name%")', 'promotion_discounts' => '#promotion-discounts', 'promotion_total' => '#promotion-total', 'shipping_address' => '#shipping-address', 'shipping_method' => '#shipping-method', 'shipping_step_label' => '.steps a:contains("Shipping")', 'shipping_total' => '#shipping-total', 'tax_total' => '#tax-total', 'validation_errors' => '.sylius-validation-error']);
 }
Exemplo n.º 6
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['validation_error' => '.message.error']);
 }
Exemplo n.º 7
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['city' => '#sylius_address_city', 'country' => '#sylius_address_countryCode', 'first_name' => '#sylius_address_firstName', 'last_name' => '#sylius_address_lastName', 'postcode' => '#sylius_address_postcode', 'province_name' => 'input[name="sylius_address[provinceName]"]', 'province_code' => 'select[name="sylius_address[provinceCode]"]', 'save_button' => 'button:contains("Save changes")', 'selected_province' => 'select[name="sylius_address[provinceCode]"] option[selected="selected"]', 'street' => '#sylius_address_street']);
 }
Exemplo n.º 8
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['billing_address' => '#billingAddress address', 'customer_email' => '#info .content.extra > a', 'customer_name' => '#info .content > a', 'delete_account_button' => '#actions', 'no_account' => '#no-account', 'registration_date' => '#info .content .date', 'shipping_address' => '#shippingAddress address', 'subscribed_to_newsletter' => '#subscribed-to-newsletter']);
 }
Exemplo n.º 9
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['amount' => '#sylius_promotion_coupon_generate_instruction_amount', 'usage_limit' => '#sylius_promotion_coupon_generate_instruction_usageLimit', 'expires_at' => '#sylius_promotion_coupon_generate_instruction_expiresAt', 'code_length' => '#sylius_promotion_coupon_generate_instruction_codeLength', 'form' => '.two.column.stackable.grid']);
 }
Exemplo n.º 10
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['table' => '.table']);
 }
Exemplo n.º 11
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['billing_address' => '#billing-address', 'currency' => '#sylius-order-currency', 'customer' => '#customer', 'ip_address' => '#ipAddress', 'items_total' => '#items-total', 'order_notes' => '#sylius-order-notes', 'order_payment_state' => '#payment-state > span', 'order_state' => '#sylius-order-state', 'payments' => '#sylius-payments', 'promotion_discounts' => '#promotion-discounts', 'promotion_total' => '#promotion-total', 'shipments' => '#sylius-shipments', 'shipping_address' => '#shipping-address', 'shipping_charges' => '#shipping-charges', 'shipping_total' => '#shipping-total', 'table' => '.table', 'tax_total' => '#tax-total', 'taxes' => '#taxes', 'total' => '#total']);
 }
Exemplo n.º 12
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['code' => '#sylius_product_generate_variants_variants_%position%_code', 'price' => '#sylius_product_generate_variants_variants_%position%_channelPricings [data-form-collection="item"]:contains("%channel%") input', 'prices_validation_message' => '#sylius_product_generate_variants_variants_%position%_channelPricings ~ .sylius-validation-error']);
 }
Exemplo n.º 13
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['logout_button' => '.sylius-logout-button']);
 }
Exemplo n.º 14
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['billing_address' => '#billing-address', 'number' => '#number', 'order_items' => '#sylius-customer-order-items', 'shipping_address' => '#shipping-address', 'subtotal' => '#subtotal', 'total' => '#total']);
 }
Exemplo n.º 15
0
 /**
  * {@inheritdoc}
  *
  * @param TableManipulatorInterface $tableManipulator
  */
 public function __construct(Session $session, array $parameters, RouterInterface $router, TableManipulatorInterface $tableManipulator)
 {
     parent::__construct($session, $parameters, $router);
     $this->tableManipulator = $tableManipulator;
 }
Exemplo n.º 16
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['currency_selector' => '#sylius-currency-selector', 'locale_selector' => '#sylius-locale-selector', 'logout_button' => '.sylius-logout-button', 'full_name' => '.right.menu .item']);
 }
Exemplo n.º 17
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['delete account button' => '.delete-action-form']);
 }
Exemplo n.º 18
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['billing_address' => '#billing-address', 'customer' => '#customer', 'items_total' => '#items-total', 'payments' => '#payments', 'promotion_discounts' => '#promotion-discounts', 'promotion_total' => '#promotion-total', 'shipments' => '#shipments', 'shipping_address' => '#shipping-address', 'shipping_charges' => '#shipping-charges', 'shipping_total' => '#shipping-total', 'table' => '.table', 'tax_total' => '#tax-total', 'taxes' => '#taxes', 'total' => '#total', 'order_state' => 'div.sub.header > span.ui.label', 'order_notes' => '#sylius-order-notes']);
 }
Exemplo n.º 19
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['addressing_step_label' => '.steps a:contains("Addressing")', 'billing_address' => '#addresses div:contains("Billing address") address', 'extra_notes' => '#sylius_checkout_summary_notes', 'items_table' => '#items table', 'order_total' => 'td:contains("Total")', 'payment_method' => '#sylius-checkout-summary-payment-method', 'payment_step_label' => '.steps a:contains("Payment")', 'product_row' => 'tbody tr:contains("%name%")', 'promotion_discounts' => '#promotion-discounts', 'promotion_total' => '#promotion-total', 'shipping_address' => '#addresses div:contains("Shipping address") address', 'shipping_method' => '#sylius-checkout-summary-shipping-method', 'shipping_step_label' => '.steps a:contains("Shipping")', 'shipping_total' => '#shipping-total', 'tax_total' => '#tax-total']);
 }
Exemplo n.º 20
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['current_password' => '#sylius_user_change_password_currentPassword', 'new_password' => '#sylius_user_change_password_newPassword_first', 'confirmation' => '#sylius_user_change_password_newPassword_second']);
 }
Exemplo n.º 21
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['association' => 'h4:contains("%association-name%")', 'attributes' => '#sylius-product-attributes', 'average_rating' => '#average-rating', 'main_image' => '#main-image', 'name' => '#sylius-product-name', 'option_select' => '#sylius_cart_item_variant_%option-name%', 'out_of_stock' => '#sylius-product-out-of-stock', 'product_price' => '#product-price', 'reviews' => '[data-tab="reviews"] .comments', 'selecting_variants' => "#sylius-product-selecting-variant", 'validation_errors' => '.sylius-validation-error', 'variant_radio' => '#sylius-product-variants tbody tr:contains("%variant-name%") input']);
 }
Exemplo n.º 22
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['customer' => '#customer-information']);
 }
Exemplo n.º 23
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['attributes' => '#sylius-product-attributes', 'name' => '#sylius-product-name', 'out-of-stock' => '#sylius-product-out-of-stock', 'product_price' => '#product-price', 'selecting-variants' => "#sylius-product-selecting-variant", 'validation-errors' => '.sylius-validation-error']);
 }
Exemplo n.º 24
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['filter' => 'button:contains("Filter")', 'table' => '.table']);
 }
Exemplo n.º 25
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['address' => '.steps a:contains("Address")', 'checkout_subtotal' => '#checkout-subtotal', 'next_step' => '#next-step', 'order_cannot_be_shipped_message' => '#sylius-order-cannot-be-shipped', 'shipment' => '.items', 'shipping_method' => '[name="sylius_checkout_select_shipping[shipments][0][method]"]', 'shipping_method_fee' => '.item:contains("%shipping_method%") .fee', 'shipping_method_select' => '.item:contains("%shipping_method%") > .field > .ui.radio.checkbox', 'shipping_method_option' => '.item:contains("%shipping_method%") input', 'warning_no_shipping_methods' => '#sylius-order-cannot-be-shipped']);
 }
Exemplo n.º 26
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['addressing_step_label' => '.steps a:contains("Addressing")', 'order_cannot_be_paid_message' => '#sylius-order-cannot-be-paid', 'payment_method' => '[name="sylius_checkout_payment_step[payments][0][method]"]', 'payment_method_option' => '.item:contains("%payment_method%") input', 'shipping_step_label' => '.steps a:contains("Shipping")']);
 }
Exemplo n.º 27
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['billing_address_book' => '#sylius-billing-address .ui.dropdown', 'billing_first_name' => '#sylius_checkout_address_billingAddress_firstName', 'billing_last_name' => '#sylius_checkout_address_billingAddress_lastName', 'billing_street' => '#sylius_checkout_address_billingAddress_street', 'billing_city' => '#sylius_checkout_address_billingAddress_city', 'billing_country' => '#sylius_checkout_address_billingAddress_countryCode', 'billing_country_province' => '[name="sylius_checkout_address[billingAddress][provinceCode]"]', 'billing_postcode' => '#sylius_checkout_address_billingAddress_postcode', 'billing_province' => '[name="sylius_checkout_address[billingAddress][provinceName]"]', 'checkout_subtotal' => '#sylius-checkout-subtotal', 'customer_email' => '#sylius_checkout_address_customer_email', 'different_billing_address' => '#sylius_checkout_address_differentBillingAddress', 'different_billing_address_label' => '#sylius_checkout_address_differentBillingAddress ~ label', 'login_button' => '#sylius-api-login-submit', 'login_password' => 'input[type=\'password\']', 'next_step' => '#next-step', 'shipping_address_book' => '#sylius-shipping-address .ui.dropdown', 'shipping_city' => '#sylius_checkout_address_shippingAddress_city', 'shipping_country' => '#sylius_checkout_address_shippingAddress_countryCode', 'shipping_country_province' => '[name="sylius_checkout_address[shippingAddress][provinceCode]"]', 'shipping_first_name' => '#sylius_checkout_address_shippingAddress_firstName', 'shipping_last_name' => '#sylius_checkout_address_shippingAddress_lastName', 'shipping_postcode' => '#sylius_checkout_address_shippingAddress_postcode', 'shipping_province' => '[name="sylius_checkout_address[shippingAddress][provinceName]"]', 'shipping_street' => '#sylius_checkout_address_shippingAddress_street']);
 }
Exemplo n.º 28
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['address_step_label' => '.steps a:contains("Address")', 'checkout_subtotal' => '#checkout-subtotal', 'next_step' => '#next-step', 'order_cannot_be_paid_message' => '#sylius-order-cannot-be-paid', 'payment_method_option' => '.item:contains("%payment_method%") input', 'payment_method_select' => '.item:contains("%payment_method%") > .field > .ui.radio.checkbox', 'shipping_step_label' => '.steps a:contains("Shipping")']);
 }
Exemplo n.º 29
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['first name' => '#sylius_customer_registration_firstName', 'last name' => '#sylius_customer_registration_lastName', 'email' => '#sylius_customer_registration_email', 'password' => '#sylius_customer_registration_user_plainPassword_first', 'password verification' => '#sylius_customer_registration_user_plainPassword_second', 'phone number' => '#sylius_customer_registration_phoneNumber']);
 }
Exemplo n.º 30
0
 /**
  * {@inheritdoc}
  */
 protected function getDefinedElements()
 {
     return array_merge(parent::getDefinedElements(), ['billing_address' => '#billing-address', 'number' => '#number', 'order_items' => '#sylius-order', 'payments' => '#payments', 'product_price' => '#sylius-order td:nth-child(2)', 'shipping_address' => '#shipping-address', 'subtotal' => '#subtotal', 'total' => '#total']);
 }