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

Adding an input form into shopping cart

Thread began 4/19/2010 3:10 pm by mrobben375515 | Last modified 5/03/2010 3:04 pm by Jason Byrnes | 1793 views | 13 replies |

mrobben375515

Adding an input form into shopping cart

We have a children's book site that we would like to allow buyers to customize one of the first pages of the book (possibly for an additional price) and allow them to say "Dear Tom" "Happy 5th Birthday!" "Love Grandma & Grandpa" or something like that. So we need 3 inputs spaces in the form, and we need it to submit that information along with which book they buy so that we can process their order. I'm not exactly sure how the best way to do this is. Should I put a form in the cart.php page and have it submit with the order. The other tricky thing is what if they buy several books for different people and each book goes to a different person. Then they need the insert form for each product. And it might need to add a few dollars to the price. Is this possible?

Sign in to reply to this post

Jason ByrnesWebAssist

first, you need to create a new column in the eCart object for each input field. you should set the unique attribute for each of them.


Then in the eCart Add to Cart button behavior, select each of these columns and set them to be Updateable From a Text Box.

This will add the needed input fields to the page.

Sign in to reply to this post

mrobben375515

can you be a little more specific. How do I create the columns and set the unique attribute? Do you mean create new <div> with id's or something? And is there a way that users can buy the books for normal price or check a box or something and customize for an additional cost that will be automatically added?

Sign in to reply to this post

Jason ByrnesWebAssist

you create the new column in the eCart object.


Go to Insert -> Webassist -> eCart -> eCart Object. From the list of eCart objects select the one for your store, then click the edit button. On the Columns tab, you can add the new columns.

Sign in to reply to this post

mrobben375515

So I followed the instructions on the cart.php and got this error when opening the site to any page...

Parse error: syntax error, unexpected ')' in /home/content/l/u/n/lunchpailbooks/html/WA_eCart/WA_Store_Cart_PHP.php on line 117

Am I supposed to do it on a different php page?

Sign in to reply to this post

Jason ByrnesWebAssist

can you post a copy of the WA_eCart/WA_Store_Cart_PHP.php so I can look at the code?

Sign in to reply to this post

mrobben375515

here it is..

Attached Files
WA_Store_Cart_PHP.zip
Sign in to reply to this post

Jason ByrnesWebAssist

looks like the trigers for the shipping rules got mangled.


change line 117:

php:
if (true && ()) {



to:

php:
if ($WAGLOBAL_Shipping_Enabled == 1 && (("USPS"=="USPS")&&(isset($_SESSION["WA_Store_Cart_USPS_Quote"]))&&(floatval($_SESSION["WA_Store_Cart_USPS_Quote"]) != 0))) {



Line 126:

php:
if (true && ()) {



to:

php:
if ($WAGLOBAL_Shipping_Enabled == 1 && (("FedEx"=="FedEx")&&(isset($_SESSION["WA_Store_Cart_FedEx_Quote"]))&&(floatval($_SESSION["WA_Store_Cart_FedEx_Quote"]) != 0))) {




and line 135:

php:
if (true && ()) {



to:

php:
if ($WAGLOBAL_Shipping_Enabled == 1 && (("UPS"=="UPS")&&(isset($_SESSION["WA_Store_Cart_UPS_Quote"]))&&(floatval($_SESSION["WA_Store_Cart_UPS_Quote"]) != 0))) {
Sign in to reply to this post

mrobben375515

Able to browse the site again, thanks for the help. Now when I try to add a product to the cart I get this error. The url is Products_Results.php. If you try to add a product to the cart you'll see the below error. I've attached the WA_Store_Cart_PHP.php page and again...


Warning: Missing argument 14 for WA_Store_Cart_Definition::AddToCart(), called in /home/content/l/u/n/lunchpailbooks/html/Products_Detail.php on line 187 and defined in /home/content/l/u/n/lunchpailbooks/html/WA_eCart/WA_Store_Cart_PHP.php on line 31

Warning: Missing argument 15 for WA_Store_Cart_Definition::AddToCart(), called in /home/content/l/u/n/lunchpailbooks/html/Products_Detail.php on line 187 and defined in /home/content/l/u/n/lunchpailbooks/html/WA_eCart/WA_Store_Cart_PHP.php on line 31

Warning: Missing argument 16 for WA_Store_Cart_Definition::AddToCart(), called in /home/content/l/u/n/lunchpailbooks/html/Products_Detail.php on line 187 and defined in /home/content/l/u/n/lunchpailbooks/html/WA_eCart/WA_Store_Cart_PHP.php on line 31

Warning: Cannot modify header information - headers already sent by (output started at /home/content/l/u/n/lunchpailbooks/html/WA_eCart/WA_Store_Cart_PHP.php:31) in /home/content/l/u/n/lunchpailbooks/html/Products_Detail.php on line 203

Attached Files
WA_Store_Cart_PHP.zip
Sign in to reply to this post

Jason ByrnesWebAssist

you need to update the add to cart button on the product detail page.

any time you add columns to the cart object, the add to cart button will need o be updated.

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