close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Displaying a description depending on drop down choices by customer...

Thread began 1/22/2015 7:13 am by Nathon Jones Web Design | Last modified 1/22/2015 12:48 pm by Jason Byrnes | 832 views | 4 replies |

Nathon Jones Web Design

Displaying a description depending on drop down choices by customer...

On our product page Ray coded, in a Premier Support incident, some AJAX (I think) that changes the price and the product code depending on the selection made by the customer in the available drop-down menus.

Here's the page:
http://www.ledwarehouseuk.com/LED-Lights-Bulbs.php?lbid=675

Just underneath the title is a small description which is taken from the "LEDmetadesc" field in our product database. This description only shows the description for the parent product.

How easy would it be to have this change to display the corresponding "LEDmetadesc" depending on the selections made by the customer, just like the product code and prices changes do?

I've provided FTP details below. Thank you.
NJ

Sign in to reply to this post

Nathon Jones Web Design

FTP details below...

Thank you.
NJ

Sign in to reply to this post

Jason ByrnesWebAssist

in the price lookup.php file, i added the meta description column to the return columns as the last item:

<?php echo($row_rsAddToCartLookup['LEDprice']); ?>:<?php echo($row_rsAddToCartLookup['LEDproductcode']); ?>:<?php echo($row_rsAddToCartLookup['RemainingInventory']); ?>:<?php echo($row_rsAddToCartLookup['LEDmetadesc']); ?>




On the LED-Lights-Bulbs.php page, i added an ID to p tag for the meta description:

<p id="LEDmetadesc"><?php echo $row_rsPROD['LEDmetadesc']; ?></p>



and edited the updatePriceDisplay() function to set it from the ajax return:

if(priceInfo[3] != '') {
document.getElementById("LEDmetadesc").innerHTML = priceInfo[3];
}




It looks all the products are set with the same meta description at this time though.

Sign in to reply to this post

Nathon Jones Web Design

Superb stuff. Thank you Jason.

Will it matter if there is HTML in the content of the LEDmetadesc field?

Sign in to reply to this post

Jason ByrnesWebAssist

I dont think that should matter unless you are using it in a description meta tag also, which judging buy the name of the column, LEDmetadesc, it sounds like you are.

it is not valid markup to have HTML in meta tags.

on that subject, the title for that page:
<title><span class=”red”> <strong> Order now for 22nd January dispatch</strong></span></title>

has HTML embedded which is not valid markup.

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