PDA

View Full Version : Reformat the GV/Discount Coupon Code Redemption



jbanda
02-26-2009, 07:43 AM
I'd like to reformat the GV/Discount Coupon redemption area on the checkout_payment page so that it looks slightly different from the rest of the page (basically give it a different background color). However, I've not had any luck changing any of the code in checkout_payment.tpl.php OR ot_coupon.php OR stylesheet.css.

Any idea where the styles for that area can be changed?

Thanks so much!

jpf
02-27-2009, 07:50 AM
The little bit of HTML for the coupon code request box in payment section is in ot_coupon.php file. The CSS class is main - but can add/change that to whatever you want in your CSS...


function credit_selection() {
global $customer_id, $currencies, $language;
$selection_string = '';
$selection_string .= '<tr>' . "n";
$selection_string .= ' <td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') .'</td>';
$selection_string .= ' <td class="main">' . "n";
$image_submit = '<input type="image" name="submit_redeem" onClick="submitFunction()" src="' . DIR_WS_LANGUAGES . $language . '/images/buttons/button_redeem.gif" border="0" alt="' . IMAGE_REDEEM_VOUCHER . '" title = "' . IMAGE_REDEEM_VOUCHER . '">';
$selection_string .= TEXT_ENTER_COUPON_CODE . tep_draw_input_field('gv_redeem_code') . '</td>';
$selection_string .= ' <td align="right">' . $image_submit . '</td>';
$selection_string .= ' <td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') . '</td>';
$selection_string .= '</tr>' . "n";
return $selection_string;
}
Change to say:

function credit_selection() {
global $customer_id, $currencies, $language;
$selection_string = '';
$selection_string .= '<tr>' . "n";
$selection_string .= ' <td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') .'</td>';
$selection_string .= ' <td class="ot_coupon">' . "n";
$image_submit = '<input type="image" name="submit_redeem" onClick="submitFunction()" src="' . DIR_WS_LANGUAGES . $language . '/images/buttons/button_redeem.gif" border="0" alt="' . IMAGE_REDEEM_VOUCHER . '" title = "' . IMAGE_REDEEM_VOUCHER . '">';
$selection_string .= TEXT_ENTER_COUPON_CODE . tep_draw_input_field('gv_redeem_code') . '</td>';
$selection_string .= ' <td align="right">' . $image_submit . '</td>';
$selection_string .= ' <td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') . '</td>';
$selection_string .= '</tr>' . "n";
return $selection_string;
}

then add listin in your CSS for ot_coupon