osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Easypopulate / Attributes problem.

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


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v1.7 Forums > osCMax v1.7 Discussion

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 07-24-2005, 04:25 PM
New Member
 
Join Date: Dec 2004
Posts: 14
Thanks: 0
Thanked 3 Times in 2 Posts
Rep Power: 0
davem
Default Easypopulate / Attributes problem.

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
  #2  
Old 08-19-2005, 08:24 AM
New Member
 
Join Date: Dec 2004
Posts: 14
Thanks: 0
Thanked 3 Times in 2 Posts
Rep Power: 0
davem
Default RE: Easypopulate / Attributes problem.

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 06:33 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax