Restore the Virtuemart coupon system

Hi,

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?
TonyCaboneAsked:
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.

kumaranmcaCommented:

Coupon textbox set the following path...

/administrator/components/com_virtuemart/html/baset.php

Line number 271...

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

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
kumaranmcaCommented:
if you removed...

common/couponField.tpl.php
0
TonyCaboneAuthor Commented:
Hi kumaranmca

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

0
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 TonyCabone@gmail.com if you would like me to send you the link.

Thanks again for your help thus far.
0
kumaranmcaCommented:
Hi Tony,

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

File path:

<root>/compoents/com_virtuemart/themes/default/templates/common/couponField.tpl.php

or

check in ro_basket.php

/administrator/components/com_virtuemart/html/ro_baset.php
0
kumaranmcaCommented:
Hi Tony,

I think your issue resolved...
0
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?


<?php 

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 http://www.gnu.org/copyleft/gpl.html 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

* http://virtuemart.net

*/



mm_showMyFileName( __FILE__ );



?>



<table width="100%">

	<tr class="sectiontableentry1">

		<td width="100%">

<?php

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" />

		</form>		

		</td>

	</tr>

</table>

<script type="text/javascript">

function checkCouponField(form) {

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

		new Effect.Highlight('coupon_code');

		return false;

	}

	return true;

}

</script>

Open in new window

0
TonyCaboneAuthor Commented:
Here is URL of site with problem:

http://gator967.hostgator.com/~tekspec/taste/index.php?option=com_virtuemart&page=shop.browse&category_id=6&Itemid=53

Coupon field should appear on "Show Cart" page but it doesn't.
0
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
E-Commerce

From novice to tech pro — start learning today.