Calling Developers!
We are reenergizing our code contribution process! Learn More

What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hi team , As in gift card product there is no shipment method , if i want to implement the No shipme

Options
U04UE6DF06N
U04UE6DF06N Posts: 77 🧑🏻‍🚀 - Cadet
edited April 2023 in Help

Hi team ,
As in gift card product there is no shipment method , if i want to implement the No shipment for all product basically i don't want shipment step from checkout process so how can i acheive this.

Comments

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 🪐 - Explorer
    Options

    Adjust the \SprykerShop\Yves\CheckoutPage\Process\Steps\ShipmentStep::requireInput method in your project code, but the core already skips shipment steps if there are only gift cards in the quote:

        /**
         * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
         *
         * @return bool
         */
        public function requireInput(AbstractTransfer $quoteTransfer)
        {
            return $quoteTransfer->getItems()->count() !== 0
                && $this->executeCheckoutShipmentStepEnterPreCheckPlugins($quoteTransfer)
                && $this->giftCardItemsChecker->hasOnlyGiftCardItems($quoteTransfer->getItems()) === false;
        }
    
  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 🪐 - Explorer
    Options
    1. part that would need adjustment is \SprykerShop\Yves\CheckoutPage\Process\Steps\ShipmentStep::postCondition if both methodes return true the shipment step is just skipped.
      It will still be displayed in the checkout breadcrumb, but customer will never have to fill anything and will be put from address to payment directly
  • U04GQPG2W3Z
    U04GQPG2W3Z Posts: 8 🧑🏻‍🚀 - Cadet
    Options

    Hi @UL6DGRULR As we have service products, we do not want the shipment step in checkout. Please suggest how to remove that.

  • U04GQPG2W3Z
    U04GQPG2W3Z Posts: 8 🧑🏻‍🚀 - Cadet
    Options

    The changes you have suggested are resulting the below error on the checkout summary page.

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 🪐 - Explorer
    Options

    You can add a shipping method "dummy", with a zero price and add this shipping method to the quote in one of the checkout steps you execute.