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

Problems with checkout! HELP!

Thread began 3/16/2011 1:42 pm by scott351953 | Last modified 3/22/2011 10:05 am by Jason Byrnes | 2258 views | 12 replies |

scott351953

Problems with checkout! HELP!

We just moved our store over to Powerstore and are experiencing a few issues with checkout page (where there personal and payment info is input).

1.) When the user enters their information and clicks submit, the form just sits there if they forget to enter a field (or get it incorrect). I realize it turns the field red as you are filling it out... but this seems tricky for some users. Any way to add a pop up? Or bring the user up to the incorrect field using an anchor link?

2.) The client wants to add some text next to the CSV field (under the text field), what file is this in? One of the plugin folders?

I guess these are not big issues, but it would be great if we can change these things.

Thanks in advance!

Scott

Sign in to reply to this post

Jason ByrnesWebAssist

1) on the webassist/plugins/shoping_cart/checkout_form.php page, you could add the following at the top of the form to show an error:

php:
<?php

if (ValidatedField("confirm","confirm"))  {
    if ((
strpos((",".ValidatedField("confirm","confirm").","), "," "" ",") !== false || "" == ""))  {
        if (!(
false))  {
?>
            There are errors in the form submission
                    <?php //WAFV_Conditional confirm.php confirm(:)
        
}
    }
}
?>





2) the csv field is on that same page:
webassist/plugins/shoping_cart/checkout_form.php page

Sign in to reply to this post

scott351953

Thank you! I will give that a try!

Sign in to reply to this post

scott351953

Followup

1) I added the code in the head section and right above the form... It dose bring the user up... but not to the first wrong field (mine stops at the phone field). Any thoughts?

checkout.php

2.) Worked great! Must have missed this one.

Another question...

The ordering for the side menu and products is a little challenging because there is not control for this...

Whats the easiest way to order the side menu (Main and Sub categories)?
Whats the best way to order the products results?

Maybe add an order field to the table somewhere (I looked at the table and I am a little lost). If anyone has any ideas on how to do this it would be appreciated.

Sign in to reply to this post

scott351953

On the order side bar menu... I read a post that explained changing the Order By to CategoryID. I tried this and it does not seem to work? If there is an easier way, please let me know.

PS - Here is the code: (sidemenu.php)

<?php
function getCatAccordion($StartWith=0,$prevLevels=0) {
$retHTML = "";
$retScript = "";
mysql_select_db($GLOBALS['database_PowerStoreConnection'], $GLOBALS['PowerStoreConnection']);
$query_SubCategoryList = "SELECT * FROM ps4_categories WHERE CategoryParent = ".$StartWith . " ORDER BY CategoryID";
$SubCategoryList = mysql_query($query_SubCategoryList, $GLOBALS['PowerStoreConnection']) or die(mysql_error());
$totalRows_SubCategoryList = mysql_num_rows($SubCategoryList);
$row_SubCategoryList = mysql_fetch_assoc($SubCategoryList);
$totalRows_SubCategoryList = mysql_num_rows($SubCategoryList);
$first = ($StartWith==0 && $prevLevels==0);
$selected = -1;
if ($row_SubCategoryList) {
$retHTML .= '<div id="Accordion'.$row_SubCategoryList["CategoryID"].'" class="Accordion" tabindex="0">' . "\n";
$retScript .= 'var Accordion'.$row_SubCategoryList["CategoryID"].' = new Spry.Widget.Accordion("Accordion'.$row_SubCategoryList["CategoryID"].'", { useFixedPanelHeights: false, defaultPanel: [defalutPanel] });' . "\n";
$CatCount = 0;
while ($row_SubCategoryList) {
$suboptions = getCatAccordion($row_SubCategoryList["CategoryID"],(1 + $prevLevels));
$retScript .= $suboptions[1];
$retHTML .= ' <div class="AccordionPanel'.(($prevLevels==0)?" AccordionTop":"").'" >' . "\n";
$retHTML .= ' <div catcount="'.$CatCount.'" class="AccordionPanelTab' . (($first)?" AccordionPanelFirst":""). '" onclick="doHighlighlight(this);updateContant(\'products_results_xml.php?Search=1&ProductCategoryID[]='.$row_SubCategoryList["CategoryID"].'\')" style="padding-left:'.(10+($prevLevels*5)).'px;">'.$row_SubCategoryList["CategoryName"].'</div>' . "\n";
$linkTo = 'products_results.php?Search=1&ProductCategoryID[]='.$row_SubCategoryList["CategoryID"];
$viewingPage = (basename($_SERVER['PHP_SELF'])."?".$_SERVER['QUERY_STRING']);
if (strtolower($viewingPage) == strtolower($linkTo) || $suboptions[3] >= 0) {
$selected = $CatCount;
}
if ($suboptions[0]!="") {
$retHTML .= ' <div class="AccordionPanelContent" >' . "\n";
$retHTML .= $suboptions[0];
$retHTML .= ' </div>' . "\n";
}
$retHTML .= ' </div>' . "\n";
$first = false;
$totalRows_SubCategoryList--;
$last = ($totalRows_SubCategoryList < 1);
$row_SubCategoryList = mysql_fetch_assoc($SubCategoryList);
$CatCount++;
}
$retHTML .= '</div>' . "\n";
}
$retScript = str_replace("[defalutPanel]",$selected,$retScript);
return array($retHTML,$retScript,$totalRows_SubCategoryList,$selected);
}
$Accordion = getCatAccordion();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="../../../SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
<script src="../../../SpryAssets/SpryAccordion.js" type="text/javascript"></script>
<script type="text/javascript" src="sidemenu.js"></script>
<link rel="stylesheet" type="text/css" href="sidemenu.css">
</head>
<body>
<?php echo($Accordion[0]); ?>
<script type="text/javascript">
<!--
<?php
echo($Accordion[1]);
?>
//-->
</script>
</body>
</html>

Sign in to reply to this post

Jason ByrnesWebAssist

1) The code i gave was not intended to go to the first wrong field, server validations does not support that. it was intended to show a warning at the top of the form.


2) there are 2 files that control the side menu:
webassist/plugins/side_menu/sidemenu.php

and
webassist/plugins/side_menu/nested_accordion/sidemenu.php


you will need to change the ORDER BY clause in both of them.

Sign in to reply to this post

scott351953

I was able to get the menu to order properly! Too bad on the validation... it would be nice to add a popup though. Thanks for all your help... Great Product!

Sign in to reply to this post

scott351953

New Issues

I would like to add an SSL certificate to the checkout page (). Is there an easy way to do this? Not sure where to edit the code.

Also, we want to add a few payment seals/badges to the sidebar. Same this with the code... Not sure where I can add this in. (simple html for adding the security seals for authorize.net and our SSL certificate.

Thanks,

Scott

Sign in to reply to this post

Jason ByrnesWebAssist

add the following code at line 1 of any page you want to force SSL access on:

php:
<?php

if (!isset($_SERVER['HTTPS']) || (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'on')) { 
    
header("Location: https://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']);
    die();
}
?>




if you want the seals to appear bellow the side menu, add them to the webassist/plugins/side_menu/sidemenu.php page.

Sign in to reply to this post

scott351953

SSL Problem

Added the code above:

checkout.php

I get this error:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/77/6890977/html/checkout.php:7) in /home/content/77/6890977/html/WA_SecurityAssist/Helper_PHP.php on line 5

?

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