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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Only can go forward if a certain item is selected?

Thread began 1/04/2010 5:25 pm by Randy195596 | Last modified 1/14/2010 6:32 pm by Eric Mittman | 1081 views | 7 replies |

Randy195596

Only can go forward if a certain item is selected?

Hello I am working on a site that you can be a professional or a student, if you are a professional you need to purchase a local membership also but if you are a student you dont need to purchase one. But I have had professionals that have been selecting student so that they skip local membership. How can I put a code in that only someone who selected student in the first part can select student in the second part.

First is an add to cart button, then they use a drop down to determine where to go but if they select student then they go right to the checkout page. Here is the drop down coding


<select name="selecter" class="text" id="selecter"
onChange="if(this.selectedIndex>0)document.location.href=this.options[this.selectedIndex].value">
<option value="" selected>Select Local Membership</option>
<option value="../forms/-tlanta.asp">Atlanta - Atlanta, Georgia [and surrounding area]</option>
<option value="../forms/-A.asp">B - Birmingham, Alabama [and surrounding area]</option>
<option value="../forms/-MA.asp">Bos - Boston, Massachusetts [and surrounding area]</option>
<option value="../forms/-OMA.asp">DC - Washington, DC [and surrounding area]</option>
<option value="../forms/-A.asp">H - Houston, Texas [and surrounding area]</option>
<option value="../forms/-MA.asp">i - Illinois Chapter [and surrounding area]</option>
<option value="../forms/-OMA.asp">Los Angeles, California [and surrounding area]</option>
<option value="../forms/-ORLANDO.asp">ORLANDO - Orlando, Florida [and surrounding area]</option>
<option value="../forms/-Phila.asp">Phila - Philadelphia, Pennsylvania [and surrounding area]</option>
<option value="../forms/-SF.asp">SF - San Francisco, California [and surrounding area]</option>
<option value="../forms/-NY.asp">NY - New York [and surrounding area]</option>
<option value="../forms/-NW.asp">NW - Pacific Northwest [and surrounding area]</option>
<option value="../forms/-detroit.asp">Detroit - Detroit, Michigan [and surrounding area]</option>
<option value="../forms/-STL.asp">STL - St. Louis, Missouri [and surrounding area]</option>
<option value="../forms/-regions.asp">Can&rsquo;t Find My Chapter</option>
<option value="../forms/member2.asp">Student Chapter</option>
</select>

maybe there is something i can put on the checkout page that checks the names or something, please let me know.

Thanks,
Randy

Sign in to reply to this post

Eric Mittman

It would be possible to limit the student option but how you will do this depends on what you would like the user experience to be like. Will you have special registration codes for the students to use to register? This is the first step, you must determine what criteria you would like to use to determine if the user is a valid student or not.

Once you know how you would like to make this determination you can then proceed to implement the solution. Please describe how this should work from the perspective of the user or student and we will gladly help you with whatever we can.

Sign in to reply to this post

Randy195596

Hi Eric,
I would like to check the id of the item in the cart to see if it is the student national membership. ID for student membership is 0401130r. Any idea how i could do that.

Thanks,
Randy

Sign in to reply to this post

Eric Mittman

You could do something like this by checking on the id of the item that is in the cart.

If student memberships have one id versus another that is used for professional then you could do a custom check to see if it is the student membership that has been added to the cart by checking for the id like this:

php:
if($eCart1->InCart("123")){

//do something
}



or you can check if it is not in the cart like this:

php:
if(!($eCart1->InCart("123"))){

//do something else
}
Sign in to reply to this post

Randy195596

ok im using the asp coding, any ideas there?

Sign in to reply to this post

Eric Mittman

There is a similar function that you can use with asp but it depends what flavor you are using, here are examples in VBscript and JS:

VBscript

if WA_eCart_InCart(WA_eCart, "123") then

'do something

end if



JS

if(WA_eCart_InCart("123")){

// do something

}
Sign in to reply to this post

Randy195596

Thanks Eric I really appreciate it. This is what i did

<% if WA_eCart_InCart(WA_eCart1, "0401130r") then
response.redirect "member.asp"
%>

Thanks, I just couldn't figure out how to check the id.

Randy

Sign in to reply to this post

Eric Mittman

Thanks for posting back with your specific implementation, I'm sure that others will benefit from the example.

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