Current File : /home/pacjaorg/public_html/kmm/plugins/djclassifieds/coupons/layouts/paymentsection.php |
<?php
/**
* @package DJ-Classifieds
* @copyright Copyright (C) DJ-Extensions.com, All rights reserved.
* @license http://www.gnu.org/licenses GNU/GPL
* @author url: http://dj-extensions.com
* @author email contact@dj-extensions.com
*/
defined('_JEXEC') or die;
$item = $displayData['item'];
$type = $displayData['type'];
$par = $displayData['par'];
$params = $displayData['params'];
$app = JFactory::getApplication();
echo '
<table width="98%" cellspacing="0" cellpadding="0" border="0" class="paymentdetails first coupons_outer"><tbody>
<tr><td class="td_title"><h2>'.JText::_('COM_DJCLASSIFIEDS_COUPON_CODE').'</h2></td></tr>
<tr>
<td class="table_payment">
<div class="payment_desc">'.JText::_('COM_DJCLASSIFIEDS_COUPON_CODE_DESCRIPTION').'</div>';
echo '<form action="'.JRoute::_('index.php').'" method="post" id="coupon_form">
<input type="hidden" name="option" value="'.$app->input->getVar('option').'">
<input type="hidden" name="view" value="'.$app->input->getVar('view').'">
<input type="hidden" name="Itemid" value="'.$app->input->getVar('Itemid').'">
<input type="hidden" name="id" value="'.$app->input->getInt('id',0).'">
<input type="hidden" name="quantity" value="'.$app->input->getInt('quantity',1).'">
<input type="hidden" name="type" value="'.$app->input->getVar('type').'">';
echo '<input class="inputbox" type="text" name="coupon" value="'.$app->input->getVar('coupon').'" placeholder="'.JText::_('COM_DJCLASSIFIEDS_COUPON_CODE').'" />';
echo '<button class="button" type="submit">'.JText::_('COM_DJCLASSIFIEDS_APPLY').'</button>';
echo '</form>';
echo '
</td>
</tr>
</tbody></table>';
?>
<script>
jQuery(function($){
$(document).on('submit', '#coupon_form', function(){
if($('#paymentForm').length && !document.formvalidator.isValid(document.paymentForm)){
jQuery('html, body').animate({
scrollTop: jQuery('#dj-classifieds').offset().top
}, 500);
return false;
}
});
});
</script>