close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Add the Item # to Products_Detail.php page

Thread began 2/04/2010 3:26 pm by paul.urgero235355 | Last modified 9/22/2010 11:58 am by bchilds137315 | 1546 views | 16 replies |

Paul

Add the Item # to Products_Detail.php page

I'm using the options ability in PS2. I would like to have the Item number show up on the Products_Detail.php page, so the customers can see which item it is.

When I open the page in Dreamweaver cs4, I want to put it above the Product Price. I am assuming at this point, that it is just a matter of dragging the ProductID field from the Recordset WADAProducts in the Bindings...but when I try to expand the Binding, I get the following error:

MySQL Error#: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2

First of all, if I didn't get the error, am I correct in what I'm doing?
Secondly, what does this error mean?

Thanks!

Sign in to reply to this post

Jimmy Wu

Yes, that is the way you would add the ID to the page. The error is occuring because the SQL is too complicated for Dreamweaver to interpret correctly.

To display the product id, the correct syntax would be to use:
<?php echo $row_WADAProducts['ProductID']; ?>

Sign in to reply to this post

Paul

Jimmy,

I realized that I meant the ProductSKU. So I changed it and it worked...the only problem, is when I change an option, it is supposed to show a different SKU. It is not.

When I created the default product, I added a few options called: size. When I updated the item with the different option, I changed the SKU. When I look at an item on the live site, and change an option, the original SKU is showing, not the updated one.

1. Can I do this?
2. If so, what do I need to change in order to have the correct SKU show?

Thanks again.

Paul

Sign in to reply to this post

Jimmy Wu

To get this to show up correctly you will have to set the onchange in the select box to change the sku display based on the option that is chosen.

Sign in to reply to this post

Paul

Jimmy,

Can you be a little more specific?

Here is the code for the select box:

<select name="ProductOptions_<?php echo($row_ProductOptions['OptionGroupID']); ?>" id="ProductOptions_<?php echo($row_ProductOptions['OptionGroupID']); ?>" onchange="updateProduct(this.options[this.selectedIndex].value)" style="width:260px;">

I see the onchange, but not sure where to change the code.

Thanks

Sign in to reply to this post

Paul

Can anyone help me with this?

Thanks

Sign in to reply to this post

Jimmy Wu

Since this isn't a supported feature, I can point you in the correct direction, but you'll have to code it on your own.

You will have to create a function that will set the display of the value. Then you would call this function in the onchange of the select box. The function will need to have the value of the selected option to be passed in to the function as a parameter and then it will use a recordset to find the sku value of the option. After that it will set the display to the correct sku.

Sign in to reply to this post

Paul

Jimmy,

I put this in the cart page:
Item #:&nbsp;<?php echo $row_WADAProducts['ProductSKU']; ?>

so that it will show the Item number, and it works. But when therer are more than 1 item in the cart, they all show the SKU for the last item entered. Is this also a custom feature? Why aren't they showing the correct item #?

Thanks

Sign in to reply to this post

Paul

Any help Jimmy?
Does anyone have this issue, and if so, what did you do? Just leave out the item #?

Sign in to reply to this post

Paul

Jimmy,

Correct me if I'm wrong in my thinking. If the cart page shows multiple items on it, then it has to be some sort of repeat region, correct? If so, then when I add the SKU field to it:
Item #:&nbsp;<?php echo $row_WADAProducts['ProductSKU']; ?>
why doesn't it repeat with the correct SKU?

All I want is the Item # to show up below the Description for every item in the cart.

Thanks

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