cancel
Showing results for 
Search instead for 
Did you mean: 

Is it a gift? Choice in checkout page Magento 2

SOLVED

Is it a gift? Choice in checkout page Magento 2

Hello, 

I would like to ask if there is any way through default magento options to enable a gift question on the checkout page like: Would you like a gift wrap? -YES -NO (required). 

Here i saw some simillar functions in magento, but these are not available in the version I use. (v-2.2.3)

Thank you, 
Nick

3 REPLIES

Re: Is it a gift? Choice in checkout page Magento 2

Hi @Nickpap21

 

Yes you are right , the link you have posted that is for giftwarp.

 

The option is available - on stores - > configration -> sales -> sales gift options

 

From there you need to enable both option to Yes !!

 

then you will able to see gift message on cart page !!

 

here is the ref link -  http://docs.magento.com/m2/ce/user_guide/sales/gift-options.html

 

Hope it helps 

 

 

if issue solved,Click Kudos & Accept as Solution

Re: Is it a gift? Choice in checkout page Magento 2

Hello @Nickpap21

 

Magento 2 by default provide on cart page.

 

For that setting, you need to go

 

Admin >> Stores >> Configuration >> Sales >> Sales >> 
in that Gift Options tab

 

If you need on checkout page then you need to add code into the checkout_index_index xml into body tag

<referenceContainer name="content">
			<block class="Magento\GiftMessage\Block\Cart\GiftOptions" name="checkout.cart.order.actions.gift_options" template="cart/gift_options.phtml" cacheable="false" after="-">
					<arguments>
						<argument name="jsLayout" xsi:type="array">
							<item name="types" xsi:type="array"/>
							<item name="components" xsi:type="array">
								<item name="giftOptionsCart" xsi:type="array">
									<item name="component" xsi:type="string">Magento_GiftMessage/js/view/gift-message</item>
									<item name="config" xsi:type="array">
										<item name="template" xsi:type="string">Magento_GiftMessage/gift-message</item>
										<item name="formTemplate" xsi:type="string">Magento_GiftMessage/gift-message-form</item>
									</item>
								</item>
							</item>
						</argument>
					</arguments>
				</block>
			</referenceContainer>

Hope it will help you.

 

If works then mark as the solution or give kudos.

 

Re: Is it a gift? Choice in checkout page Magento 2

Thanks for the help, it worked!