Restore the Virtuemart coupon system


I'm running Joomla 1.1.15 & Virtuemart 1.14

A while ago I removed/commented out the code that displays the coupon entry field at the checkout. I now need to restore it but can't remember which files I need to get into.

I have customised various parts of VM so don't want to just do a fresh install.

Can anyone help me turn the coupon system back on?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


Coupon textbox set the following path...


Line number 271...

$basket_html .= $tpl->fetch( 'common/couponField.tpl.php' );

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
if you removed...

TonyCaboneAuthor Commented:
Hi kumaranmca

Thank you for the tip however that code is still there.  What else could it be?

Powerful Yet Easy-to-Use Network Monitoring

Identify excessive bandwidth utilization or unexpected application traffic with SolarWinds Bandwidth Analyzer Pack.

TonyCaboneAuthor Commented:
Email me at if you would like me to send you the link.

Thanks again for your help thus far.
Hi Tony,

I think you removed the coding of"couponField.tpl.php" file

File path:



check in ro_basket.php

Hi Tony,

I think your issue resolved...
TonyCaboneAuthor Commented:
Hi kumaranmca,

I am sorry for belated reply. I still cannot get coupons to work.

The code $basket_html .= $tpl->fetch( 'common/couponField.tpl.php' ); is not in either of those two files, where should it be inserted?


if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );



* @version $Id:couponField.tpl.php 431 2006-10-17 21:55:46 +0200 (Di, 17 Okt 2006) soeren_nb $

* @package VirtueMart

* @subpackage themes

* @copyright Copyright (C) 2008 soeren - All rights reserved.

* @license GNU/GPL, see LICENSE.php

* VirtueMart is free software. This version may have been modified pursuant

* to the GNU General Public License, and as distributed it includes or

* is derivative of works licensed under the GNU General Public License or

* other free or open source software licenses.

* See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details.

* @author Erich Vinson



mm_showMyFileName( __FILE__ );


<table width="100%">

	<tr class="sectiontableentry1">

		<td width="100%">


if (@$_SESSION['invalid_coupon'] == true) {

	echo "<strong>" . $VM_LANG->_('PHPSHOP_COUPON_CODE_INVALID') . "</strong><br />";


if( !empty($GLOBALS['coupon_error']) ) {

	echo vmGet($GLOBALS, 'coupon_error', '')."<br />";


// If you have a coupon code, please enter it here:

echo $VM_LANG->_('PHPSHOP_COUPON_ENTER_HERE') . '<br />';


	    <form action="<?php echo $mm_action_url . basename( $_SERVER['PHP_SELF']) ?>" method="post" onsubmit="return checkCouponField(this);">

			<input type="text" name="coupon_code" id="coupon_code" width="10" maxlength="30" class="inputbox" />

			<input type="hidden" name="Itemid" value="<?php echo @intval($_REQUEST['Itemid'])?>" />

			<input type="hidden" name="do_coupon" value="yes" />

			<input type="hidden" name="option" value="<?php echo $option ?>" />

			<input type="hidden" name="page" value="<?php echo $page ?>" />

			<input type="submit" value="<?php echo $VM_LANG->_('PHPSHOP_COUPON_SUBMIT_BUTTON') ?>" class="button" />





<script type="text/javascript">

function checkCouponField(form) {

	if(form.coupon_code.value == '') {

		new Effect.Highlight('coupon_code');

		return false;


	return true;



Open in new window

TonyCaboneAuthor Commented:
Here is URL of site with problem:

Coupon field should appear on "Show Cart" page but it doesn't.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.