close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Front-End Pages

Thread began 12/25/2011 2:36 pm by Php | Last modified 1/09/2012 3:14 am by Php | 4058 views | 22 replies |

Php

Front-End Pages

I have created the following pages using Data Assist: products insert, product update, product search, product results and product detail. I have also created a login page using security assist for the admin which gives access to the pages mentioned above.

Currently to see products, I have to search using product search page created by data assist which then shows me the product results page and furthemore will direct me to the products detail page if I want to view further information about the product.

What I want is when a customer goes to the shopping website and decides to click on "womens" button on the navigation, that button is linked to a page which shows only women clothes and then if they click on "mens" button it will be linked to a page where it only shows mens clothes.

An example website is www.avenue27.co.uk that I'm looking to create, if you click on shoes it will show a page with only shoes and if you on one of the shoes it will give you extra details of the shoes. How would I make this possible for my website. Also, how would I be able to create a search button on the front-end pages for the products that I have.

Thanks, Please can you be as detailed as possible. Merry Christmas !!!

Sign in to reply to this post

Ian S

In your database, your products will need to belong to a category (i.e. Shoes). This should just be a field, that contains a category value. The category value could either be linked to a categories table or contain the the category name itself.

When you call the 'shoes' page, the URL would need to pass the variables to tell the recordset on the categories page to filter only by shoes.

i.e.

products.php?cat=shoes

Then use DataAssist Search to filter the recordset, or write your own parameter based query to filter the recordset, based on the GET value of the cat parameter.

Cheers
Ian

Sign in to reply to this post

Php

Each product has been allocated to a category and this is linked to a categories table. What would I have to write in the parameter based query so it filters page by categories and how would this be a link as the example which you have provided.

Thanks

Sign in to reply to this post

Ian S

Hi,

I can't write the query for you as I don't know your database structure.

Effectively, it needs to have a join to join the two tables together and then you need to tell the query to filter by URL Parameter. You can do this in the standard dreamweaver recordset behaviour.

This might help...

WSc78c5058ca073340dcda9110b1f693f21-799ba.html

Cheers
Ian

Sign in to reply to this post

Php

I have created the record set using that dreamweaver link which you gave and it creates a php page. How can I use that php page so only womens clothes show. Because I have tried linking the php page to a button but the page shows up blank.

Thanks

Sign in to reply to this post

Ian S

If it shows up blank (as in a white screen) then there is an error in your PHP scripting.

If you have any blank spaces (i.e. carriage returns or spaces) between PHP tags in the header the page will go white and not load.

First thing to do is check for, and remove blank spaces.

Cheers
Ian

Sign in to reply to this post

Php

Hi,

I don't think there is an error in the php script because dreamweaver created the php script and when I was in the recordset option to create a new recordset there was a test button to see if the SQL worked and it did. There is also no error showing in the script.

Once the recordset is created and php page how should I make it work so it shows the Womens clothes only. How is the URL prarameter created?



Thanks

Sign in to reply to this post

Ian S

If you are getting a white screen there is an error with the PHP code.

If you are using a static link (rather than a form post) then you simply pass the information in a URL variable.

See my earlier post.... the link could look something like this

products.php?cat=shoes

Then your recordset needs to include a URL flitter parameter and the value of the parameter would be the name of your URL variable.

Sign in to reply to this post

Php

I am not using a form post for the php code. I am not understanding how this works. I have attached a file with the php code and an image which shows what I have done with the record set. I hope it helps you understand what I have done. All I want is a page where is shows only womens clothes. Can you please tell me in detail what I can do, I am getting frustrated. You have said that I need to create a URL variable, how do I do this?

Thanks

Attached Files
php code recordset.zip
Sign in to reply to this post

Ian S

Right, at the moment you your URL parameter has a name of 1

So your link, from the referrer page would be

products.php?1=shoes

You can change the name of the URL parameter, from 1, to something like 'cat' so it would read

products.php?cat=shoes

On the categories page (the page that lists your categories) the anchor text or image for that category needs to have that link above, containing the URL parameter and the value that it is passing. That is so the recordset filter you applied can pick up the information it needs to filter the data.

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