close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Connecting ADD to CART - to proper ITEM ID.

Thread began 10/15/2009 12:08 am by robert.stock192819 | Last modified 10/21/2009 10:36 pm by robert.stock192819 | 2972 views | 11 replies |

robert.stock192819

Connecting ADD to CART - to proper ITEM ID.

When I add buttons and link them back to my Recordset - Under the ITEMID - it automatically provides the lightening bolt link to my ITEM ID. It pulls the first item (item 1) from my database and adds this item to the cart.

The problem is that every button I add - ends up pulling (item 1) on every button - since the lightening bolt always links to the ITEM ID.

How do I make each ADD to CART button unique so the next button pulls item 2... and so on?

For now I built a custom recordset for EACH individual button - so it filters (item 2 for example) and then link this custom Recordset for each button. This works but cannot be the correct way to do this?

If you could tell me what I have done wrong it would be greatly appreciated.

Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

On the first screen of the add to cart button wizard, select the Lookup Item ID from Recordset option. Select the recordset to use and the ID column.

Sign in to reply to this post

robert.stock192819

Yes I select "Look up item ID from recordset"

I choose the recordset - which is a recordset that includes all records

Then I select the ID column...

But when you click FINISH - it simply grabs the first item from the database. It does not know to grab (item 11) for example

Sign in to reply to this post

Jason ByrnesWebAssist

Do you have a link to the page? I would like to take a look at the page in the browser to see what is going on.

also if you could send a copy of the PHP page in a zip file so I can take a look at the code, that would be helpful.

Sign in to reply to this post

robert.stock192819

Thanks

Here is a link

Store.php

This will take you to my "test" order page - and basically what I am asking probably is fairly simple - I want each button to pick a different ITEMID than the previous button. Right now it pulls the first item from the database.

Do I have to have a recordset for EACH button - or is there a way for me to have each button broadcast the ITEMID?

Sorry pretty new at this. Also could you please tell me where I would attach or mail the files to you if needed?

Sign in to reply to this post

Jason ByrnesWebAssist

In the source code for the page, I can see that the item id does not appear to be coming from the database:
for item 1:
<input type="hidden" name="eCartFinal_1_ID_Add" value="0" >

for Item 2:
<input type="hidden" name="eCartFinal_2_ID_Add" value="0" >



I'll need to look at the php code on the page to determine what is wrong.


Please compress the "Store.php" file into a zip archive. When replying, scroll do the reply to topic page and click the manage attachments button. there will be a place for you to upload you zip file and attach it to your reply.

Sign in to reply to this post

robert.stock192819

Thanks very much -

What I did was go into the source code and edited the code for each button - I changed it so it would be:

<input type="hidden" name="eCartFinal_1_ID_Add" value="1" >
<input type="hidden" name="eCartFinal_1_ID_Add" value="2" >
<input type="hidden" name="eCartFinal_1_ID_Add" value="3" > etc....

I just did not see where I was to add the value number - as it did not mention this is the tutorial - it just had me add the button but did not mention to go and enter the "value" number for each button.

So I may not need to send you the PHP file - unless you still think I am missing something - but it seems to work now - and even pulls the correct picture for each object as well. I am slowly learning _ I think.

Bob Stock

Sign in to reply to this post

Jason ByrnesWebAssist

If you have to enter the ID number manually, something is not right.

The ID should be automatically bound to the ID column from the recordset.



Double click the add to cart server behavior. On the bindings panel, is the ID cart column bound to the ID Recordset column?

Sign in to reply to this post

robert.stock192819

Jason,

Here is the link to my store page: Scan_Store.php

And I will attach the "Scan_Store.php" file as well. Currently I still have to manually enter the number for the database....

So what is it supposed to do? Is it supposed to grab the next number in the database - each time I add a new "add to cart" button. and then grab item 1..2..3...4., etc.. automatically?

Let me know what you see - as I followed the tutorial exactly as it was printed.

Thanks

Bob

Attached Files
Scan_Store.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

There should not be a separate add to cart button form for each product.


The add to cart button should be in a repeat region, and the value for the hjidden form element should come from the recordset.


<input type="hidden" name="eCartFinal_1_ID_Add" value="<?php echo $row_eCart_Recordset['PriceListID']; ?>">

Sign in to reply to this post
loading

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