close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

How To Link Image To Detail Page

Thread began 2/18/2010 5:53 pm by online.order393818 | Last modified 12/12/2011 4:42 pm by bill3786 | 4022 views | 16 replies |

online.order393818

How To Link Image To Detail Page

I need instructions on how to link the image on my item page to the detail page using eCart4.5.2 so that when the image is clicked it will load the detail page, and populate the detail page with all the information contained in that recordset?

Thank,
Jw

Sign in to reply to this post

Jason ByrnesWebAssist

I assume the image is coming from a recordset and is displayed in a repeat region?

create a link around the image that will pass the item ID as query string variable using the ID column from the products recordset:


<a href="Products_Detail.php?ProductID=<?php echo($row_RecordsetName['IDColumn']); ?>"><image tag></a>



then on the products detail page, create a recordset that filters the IDCulumn on the ProductID querystring variable.

Sign in to reply to this post

online.order393818

How To Link Image To Detail Page

Thanks Jason,

That is correct the "image is coming from a recordset and is displayed in a repeat region."
When I click the add to cart button it load the detail page and the recordset information correctly. But when I click the image on the page it would only load a 'blank' detail page! Look at your example I can see that I didn't include the <image tag> in my code. Hopefully that will correct the problem.

Thanks

Sign in to reply to this post

online.order393818

How To Link Image To Detail Page

This post has been deleted.

Jason ByrnesWebAssist

your links are pasing the ID, but there is no name to the variable:
/detail.php?=3

should be:
/detail.php?ProdID=3



On the detail page, you then need to modify the recordset to filter the ID column on the passed ProdID querystring variable.

Sign in to reply to this post

online.order393818

How To Link Image To Detail Page

Jason,

I understand what you're saying. But whats puzzling to me is that the "gear.php & music.php" that queries the same recordset doesn't have that problem, and they all are pulling information from the same recordset!

In the eCart Getting Started PDF it instruct you on how to link the image placeholder to a recordset, but it doesn't instruct you on how to link any of the pages, ie music.php, gear.php to the detail page. I'll re-examine my detail page code to try and isolate the problem there.

Thank you

Sign in to reply to this post

Jason ByrnesWebAssist

look closely at the link on the gear.php page:
<a href="detail.php?ID=<?php echo $row_rsItems['ItemID']; ?>"><?php echo $row_rsItems['ItemName']; ?></a>


it is linking to the detail.php after.php, you can see a question mark followed by "ID" this is the name of the querystring variable being passed.

the value being passed is the ItemID from the recordset:

ID=<?php echo $row_rsItems['ItemID']; ?>


this creates the link as:
detail.php?ID=3



On the detail page, double click the recordset and inspect how it is created to filter the ItemID column on the ID querystring variable.


the issue on your page, is that you are not passing a name for the querystring variable
detail.php?=3


only a value.

If you are using the same details page from the eCaart sample files, you just need to modify your links to pass the value using the name ID:
detail.php?ID=3

Sign in to reply to this post

online.order393818

How To Link Image To Detail Page

Got it, and thanks again

Jw

Sign in to reply to this post

online.order393818

How To Link Image To Detail Page

Jason,

I've tried every possible combination adjusting the recordset filtering, and all of the combinations produce the same results...

The page flowers_Template.php is filtering correctly. It list all of the items in the recordset.
the detail.php is linked up from the flowers_Template.php page, but only to the first record in the recordset.
The add to cart button from the flowers_Template.php is working correctly by populating the cart page with the corresponding items when selected.

The attached file I have included the recordset configuration for both file.

Please take a look to see if you can identify my problem.

Thank you

Comment: Also I've notice that around the border of the images on the flower_Template.php page there it is red! And I've notice that this red border appears in DWCS4 after I enter the code to link up with the detail.php file! Just thought I'd share that with you in case you have some idea if that is a indication of something. I haven't notice that with other images that are just staticly linked!

Attached Files
YC Coded Files.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the problem is the recordset filter settings, you are filtering the ItemCatID column:

Recordset Details:

Name: rsItems
Connection: connProd
Tables: Items
Columns: All
Filter: ItemCatID =
URL Parameter ID
Sort: ItemID Ascending



Set it to filter the ItemID column instead:
Recordset Details:

Name: rsItems
Connection: connProd
Tables: Items
Columns: All
Filter: ItemID =
URL Parameter ID
Sort: ItemID Ascending

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