?
Solved

Restore the Virtuemart coupon system

Posted on 2010-04-06
10
Medium Priority
?
414 Views
Last Modified: 2013-11-18
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?
0
Comment
Question by:TonyCabone
  • 4
  • 4
8 Comments
 
LVL 8

Accepted Solution

by:
kumaranmca earned 2000 total points
ID: 29985538

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
 
LVL 8

Expert Comment

by:kumaranmca
ID: 29985991
if you removed...

common/couponField.tpl.php
0
 

Author Comment

by:TonyCabone
ID: 29987418
Hi kumaranmca

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

0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 

Author Comment

by:TonyCabone
ID: 29987634
Email me at TonyCabone@gmail.com if you would like me to send you the link.

Thanks again for your help thus far.
0
 
LVL 8

Expert Comment

by:kumaranmca
ID: 30003296
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
 
LVL 8

Expert Comment

by:kumaranmca
ID: 30137729
Hi Tony,

I think your issue resolved...
0
 

Author Comment

by:TonyCabone
ID: 30573684
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
 

Author Comment

by:TonyCabone
ID: 30573969
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

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While opting for any web-to-print solution, you need to discuss with your team and some of your end users and know their opinions about your decisions. In this article we list down some questions you need to ask yourself.
By following these Magento e-commerce development tips, you can increase your website's conversion and profitability. Read this post for more details.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Suggested Courses

600 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question