Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

<BR> is showing up in notices, among other things.


-Spazmatic-

Recommended Posts

wtf0in.jpg

All three of them bother me.. :)

 

As they should. You need to check your language file, its not being picked up correctly, that's why you see those constants instead of the actual values.

 

Be well,

Tina

If you're not having fun you're not doing it right

 

Teach a person to fish rather than give them a loaf of bread or however that saying goes.

Link to comment
Share on other sites

So, what am I supposed to do here? I got in trouble earlier for bumping (which I thought was completely legal in all forums, guess I was wrong)....but I've given all the information I know. If my question goes unanswered, do I just say "oh well" and hate my site?

 

I don't know what else to do, I need my question answered and I've tried and tried to find the problem but sadly I cannot.

Link to comment
Share on other sites

On the 1st one, <BR>, I assume this from the CCGV contribution? The text for this line comes from the file located in ..\catalog\includes\languages\add_ccgvdc_english.php

 

define('ERROR_REDEEMED_AMOUNT_ZERO', '<BR>***HOWEVER:No reducion available, please see the coupon restrictions***');

 

I assume the intent is for this part of the text to start on the next line. Try changing this to <br> or just \n

 

Also, while you are changing this you might want to change "reducion" to "reduction"

 

Let us know on this one. I will look into the others... Is this the only page where you are having these type of problems? Also, did this work before and suddenly stopped or has it always been this way after adding the contributions?

Link to comment
Share on other sites

On the last one - TEXT_ENTER_GV_CODE - the code that puts this here is in ..\catalog\includes\modules\order_total\ot_gv.php

 

		$selection_string .= TEXT_ENTER_GV_CODE . tep_draw_input_field('gv_redeem_code') . '</td>';

 

It would appear that the define statment for this did not get included or does not exist. Perhaps all the files for this contribution did not get installed completely or perhaps there is a newer version of this that corrects these problems.

 

The Define for this is in - ..\catalog\includes\languages\english\modules\order_total\ot_gv.php

 

  define('TEXT_ENTER_GV_CODE', 'Enter Redeem Code??');

Link to comment
Share on other sites

On the 1st one, <BR>, I assume this from the CCGV contribution? The text for this line comes from the file located in ..\catalog\includes\languages\add_ccgvdc_english.php

 

I searched the forum for "reducion" and found about 12 posts with this in it. In all of them, the message has the <BR>. So this one is an error in the contribution that no one questioned or corrected.

Link to comment
Share on other sites

On the last one - TEXT_ENTER_GV_CODE - the code that puts this here is in ..\catalog\includes\modules\order_total\ot_gv.php

 

This problem and probably the middle problem (paypal), is most likely due to an incomplete installation of the contribution or some missing files from the contribution.

Link to comment
Share on other sites

On the last one - TEXT_ENTER_GV_CODE - the code that puts this here is in ..\catalog\includes\modules\order_total\ot_gv.php

 

		$selection_string .= TEXT_ENTER_GV_CODE . tep_draw_input_field('gv_redeem_code') . '</td>';

 

It would appear that the define statment for this did not get included or does not exist. Perhaps all the files for this contribution did not get installed completely or perhaps there is a newer version of this that corrects these problems.

 

The Define for this is in - ..\catalog\includes\languages\english\modules\order_total\ot_gv.php

 

  define('TEXT_ENTER_GV_CODE', 'Enter Redeem Code  ');

 

 

Well, this is odd. This is my ot_gv.php

 

<?php
/*
 $Id: ot_gv.php,v 1.2.2.4 2003/05/14 22:52:59 wilt Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

 define('MODULE_ORDER_TOTAL_GV_TITLE', 'Gift Vouchers');
 define('MODULE_ORDER_TOTAL_GV_HEADER', 'Gift Vouchers/Discount Coupons');
 define('MODULE_ORDER_TOTAL_GV_DESCRIPTION', 'Gift Vouchers');
 define('SHIPPING_NOT_INCLUDED', ' [Shipping not included]');
 define('TAX_NOT_INCLUDED', ' [Tax not included]');
 define('MODULE_ORDER_TOTAL_GV_USER_PROMPT', 'Tick to use Gift Voucher account balance -> ');
 define('TEXT_ENTER_GV_CODE', 'Enter Redeem Code  ');

// Added by Rigadin in v5.13 to show module errors on checkout_payment page
 define('MODULE_ORDER_TOTAL_GV_TEXT_ERROR', 'Gift Voucher/Discount coupon');
?>

 

I'm wondering what could be wrong.

Link to comment
Share on other sites

Well, this is odd. This is my ot_gv.php

 

<?php
/*
 $Id: ot_gv.php,v 1.2.2.4 2003/05/14 22:52:59 wilt Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

 define('MODULE_ORDER_TOTAL_GV_TITLE', 'Gift Vouchers');
 define('MODULE_ORDER_TOTAL_GV_HEADER', 'Gift Vouchers/Discount Coupons');
 define('MODULE_ORDER_TOTAL_GV_DESCRIPTION', 'Gift Vouchers');
 define('SHIPPING_NOT_INCLUDED', ' [Shipping not included]');
 define('TAX_NOT_INCLUDED', ' [Tax not included]');
 define('MODULE_ORDER_TOTAL_GV_USER_PROMPT', 'Tick to use Gift Voucher account balance -> ');
 define('TEXT_ENTER_GV_CODE', 'Enter Redeem Code  ');

// Added by Rigadin in v5.13 to show module errors on checkout_payment page
 define('MODULE_ORDER_TOTAL_GV_TEXT_ERROR', 'Gift Voucher/Discount coupon');
?>

 

I'm wondering what could be wrong.

 

It appears that some of the other "defines" in this file are appearing on the web page. So, this one should be working. As a quickie test/workaround you can put a copy of the define right before where the "$selection_string" variable is being setup.

 

It is still acting like this whole file of defines is not being included at all (the ones that appear to be working could be coming from an exiting define in a some other file.)

Link to comment
Share on other sites

The PHP manual states that once a constant is defined, it cannot be changed or un-defined. This would imply that either none of the define statements in that file are being executed or there is something wrong with the "text_enter_gv_code" one.

 

I could not determine where the "paypal" string problem was defined. It would be interesting to find if it also contained some " " like the text_enter_gv_code does. If so, perhaps searching for this in the forum would turn up a solution (as far as I know, you can put this into a constant.)

 

Single ' and double " can result in the enclose string being parsed differently. You could try changing to " in the define statement and see if this has an effect.

Link to comment
Share on other sites

Wha...?

 

I added

define('TEXT_ENTER_GV_CODE', 'Enter Promo code here:');

and now it works....

Sorry for all the hassles! Thank you VERY VERY much MaBiSmAd!

 

My best guess is that the   is not allowed in a define, at least on your version and configuration of PHP.

Link to comment
Share on other sites

Ah..

 

Just found one other thing that bugs me.

 

Is there a way to take out that line that says "Gift Vouchers/Discount Coupons" right above my TEXT_ENTER_GV_CODE box?

That one appears to be the following define in that same file -

define('MODULE_ORDER_TOTAL_GV_HEADER', 'Gift Vouchers/Discount Coupons');

It is loaded in a function as a header. If we assume that it is only used in the one place you want to remove it, you can replace the string with an empty string -

define('MODULE_ORDER_TOTAL_GV_HEADER', ''); // leave the two single quotes with nothing in between

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...