Author Topic: Add a gift option in cart  (Read 755 times)

thefbi

  • Jr. Member
  • **
  • Posts: 93
Add a gift option in cart
« on: April 07, 2019, 14:24:32 pm »
Hello,

i use VM 3.4.3 and Joomla 3.9.4.

I want the client can buy a "Gift" at the order in the cart, if he want to send the products to another person (another address) as a gift.
So the buyer have to make a gift package.
This option have to be 10$ for example.

How can i make this thing ? I dont know if possible with custom fields or not ?

Regards

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2158
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Add a
« Reply #1 on: April 07, 2019, 15:09:26 pm »
Make a custom field as gift cost or simply a product called gift wrapping etc, with instructions to use delivery adress for the gift package

Jörgen @ Kreativ Fotografi
Joomla 3.9.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

thefbi

  • Jr. Member
  • **
  • Posts: 93
Re: Add a gift option in cart
« Reply #2 on: April 07, 2019, 20:34:17 pm »
Hello,

thank you, but i dont know how make a custom field like this ?

The idea is this option can be in the shopping cart. I dont want to make a special product for this.

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2158
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Add a gift option in cart
« Reply #3 on: April 07, 2019, 22:40:56 pm »
A shopper field perhaps ? This can be displayed in the cart.

Jörgen @ Kreativ Fotografi
Joomla 3.9.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

thefbi

  • Jr. Member
  • **
  • Posts: 93
Re: Add a gift option in cart
« Reply #4 on: April 13, 2019, 08:01:00 am »
Hello,

the problem is with shopper field, i cannot add price. This has be asked many time in this forum, but no solution...
So i have try to make a radio button for shopper field, with a text with a link to a product or explaination page, but it seem html is not accepted.

It is very complicated to do a SIMPLE request. A shopper field with cost value

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3821
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Add a gift option in cart
« Reply #5 on: April 14, 2019, 00:44:22 am »
It's perhaps not possible, but you can display a product before or after cart(or a simple link to product, a modal box ...)
This need of course some custom work.

thefbi

  • Jr. Member
  • **
  • Posts: 93
Re: Add a gift option in cart
« Reply #6 on: April 14, 2019, 17:55:31 pm »
Hello,

ok, i am not programer so i dont know what code i have to put, but if you give me a trick i can try to do it...

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3821
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Add a gift option in cart
« Reply #7 on: April 15, 2019, 14:01:04 pm »
You can use for eg. https://shop.st42.fr/fr/produits/vm-product.htm, the module is free
And add it at the position you want

thefbi

  • Jr. Member
  • **
  • Posts: 93
Re: Add a gift option in cart
« Reply #8 on: April 19, 2019, 13:26:24 pm »
Hello and thank you, but do you know how i can just make a field with a link for example, in the cart ?

I can make a link for example : "Pour un paquet cadeaux, cliquez ici" and i redirect to the gift product.

Regards,
Frédéric

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3821
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Add a gift option in cart
« Reply #9 on: April 19, 2019, 14:26:10 pm »
You can add directly in your layout(override in template)
YOURSITE/templates/YOURTEMPLATE/html/com_virtuemart/cart/default_pricelist.php
After (or before) the loop
Code: [Select]
foreach ($this->cart->products as $pkey => $prow) {
Add a new row with your product link
You have many solution, in some case you need to add some codes, in other case add a module.
Make your choice now.