This is a discussion on Easypopulate Wrecks my HTML within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; Hi guys, I did lots of Googling, searched this site and the OSC site before posting this, I know repeat ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Hi guys, I did lots of Googling, searched this site and the OSC site before posting this, I know repeat questions are annoying. After some struggles, I got EP to accept my text files. CHMODd the temp dir, added model numbers, etc. But I have lots of html in the item descriptions (thanks to the great WYSIWYG editor) and it gets wrecked when imported via EP. I turned off the "replace quotes" feature, and this causes it to hang up on ' marks during import. I tried search/replacing the ' marks with /', which still resulted in the same errors during upload. Is there a rewrite/code change in easypopulate.php or something that will allow me to upload product descriptions with all my html intact? Thanks. |
| Sponsored Links | ||
| ||
| |
|
#2
| ||||
| ||||
| You must replace single quotes with \' NOT /' Backslash is the escape character not forwardslash...
__________________ Michael Sasek osCMax Developer
|
|
#3
| |||
| |||
| Thank you! You're a saint to answer all these questions. I run a forum myself so I know how it can be. Ok, so I ended up editing the easypopulate.php file, changing this: Code: $items[$i] = str_replace('\"\"',""",$items[$i]);
if ($replace_quotes){
$items[$i] = str_replace('\"',"&#34",$items[$i]);
$items[$i] = str_replace("\'","&#39",$items[$i]);
}
} else { // no magic_quotes are on
// check if the last character is a quote;
// if it is, chop off the 1st and last character of the string.
if (substr($items[$i],-1) == '"'){
$items[$i] = substr($items[$i],1,strlen($items[$i])-2);
}
// now any remaining doubled double quotes should be converted to one doublequote
$items[$i] = str_replace('""',"&#34",$items[$i]);
if ($replace_quotes){
$items[$i] = str_replace('"',"&#34",$items[$i]);
$items[$i] = str_replace("'","&#39",$items[$i]);
Code: $items[$i] = str_replace('\"\"',""",$items[$i]);
if ($replace_quotes){
$items[$i] = str_replace('\"',""",$items[$i]);
$items[$i] = str_replace("\'","'",$items[$i]);
}
} else { // no magic_quotes are on
// check if the last character is a quote;
// if it is, chop off the 1st and last character of the string.
if (substr($items[$i],-1) == '"'){
$items[$i] = substr($items[$i],1,strlen($items[$i])-2);
}
// now any remaining doubled double quotes should be converted to one doublequote
$items[$i] = str_replace('""',""",$items[$i]);
if ($replace_quotes){
$items[$i] = str_replace('"',""",$items[$i]);
$items[$i] = str_replace("'","'",$items[$i]);
Code: http://www.deepstealth.com/store/images/atulips.jpg%22/ Code: <img width="230" hspace="10" height="153" alt="voice" src="../../../store/images/atulips.jpg"/> |
|
#4
| |||
| |||
| I am wondering if Anyone figure this oue out yet? |
| Sponsored Links | ||
| ||
| |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with HTML & PHP OSCommerce | genijan | osCommerce 2.2 Modification Help | 1 | 03-05-2005 10:54 AM |
| Really Simple HTML Help | braydonhouse | osCommerce 2.2 Modification Help | 1 | 02-22-2004 07:25 AM |
| HTML in emails | Anonymous | osCMax v1.7 Discussion | 8 | 12-05-2003 09:09 AM |
| HTML? | West | osCommerce 2.2 Modification Help | 0 | 05-05-2003 04:28 PM |
| HTML Newsletter | adrenalinez | osCommerce 2.2 Modification Help | 0 | 01-29-2003 10:16 PM |