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

1 ACCEPTED SOLUTION

Accepted Solutions

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.

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

View solution in original post

5 REPLIES 5

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.

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

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

Thanks for the help, it worked!

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

Hi @Nickpap21

 

You can also use an extension for this. For example, Magento 2 gift wrap extension by FMEextensions will do this for you with a lot of other features such as creating various types of gift wrapping designs, adding price, and restricting by store views, etc. Check it out here

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

The solution for the checkout page is not working. Is there any other solution ??