News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

redeem free product via coupon code?

Started by ehwwong, October 04, 2012, 07:17:38 AM

Previous topic - Next topic

ehwwong

Hi,

I am on joomla 2.5 and vm2.0.10

Recently, my company wants to launch a free product campaign. These are the following logic.

    User goes to article page and click on a "Redeem" button on the joomla article page
    User inputs their 1 time use voucher code
    The cart then adds the free product and can continue to shop the usual way.


So to sum it up, is there any way that i can add a product in VM without actually displaying it and let the user redeem via a code?

I am not looking for "free" solution, if there are any paid modules/plugin i am willing to explore that option.

CSPS

#1
Quote from: ehwwong on October 04, 2012, 07:17:38 AM
Hi,

I am on joomla 2.5 and vm2.0.10

Recently, my company wants to launch a free product campaign. These are the following logic.

    User goes to article page and click on a "Redeem" button on the joomla article page
    User inputs their 1 time use voucher code
    The cart then adds the free product and can continue to shop the usual way.


So to sum it up, is there any way that i can add a product in VM without actually displaying it and let the user redeem via a code?

I am not looking for "free" solution, if there are any paid modules/plugin i am willing to explore that option.

I have tested and this should work.

If you make your button with this in your article using the html view:

<form action="/index.php/component/virtuemart/" method="post">
<div class="addtocart-bar"><span class="addtocart-button"><span class="addtocart-button"> <input class="addtocart-button" title="Add to Cart" type="submit" name="addtocart" value="Redeem" /></span></span>
<div class="clear"> </div>
</div>
<input type="hidden" name="quantity[]" value="1" />
<input class="pname" type="hidden" value="INSERT PRODUCT NAME" />
<input type="hidden" name="option" value="com_virtuemart" />
<input type="hidden" name="view" value="cart" />
<input type="hidden" name="task" value="add" />
<input type="hidden" name="virtuemart_product_id[]" value="INSERT PRODUCT ID" />
</form>


That way when the user clicks the button it will add one of the product straight to the cart and automatically navigate them to the cart page where they would then have to input their coupon code.


I have been grateful to all the people that post on forums for me to find answers to problems and saw this as an opportunity to hopefully help some one else.