Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
 All Forums
 Technical
 ASP (Windows server) versions
 After inserting to cart, price of all change
Author « Topic »  

gwilson
Starting Member

44 Posts

Pre-sales questions only
(More Details...)

Posted - 08/12/2019 :  15:52:01  
Maybe I'm trying to do something the wrong way, but....
in a custom aspx page I create the new product price and set the product options.
The first time pass the values, the cart inserts correctly. "custom"
The second product added for that session, adding the same product CardId ("custom") the previous cart entries get added, along with a new cardID and associated cartoptions, but the price of each item in the cart change together to the last price.

<form name="CustomQuote" action="cart.asp" method="post">
<input type="hidden" value="add" name="mode" />
<input type="hidden" value="default.aspx" name="frompage" />
<input type=hidden value=<%=strCustomXXX%> name="id" />

<input type="hidden" value="264" name="optn0" />
<input type=hidden value="<%=strFontColorName%>" name=voptn0 />

<input type="hidden" value="40" name="optn1" />
<input type=hidden value="<%=strFontName%>" name=voptn1>

<input type="hidden" value="18209" name="optn2" />
<input type=hidden value="<%=strFontSize%>" name=voptn2 />

<input type="hidden" value="18008" name="optn3">
<input type=hidden value="<%=strChars%>" name=voptn3 />

<input type="hidden" value="19050" name="optn4">
<input type=hidden value="<%= strCustomXXX&".pdf" %>" name=voptn4 />

<p align="center"><input type="submit" value=" Submit Order " name="CustomQuote"></p>
</form>
Price is passed as Dim dPrice As Double = Val(Session("dPrice"))

in inccart.asp line 2196 or so (sSQL="INSERT INTO cart *****) I see the price of the additional product is fine.
after the function additemtocart(ainame,aiprice) is done, the code goes off someplace to update the cart.
At that time the cart count summary shows each item '1 x custom quote" at the last price.

You can test the code at https://wallwordsdev.visualnetmedia.com/
"Design Your Own" Type a word. step 2 select font size, step 3 select color, then add to cart. Then confirm on next page.

Why or where is the cart code changing the price of all items in the cart? How to prevent this?



Vince
Administrator

42470 Posts

Posted - 08/13/2019 :  02:04:49  
Have a look in incfunctions.asp for the function...
function checkpricebreaks(cpbpid,origprice)
I think this could be the culprit. The purpose of this is to check if there are Price Breaks (for quantity purchase) on an item and it will reset the price to the correct one.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

gwilson
Starting Member

44 Posts

Pre-sales questions only
(More Details...)

Posted - 08/13/2019 :  09:13:17  
Thank you Vince. I added a logic to test for our custom quote product:

function checkpricebreaks(cpbpid,origprice)
if cpbpid="custom" then
exit function
end if

It seems to have done the trick.

~ Avram
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000