Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

\ when I enter information in product update if I


casperess52

Recommended Posts

Posted

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

Posted

Give us a link to the contribution...looks like a simple strip_slashes() will do the trick here.

Posted

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.

Posted

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...

Posted

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?

Posted

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>';
}

Posted

nope, still doing it,

 

here is my page I only put in one on the top line of measurements

 

My Webpage

 

I agree with admin being a bug, I can handle that, but I want my presentation nice!

 

Thanks

Posted

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>';
}

Posted

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.

Posted

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...

Posted

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

Posted

you had it posted while I was trying to figure it out and I got it before I read your post! Yeah, I found that } and deleted it and got rid of the parse................. Thanks again for all the help!

 

Crystal

Posted

Glad to be of service...now go make some money :)

Posted

BTW, did you happen to notice that both your TOP and CATALOG on the breadcrumb trail are pointing to osCommerce.com?

Posted

The settings are in your includes/configure.php file...

Posted

Just a few more tweaks and you'll be where you want to be...site has a nice, clean layout.

 

Good luck in making lots of money! :)

Archived

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

×
×
  • Create New...