close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Add to Cart giving the same price

Thread began 7/18/2011 6:29 am by paul377172 | Last modified 7/21/2011 12:17 pm by Ray Borduin | 979 views | 5 replies |

paul377172

Add to Cart giving the same price

I I have added more than one add to cart button on my product details page. It has more than one price attached to each product. However when click add to cart on the web page, it will add that price to the shopping cart but when I try to add to cart another cart from the same product, all it does is add the same price again, so you get 2 items of the product with the same price instead of two different prices.

I created one Products table with serveral price fields in depending on the length of subscription.

Is there a way this will work?

Thanks

Paul

Attached Files
cart.zip
details.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the problem is that both products use the same ID, so the cart considers them the same product.


You have the item information coming from a database table, but you are setting the add to cart button up as a static add to cart button.

For the way this page is configured, you would be better off using static data in the add to cart button bindings, then trying to bind to the recordset columns.

Sign in to reply to this post

paul377172

Thanks for that, that seems to have got it working when I select the price column as unique in ecart object. The only thing I cant do is to distinguish between say 1 year (Mag) and 2 Year (Mag) in the cart, so although they are listed separately by Mag subscription period they just appear as the Mag name.

Before I got around this by adding separate price values to ecart object and then binding them to the respective fields and then using the show region utility to display the right ones, but I couldnt get beyond the checkoit stage. it kept failing when clicking on paypal express checkout button.

So is there a way I can do this thanks.

Sign in to reply to this post

Jason ByrnesWebAssist

make sure that each magazine has a unique ID.

if each has a unique ID, they will be added as separate line items to the cart

Sign in to reply to this post

paul377172

They are coming up in seperate lines but the titles are the same for different subscription prices. Maybe its the way I have set up the table structure? Might it be best to put the Subscription prices put into a separate table and add MagazineID as a foreign key?

Sign in to reply to this post

Ray BorduinWebAssist

This is because you are using the same recordset to populate the title in the cart.

You could append information in the bindings for each add to cart button in order to differentiate. For instance instead of using the same value in both add to cart server behaviors:

<?php echo($row_Recordset1['Magazine_Title']); ?>

you could use:

<?php echo($row_Recordset1['Magazine_Title']); ?> 1 yr

and

<?php echo($row_Recordset1['Magazine_Title']); ?> 2 yr

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