Jump to content

[solved] Module - gift wrapping paper


cortega

Recommended Posts

Pretashop defaults the module of the gift wrapping paper, but I would like to be able to make it appear only the option to add the wrapping paper to certain products. Do you know if this is possible?

 

I am trying it by code but I make conditional if the order has a certain product, it shows the message of the gift wrapping, but it only looks at the id_product of the last product in the basket. And what I want is to see if any product in the basket is the one I want to throw with the choice of the gift wrap.

 

If anyone has any ideas, please tell me!

Edited by cortega (see edit history)
Link to comment
Share on other sites

With this, compare in the latest product:

 

{if $product.id_product==1321}show gift paper option{else} no{/if}

 

How could I do with what you tell me to compare with any product? ($cart->getProducts() )

 

Thank you very much and greetings

Link to comment
Share on other sites

Ok... in tpl file the code is different.

 

In order-carrier.tpl, get the line

{if $giftAllowed}

And replace it with:

				{assign var="show_gift" value=false}
				{foreach $cart->getProducts() as $product}
					{if $product.id_product == 1321}{$show_gift = true}{/if}
				{/foreach}
				{if $giftAllowed && $show_gift}
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...