close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

problem with option price increment

Thread began 6/19/2011 10:25 am by JBWebWorks | Last modified 6/20/2011 7:17 pm by JBWebWorks | 1291 views | 6 replies |

JBWebWorks

problem with option price increment

using eCart4 and tutorial Product Options with eCart

I am having problem with my sizelookup recordset executing

mysql ---
$var1_rs_sizelookup = "-1";
if (isset($_POST['selectlength'])) {
$var1_rs_sizelookup = (get_magic_quotes_gpc()) ? $_POST['selectlength'] : addslashes($_POST['selectlength']);
}
$paramItem_rs_sizelookup = "-1";
if (isset($_POST['screenroom_1_ID_Add'])) {
$paramItem_rs_sizelookup = (get_magic_quotes_gpc()) ? $_POST['screenroom_1_ID_Add'] : addslashes($_POST['screenroom_1_ID_Add']);
}
mysql_select_db($database_connscreen, $connscreen);
$query_rs_sizelookup = sprintf("SELECT productoptions.optionpriceincrement, productoptions.itemoptionID, options.option_name, options.optiongroupID, optiongroups.optiongroup_name FROM options INNER JOIN productoptions ON options.optionID = productoptions.optionID INNER JOIN optiongroups ON options.optiongroupID = optiongroups.optiongroupID WHERE optiongroups.optiongroup_name = 'lengths' AND productoptions.itemoptionID = %s AND productoptions.item_ID = %s", GetSQLValueString($var1_rs_sizelookup, "int"),GetSQLValueString($paramItem_rs_sizelookup, "int"));
$rs_sizelookup = mysql_query($query_rs_sizelookup, $connscreen) or die(mysql_error());
$row_rs_sizelookup = mysql_fetch_assoc($rs_sizelookup);
$totalRows_rs_sizelookup = mysql_num_rows($rs_sizelookup);

select list populates properly from size recordset, but can't get the sizelookup recordset to work and carry the information to the cart.

Thanks for your help,
-Jim Balthrop

Sign in to reply to this post

Jason ByrnesWebAssist

please post a copy of the page in a zip archive so i can see the recordset code in context.

Sign in to reply to this post

JBWebWorks

attached is page

Attached Files
screenroom_eCart4.zip
Sign in to reply to this post

JBWebWorks

Thanks Jason,

I figured it out and got it to work properly.

I had my recordsets in the wrong place on the page.
To make it work, I put the colors and size recordsets within the repeat region in the body
and the sizelookup recordset which had the price increment info that carried to the cart, i put at the top of the page where the item recordset is.

Sign in to reply to this post

Jason ByrnesWebAssist

glad to hear you found the problem.

Sign in to reply to this post

JBWebWorks

Jason,

can you help me with the confirm page getting the correct information to PayPal Website Standard.

I added the size and sizPriceInc columns to the confirm page and they work properly

I am not sure the code to get that info to PayPal

Here is the current code that i think needs changing

if ((WA_eCart_FormatNumber($screenroom->DisplayInfo("Price") - (($screenroom->DisplayInfo("Price")/$screenroom->TotalColumn("TotalPrice")) * $screenroom->GetDiscounts()), false, 2) > 0)) {
?>
<input type="hidden" name="amount_<?php echo $screenroom_Index+1; ?>" id="amount_<?php echo $screenroom_Index+1; ?>" value="<?php echo WA_eCart_FormatNumber($screenroom->DisplayInfo("Price") - (($screenroom->DisplayInfo("Price")/$screenroom->TotalColumn("TotalPrice")) * $screenroom->GetDiscounts()), false, 2) ?>" />

Sign in to reply to this post

JBWebWorks

Never mind, Jason

I got it working

I changed
if ((WA_eCart_FormatNumber($screenroom->DisplayInfo("Price") - (($screenroom->DisplayInfo("Price")/$screenroom->TotalColumn("TotalPrice")) * $screenroom->GetDiscounts()), false, 2) > 0)) {
?>
<input type="hidden" name="amount_<?php echo $screenroom_Index+1; ?>" id="amount_<?php echo $screenroom_Index+1; ?>" value="<?php echo WA_eCart_FormatNumber($screenroom->DisplayInfo("Price") - (($screenroom->DisplayInfo("Price")/$screenroom->TotalColumn("TotalPrice")) * $screenroom->GetDiscounts()), false, 2) ?>" />


to
if ((WA_eCart_FormatNumber($screenroom->DisplayInfo("Price") - (($screenroom->DisplayInfo("Price")/$screenroom->TotalColumn("TotalPrice")) * $screenroom->GetDiscounts()), false, 2) > 0)) {
?>
<input type="hidden" name="amount_<?php echo $screenroom_Index+1; ?>" id="amount_<?php echo $screenroom_Index+1; ?>" value="<?php echo WA_eCart_FormatNumber($screenroom->DisplayInfo("truePrice") - (($screenroom->DisplayInfo("Price")/$screenroom->TotalColumn("TotalPrice")) * $screenroom->GetDiscounts()), false, 2) ?>" />


thanks for your help, as always

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...