close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

show if

Thread began 5/18/2016 10:11 pm by Jamie | Last modified 5/20/2016 11:53 am by Ray Borduin | 2609 views | 8 replies |

Jamie

show if

Hey Ray

On the attached checkout page I am trying to figure out how to show a form input based on specific ProductID's (eg 3, 4, 10 etc) that are equal to a specific value in the ProductNameID column (eg '1')

How would I achieve that please?

Cheers

Jamie

Sign in to reply to this post

Ray BorduinWebAssist

Are you talking about in the cart? So if any number of rows in the cart have an ID and NameID of a certain value? Are those both stored in the cart?

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

yes on the cart. really all it needs to check is if the product in the cart has a ProductNameID of 1 it then shoes the input area on the form.

Storing to cart, is that adding a column to the ecart object?

Sign in to reply to this post

Ray BorduinWebAssist

Yes, add a column to the cart to store that value and then you should be able to check it with an IF statement. Is the field shown for each row in the cart or once at the end if any cart item has that ProductNameID?

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

OK, have got the value in ProductNamesID passing now so all I need to do is create a show if based on if the value is '1' across all items in the cart....

Sign in to reply to this post

Ray BorduinWebAssist

OK, so only if ALL the cart rows have that value, or if ONE of the rows has that value?

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

Only if one of the rows has that value

Sign in to reply to this post

Ray BorduinWebAssist

if ($iDayCart->ConditionalTotal("Quantity", "ProductNamesID", "1") > 0) {

}

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

You, sir, are a legend

Thanks and have a great weekend

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