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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Detail Page Drop Down

Thread began 9/09/2009 9:52 pm by mike292921 | Last modified 11/19/2010 12:57 pm by Jason Byrnes | 4677 views | 15 replies |

mike292921

Detail Page Drop Down

I created a detail page and wanted to know what the easiest way to do a drop down menu if for an item that needs a size selected and then for an item that doesn't doesn't have a drop down.

Ya, I do need to learn more php if statements, etc. Is there a tool that can make this easier with webassist.

What needs to be done.

I hope that made sense.

Sign in to reply to this post

Jason ByrnesWebAssist

How are determining whether the item needs a size drop down or not? Figuring this out is the first step to creating the if statement.

For an example, I will assume you have a category column in your recordset that is being used, and if the category equalls "shirts" or "pants" you want to show a select list of sizes, all others, use a hidden form element set to "n/a"

php:
<?php if($row_RecordsetName['ColumnName'] == "shirts" || $row_RecordsetName['ColumnName'] == "pants") { ?>

<select name="size" id="size">
    <option value="s">Small</option>
    <option value="m">Medium</option>
    <option value="l">large</option>
    <option value="xl">X large</option>
    <option value="xxl">XX Large</option>
</select>
<?php } else { ?>
<input name="size" type="hidden" id="size" value="n/a" />
<?php ?>
Sign in to reply to this post

mike292921

Thank You Jason

I am going to try this, thank you so much for your help.
One more thing how can I push the size into the description part of Ecart

Sign in to reply to this post

Jason ByrnesWebAssist

To get the size into eCart, you will need to create a new column in the eCart object name d "Size" make sure to check the Unique attribute when creating the column.

In the add to cart button, select the Size column and set it to be updatable from a select list. eCart will then add the select list to your page for you.

use that select list in the if statement example from above, and create a hidden form element with the same name for the else statement.

on the bindings panel, expand the eCart section and select the Size column, In the description column of the cart display, place your cursor where you would like the sizer to display, then click the insert button near the bottom right of the display tab.

Sign in to reply to this post

mike292921

What if I am using Paypal Standard

kinda confused so when I create the add cart button I did that step, it creates an echo now how do I insert the If statement

Sign in to reply to this post

Jason ByrnesWebAssist

With PayPal Standard, on the confirm page, there a re a number of hidden form elements used to pass item information. A description is not passed, but the name is, you coul concatinate the size onto the name.


Change the name hidden form elemertn which will look like:

php:
<input type="hidden" name="item_name_<?php echo $eCart1_Index+1?>" id="item_name_<?php echo $eCart1_Index+1?>" value="<?php echo $eCart1->DisplayInfo("Name"); ?>" />



to:

php:
<input type="hidden" name="item_name_<?php echo $eCart1_Index+1?>" id="item_name_<?php echo $eCart1_Index+1?>" value="<?php echo $eCart1->DisplayInfo("Name"); ?>| Size: <?php echo $eCart1->DisplayInfo("Size"); ?>" />
Sign in to reply to this post

mike292921

Thanks again Jason

Thank you for your time.

This is too advanced for me. Will take me a while to learn.

But I appreciate everything.

Sign in to reply to this post

mike292921

Just one more question

Is there any way I can just add a post action to the description to add the size to keep simple. So it can have both the database value and a post value?

Sign in to reply to this post

Jason ByrnesWebAssist

That is actually going to be more difficult to code than what I suggested earlier.

Sign in to reply to this post

mike292921

Got to laugh

It was worth asking. I really have to start studying more. I am happy I made it this far.

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