close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

quick cart questions

Thread began 12/22/2011 11:12 am by chuck429411 | Last modified 1/10/2012 9:27 am by chuck429411 | 2433 views | 20 replies |

chuck429411

quick cart questions

Hey Jason, even after following your instructions for setting up the quick cart buttons, none of them work correctly. The "clear cart" button doesn't clear. The "view cart" button doesn't redirect to cart.php. The "checkout" button doesn't redirect to checkout.php. Any idea as to what I am missing? These are the instructions I am trying to follow:

for the checkout button, you will need to edit the checkout button server behavior to point it to the checkout page. Go to the server behavios panel, and click on the checkout button server behavior to point it to the checkout page.

for the view cart button, you will need to edit the on click code to point to the cart page.

select the view cart button, then go to cosde view. th view cart button will have an onlick event:
onclick="MM_goToURL('plugins/parent','');"

add the name of your cart page:
onclick="MM_goToURL('plugins/parent','cart.php');"

The server behaviors panel only lets you select the whole form element that contains the 3 buttons and the text fields. If you could steer me in the right direction, that would help me out big time.

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

Jason ByrnesWebAssist

the page you have sent is the cart definition file.

The changes that need to be made for the quick cart buttons need to be made on the page that you have added the quick cart to, not in the cart definition.

Sign in to reply to this post

chuck429411

Sorry about that...

Sorry Jason. Here it is.

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

chuck429411

I got 1 out of 3 buttons working

Hey Jason, I figured out how to get the checkout button working. I needed to tell it to go to URL in the behaviors panel. I was looking in the server behaviors panel instead of the behaviors panel.

The view cart button still won't go to the cart.php page, but I am thinking that it will work when I go live. The clear cart button clears the product orders, but does not delete the shipping amount. I am using the "Button: eCart1_Clear_100 pressed" trigger. Attached (acrylics.php) is one of the pages that has a quick cart.

Also: do you have any idea why my "modify information" button on confirm.php sends me to checkout.php correctly, but all of the information has to be input again. What if the user only has to change one little typo? To quote another thread:

Originally Said By: Jason Byrnes
  on the checkout page select each form element.

on the properties panel, click the lightning bolt icon next to initial value.

From the Bindings panel, expand the Validated Entries collection, select the corresponding validated entry. When prompted for a default value, click the lightning bolt again, this time expand the session collection. select the eCartCheckoutForm_<element Name> session variable where <element Name> is the name of the form element you are binding.  



When I select the first name field for example, I click on the lightning bolt in the properties panel, expand the validated entries and select the corresponding validated entry, I am not prompted for a default value or the opportunity to click the lightning bolt again. I am trying to follow your instructions exactly, but I am not getting the same results.

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

Jason ByrnesWebAssist

to troubleshoot the view cart button, I would need to see the page in the browser, the view cart button uses a javascript on click behavior to redirect to the cart page, to troubleshoot why it is not working, I can only do that by visiting the page ion the browser.


for the shipping on clear cart, what shipping provider are you using? you could add code to the clear cart behavior to clear the session that contains the shipping quote, but i need to know the provider in order to tell you what session variable that would be.



For the modify button, bind the initial values for the form elements on the checkout page to use the corresponding session variables from the session collection.

Sign in to reply to this post

chuck429411

Checkout.php still not working...

This is in reference to the modify information button taking me back to a blank checkout.php page when I have already filled out all the fields.

Ray helped me out on a support ticket. He did the first 2 fields on the checkout.php page which is first name and last name. I emulated everything for the rest of the of the fields.

Select the field in design view, click the lightning bolt in the properties panel and select the corresponding session value from the dynamic data panel. This was the way Ray showed me in my ticket appointment. If you could also refer back to my previous post in this thread (where I quoted you from another thread), I tried that as well. I must be missing a step somewhere.

When I preview in the browser, I get:

