Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

\ when I enter information in product update if I


casperess52

Recommended Posts

ok, I have contribution, Extra Fields, and when I enter a number with an inches sign (") it comes up \". I have also tried the html code for " and it still does it. What page do I need to look at to fix this, and/or what is it. Any help appreciated

 

Crystal

Link to comment
Share on other sites

A link to where you downloaded the contribution please...so I can download and look through it. I'm not familiar with the contribution but can probably pinpoint the problem within a few minutes of opening the archive.

Link to comment
Share on other sites

Try this -> in catalog/product_info.php find this code:

  while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
       echo '<b>'.$extra_fields['name'].': </b>';
       echo $extra_fields['value'].'<BR>'; 
 }

And change it to this:

  while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
       echo '<b>'.stripslashes($extra_fields['name']).': </b>';
       echo $extra_fields['value'].'<BR>'; 
 }

Tell me how it works. BTW, I assumed you were talking about the customer presentation and not something on the admin side...

Link to comment
Share on other sites

I get this parse error

 

Parse error: parse error, unexpected T_VARIABLE, expecting ',' or ';' in /home/vintagec/public_html/ecommerce/os/catalog/product_info.php on line 187

 

 

When I enter the info in admin side and hit preview it shows in preview, so prob in admin side right?

Link to comment
Share on other sites

Admin side is a minor bug...customer presentation is more important.

 

That should not be throwing a parse error...hhmmm

 

Try this:

while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
$extra_fields['name'] = stripslashes($extra_fields['name']);       
echo '<b>'.$extra_fields['name'].': </b>';
echo $extra_fields['value'].'<BR>';
}

Link to comment
Share on other sites

Looks like you have a NULL data value at the bottom...there's your parse error. Remove the NULL data pair and try the code again. Use this code:

while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
      echo '<b>'.stripslashes($extra_fields['name']).': </b>';
      echo stripslashes($extra_fields['value']).'<BR>';
}

Link to comment
Share on other sites

Here's what I mean by NULL value:

Chest/Bust: 38\" <-- Needs to be stripped of the slash
Waist: 48
Hips: 54
Overall Length: 39
Designer: Pandora Lingerie
Approx. Size: S-M
Fabric Content: Nylon/Chiffon
Condition: Excellent
: <== Here is your NULL value pair

Find the entry that is blank and delete it or populate it with data.

Link to comment
Share on other sites

Also, it should be noted that if you use that code you will ALWAYS have to use a forward slash in your data pair. If you use a backward slash it will remove it automatically...

Link to comment
Share on other sites

I got it!!!!!!!!!!!

 

This is what I did.............

 

 

while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
$extra_fields['name'] = stripslashes($extra_fields['name']);       
echo '<b>'.$extra_fields['name'].': </b>';
echo stripslashes($extra_fields['value']).'<BR>';
}

 

 

 

YEAH!!!!!!!!!!!! Thank you for getting me to the right area!

 

I appreciate the help!

 

Crystal

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...