close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Quick cart framework template

Thread began 7/02/2015 12:01 am by CraigR | Last modified 7/03/2015 11:03 am by Ray Borduin | 2086 views | 4 replies |

CraigRBeta Tester

Quick cart framework template

I have a site which uses the framework template.

I have added a quickcart to the template so that if the cart has any content it is displayed in the page header.

This doesn't produce any errors, but does not show accurate cart content/value until i refresh the page.

I tried adding the following line to my template and to my plugin page.

php:
<?php echo WA_eCart_DisplayMoney($schoolshopcart$schoolshopcart->GrandTotal()); ?>



in the header (from the template), i get the value before the update, and in the body (plugin) I get the accurate value

pressing f5, the values will match

The same thing happens after checkout, the checkout success page will clear the cart and reset the session values, but the header will still display the cart content until i refresh the page.

Sign in to reply to this post

Ray BorduinWebAssist

Make sure the Theme code on top of the page is below any cart inserts or updates.

Sign in to reply to this post
Did this help? Tips are appreciated...

CraigRBeta Tester

Thanks Ray, it is already.

php:
<?php

//WA eCart Include
require_once("../WA_eCart/schoolshopcart_PHP.php");
?>
<?php
$schoolshopcart
->GetContent();
?>
<?php
// WA eCart View Cart
if (isset($_POST["schoolshopcart_View_QC"]) || isset($_POST["schoolshopcart_View_QC_x"]))     {
header("Location: /basket.php");
die();
}
?>
<?php
// WA eCart Clear Cart
if (isset($_POST["schoolshopcart_Clear_QC"]) || isset($_POST["schoolshopcart_Clear_QC_x"]))     {
  
$schoolshopcart->ClearCart();
  
$Redirect_redirStr="";
  if (
$Redirect_redirStr != "")     {
    
$schoolshopcart->redirStr $Redirect_redirStr;
  }
  
$schoolshopcart->cartAction "ClearCart";
}
?>
<?php
//WA eCart Redirect Check Out
if (isset($_POST["schoolshopcart_Checkout_QC"]) || isset($_POST["schoolshopcart_Checkout_QC_x"]))     {
  
$Redirect_redirStr="/checkout.php";
  if (
$Redirect_redirStr != "")     {
    if (isset(
$_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != "")     {
      if (
strpos($Redirect_redirStr"?") === false)     {
        
$Redirect_redirStr .= "?".$_SERVER['QUERY_STRING'];
      }
      else     {
        
$Redirect_redirStr .= "&".$_SERVER['QUERY_STRING'];
      }
    }

    
$schoolshopcart->redirStr $Redirect_redirStr;
  }
  
$schoolshopcart->cartAction "Checkout";
}
?>
<?php 
require_once('../webassist/framework/framework.php'); ?>
<?php 
require_once('../webassist/framework/library.php'); ?>
<?php
if("" == ""){
    
$WA_menu_1391325466263 = new WA_Include("../plugins/menu/menu.php");
    require(
$WA_menu_1391325466263->BaseName);
    
$WA_menu_1391325466263->Initialize(true);
}
?>
Sign in to reply to this post

Ray BorduinWebAssist

I'm talking about the page that refers to the template, not in the template. Make sure that the page that refers to the template theme has the theme code lower than the cart code on the actual page you are viewing and see the problem on.

Sign in to reply to this post
Did this help? Tips are appreciated...

CraigRBeta Tester

Thanks for clarifying that Ray.

I was still not getting the result I wanted, so instead of putting the quickcart code directly in the template, I created a separate quickcart page and used it as a plugin.

This gave me what I needed

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