<br /><b>Notice</b>: Undefined index: eCartCheckoutForm_firstname in <b>C:\xampp\htdocs\extreme\checkout.php</b> on line <b>266</b><br />

in the fields, instead of a blank field to input first name, last name, etc.

Any ideas as to what I have done wrong? Maybe my situation is different than the ones I am finding in the forums? Can you detail the steps one more time? After this I am going live. I have attached a screenshot.

Also: To answer your question from your previous reply, I am using UPS. I got the view cart button working.

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

Jason ByrnesWebAssist

those are notices saying that the sessions have not been set yet, they don't get set till the checkout posts to the confirm.

you can add the following code at line to turn error reporting off:

php:
<?php error_reporting(0); ?>



or use this code to leave it on, but suppress notices:

php:
<?php error_reporting(E_ALL E_NOTICE); ?>




to clear the UPS Shipping quote when the cart is cleared, change the clear cart code:

php:
<?php

// WA eCart Trigger Clear Cart
if (isset($_POST["eCart1_Clear_100_x"]))     {
  
$eCart1->ClearCart();
  
$Redirect_redirStr="";
  if (
$Redirect_redirStr != "")     {
    
$eCart1->redirStr $Redirect_redirStr;
  }
  
$eCart1->cartAction "ClearCart";
}
?>




to:

php:
<?php

// WA eCart Trigger Clear Cart
if (isset($_POST["eCart1_Clear_100_x"]))     {
  
$eCart1->ClearCart();
  
$Redirect_redirStr="";
  if (
$Redirect_redirStr != "")     {
    
$eCart1->redirStr $Redirect_redirStr;
  }
  
$eCart1->cartAction "ClearCart";
  if(isset(
$_SESSION["eCart1_UPS_Quote"])) unset($_SESSION["eCart1_UPS_Quote"]);
}
?>
Sign in to reply to this post

chuck429411

Hey Jason, I found the code on the pages that have quickcarts. Does that same code work for the cart.php page? The original cart.php clear cart code is different. Or does the cart.php page need that at all?

Also: If you go to 97.74.47.106/acrylics.php

Check out the errors that I am getting:

Warning: mysql_pconnect() [function.mysql-pconnect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/content/71/7629671/html/Connections/extreme_cart.php on line 9

Fatal error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/content/71/7629671/html/Connections/extreme_cart.php on line 9

Can you steer me in the right direction again? I have the db already in godaddy. I am guessing that I have to change the connection file? After doing that, will I no longer be able to test on localhost without changing it back?

Sign in to reply to this post

Jason ByrnesWebAssist

really, it's just a matter of adding this line to the clear cart code block:

php:
if(isset($_SESSION["eCart1_UPS_Quote"])) unset($_SESSION["eCart1_UPS_Quote"]);




post the code for the clear cart code block from the cart page, and i can update it for you.


as for the mySQL Error, yes, you need to update the database connection file to use the Live Server credentials.

after you have updated the connection file and uploaded it to the server and tested that the live connection works, open the Files panel (Window -> Files). In the Files panel, change the Local View select box to Remote View to view the files on the remote server. Right Click on the connection file and select Set Permissions clear the Write attribute for all three users to make it a read only file.


Now change the files view back to local view. you can update the connection file again on the local computer to connect to your testing server.

By setting the live version of the connection file to be read only, we prevent dreamweaver from being able to overwrite it with the connection file for the local testing server. This allows the local version of the site to connect to the testing servers database, and the live version of the site to connect to the live database.

Sign in to reply to this post

chuck429411

cart.php clear cart code

Here is the cart.php clear cart code that you requested:

<?php
// WA eCart Clear Cart
if (isset($_POST["eCart1_Clear_100"]) || isset($_POST["eCart1_Clear_100_x"])) {
$eCart1->ClearCart();
$Redirect_redirStr="";
if ($Redirect_redirStr != "") {
$eCart1->redirStr = $Redirect_redirStr;
}
$eCart1->cartAction = "ClearCart";
}
?>

Thank you again for all of your responses.

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