casperess52 Posted November 15, 2004 Posted November 15, 2004 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
Guest Posted November 15, 2004 Posted November 15, 2004 Give us a link to the contribution...looks like a simple strip_slashes() will do the trick here.
casperess52 Posted November 15, 2004 Author Posted November 15, 2004 what php page you want? categories.php? It is product extra fields contribution......It is when I enter " in the new fields......
Guest Posted November 15, 2004 Posted November 15, 2004 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.
casperess52 Posted November 15, 2004 Author Posted November 15, 2004 <a href="http://www.oscommerce.com/community/contributions,2202/category,all/search,product+extra">contribution</a>
Guest Posted November 15, 2004 Posted November 15, 2004 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...
casperess52 Posted November 15, 2004 Author Posted November 15, 2004 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?
Guest Posted November 15, 2004 Posted November 15, 2004 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>'; }
casperess52 Posted November 15, 2004 Author Posted November 15, 2004 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
Guest Posted November 15, 2004 Posted November 15, 2004 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>'; }
Guest Posted November 15, 2004 Posted November 15, 2004 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.
Guest Posted November 15, 2004 Posted November 15, 2004 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...
casperess52 Posted November 15, 2004 Author Posted November 15, 2004 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
casperess52 Posted November 15, 2004 Author Posted November 15, 2004 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
Guest Posted November 15, 2004 Posted November 15, 2004 Glad to be of service...now go make some money :)
casperess52 Posted November 15, 2004 Author Posted November 15, 2004 Well, I think I am ready to start getting stuff in! Hope fully will be up and running in a week or so! Crystal
Guest Posted November 15, 2004 Posted November 15, 2004 BTW, did you happen to notice that both your TOP and CATALOG on the breadcrumb trail are pointing to osCommerce.com?
casperess52 Posted November 16, 2004 Author Posted November 16, 2004 No I hadn't noticed! Thanks for letting me know!
Guest Posted November 16, 2004 Posted November 16, 2004 The settings are in your includes/configure.php file...
casperess52 Posted November 16, 2004 Author Posted November 16, 2004 got it fixed! do you think the site looks ok? still have a little tweaking to do, but for the most part I am done then I have to test it all out.
Guest Posted November 16, 2004 Posted November 16, 2004 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! :)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.