This is a discussion on Easypopulate / Attributes problem. within the osCMax v1.7 Discussion forums, part of the osCMax v1.7 Forums category; I have been experiencing the following error when using easypopulate: If I enter a product which has attributes with price ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| I have been experiencing the following error when using easypopulate: If I enter a product which has attributes with price implications, for example sizes small, medium and large. Small is the original price, with medium and large being more expensive. Being in the UK and using VAT (17.5%), if I want to add £10 to the retail price, for say the medium size I would add + 8.51 under the relevant attribute. This works fine if I add it via the admin section. However, if I upload it via easypopulate the 8.51 gets inserted into the database as 8.00, hence the retail would now show + 9.40. Same error if it is downloaded and then re-uploaded, i.e. the correct value of 8.51 in the database would be changed to 8.00. For info, the easypopulate file downloads ok and the proper value shows in the text file and subsequently in the script results displayed after an “insert into database”. It is the value in the database itself which has been rounded down. Other currency values, for example the product price, are unaffected. Any help on this would be much appreciated. |
| Sponsored Links | ||
| ||
|
#2
| |||
| |||
| Solved the above by upgrading to version 2.76-MS2 of easypopulate. For anyone who is interested, I also had a problem with mangled html in the product descriptions whether "Escape character conversion" was on or off. My solution was to set it to off and change the following code which should be around line 1239: FROM: // Check to see if either of the magic_quotes are turned on or off; // And apply filtering accordingly. if (function_exists('ini_get')) { //echo "Getting ready to check magic quotes<br>"; if (ini_get('magic_quotes_runtime') == 1){ // The magic_quotes_runtime are on, so lets account for them // check if the last character is a quote; // if it is, chop off the quotes. if (substr($items[$i],-1) == '"'){ $items[$i] = substr($items[$i],2,strlen($items[$i])-4); } // 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]); } } 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]); } } } TO: // Check to see if either of the magic_quotes are turned on or off; // And apply filtering accordingly. if (function_exists('ini_get')) { //echo "Getting ready to check magic quotes<br>"; if (ini_get('magic_quotes_runtime') == 1){ // The magic_quotes_runtime are on, so lets account for them // check if the last character is a quote; // if it is, chop off the quotes. if (substr($items[$i],-1) == '"'){ $items[$i] = substr($items[$i],2,strlen($items[$i])-4); } // 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('\"',"&#34",$items[$i]); $items[$i] = str_replace("\'","&#39",$items[$i]); } $items[$i] = ( addslashes ( $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('"',"&#34",$items[$i]); $items[$i] = str_replace("'","&#39",$items[$i]); } $items[$i] = ( addslashes ( $items[$i] ) ); } } Please be aware that I am very much a newbie at php, but the above appears to have solved the problem for me. |
| Sponsored Links | ||
| ||
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| easypopulate problem | mcilpuf | osCMax v2 Installation issues | 0 | 09-23-2006 04:20 PM |
| EasyPopulate - suddenly having upload problem - See Error | xpressed | osCMax v1.7 Discussion | 4 | 07-09-2004 05:56 AM |
| EasyPopulate 2.72 attributes not correct? | Kristine | osCMax v1.7 General Mods Discussion | 1 | 05-10-2004 12:27 PM |
| easypopulate froogle generation problem | BKnapik | osCMax v1.7 Discussion | 0 | 01-27-2004 07:00 AM |
| Adding product attributes with easypopulate | mcg1103 | osCommerce 2.2 Modification Help | 2 | 08-20-2003 10:00 AM |