close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Convert view cart to a quick cart using ecart

Thread began 2/19/2010 11:03 am by jenkolaka19379118 | Last modified 2/24/2010 1:09 pm by Eric Mittman | 7668 views | 5 replies |

jenkolaka19379118

Convert view cart to a quick cart using ecart

Hi,

I have just purchased powerstore 3, but I am struggling to understand what files I should customise.

I first want to customise the div in the top right section (div id="links") that contains the Login | Register | view cart links.

I would like to replace view cart with a quick cart with a little image of a cart that displays the quantity and total price in cart. Which file do I edit? and how do I safely delete the current view cart link and replace it without damaging my php code?

I would like to move Login | Register to a different part of the page. Which file do I edit and what code do I move in order not to damage the code.

I think I would need to do this in the main template in order for it to display on all pages but I am not to sure.


  <div class="links">
<?php
$WA_localRoot = "".$WAGLOBAL_localRoot."";
$WA_remoteRoot = "".$WAGLOBAL_remoteRoot."";
$WA_curURL = strtolower((isset($_SERVER["PHP_SELF"]))?$_SERVER["PHP_SELF"]:"");
$assumedRoot = $WA_remoteRoot;
if ((strpos($WA_curURL,strtolower($WA_localRoot)) !== false && strpos($WA_curURL,strtolower($WA_localRoot)) == 0) && (strlen($WA_localRoot) >= strlen($WA_remoteRoot) || strpos($WA_curURL,strtolower($WA_localRoot)) === 0)) {
$assumedRoot = $WA_localRoot;
}
?>
<?php if(isset($_SESSION["UserID"])) { ?>
<a href="<?php echo($assumedRoot); ?>users_Profile.php">My Profile</a>
<a href="<?php echo($assumedRoot); ?>users_LogOut.php">Log out</a>
<?php } else { ?>
<a href="<?php echo($assumedRoot); ?>users_LogIn.php">Login</a>
<a href="<?php echo($assumedRoot); ?>users_Registration.php">Register</a>
<?php } ?>
<?php if(isset($_SESSION["WA_Store_Cart_Items"]) && $_SESSION["WA_Store_Cart_Items"] != "") { ?>
<a href="<?php echo($assumedRoot); ?>cart.php">View Cart</a>
<?php } ?>
</div>  



I am not sure what the first block of php code relates to. If I move the Login and Register blocks of php code to another div will I have to move the first block of code with it? If so will this effect the View Cart link php code.

Sign in to reply to this post

jenkolaka19379118

I have just had a look at the ecart 4 quick cart and it does not appear to have what I was looking for. I have posted an image of exactly what I need.
I need my quick cart to be in the right hand section by itself ideally within the default powerstore div, <div id="links">. Then I would like to remove Login Register from the <div id="links"> and place it elswhere in the header div (see attached image).

I am ok in coding the css for this, I am just unsure on what php code to move/add/change and what files to edit as I would like my quick cart to display on every page?

If any could help at all with any of these issues it would be greatly appreciated.

Sign in to reply to this post

Eric Mittman

You should think of this as a regular html edit. You should get it the display looking the way you want it first, then you can add in any links and the code to show the items and total.

You can change the register to be the MyAccount link and get rid of the others. Then craft your cart display the way you would like it. Where you would like to see the number of items in the cart or the total you will need to use the php cart code for this. Here is the code that you will use to display the number of items in the cart:

php:
<?php echo $WA_Store_Cart->TotalColumn("Quantity"); ?>



For the total of the cart use this code:

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



For the view cart and the checkout you should just add in links to these pages, the links would look like this:

<a href="cart.php">view cart</a>
<a href="checkout.php">checkout</a>

If you just use the php code for the carts number of items and total the rest is just html and css. This code should work on any page, it just needs the eCart include at the top of the page to work.

You will need to make this update on your Templates > Main.dwt.php and on the index page as well.

Sign in to reply to this post

Jenny I

Thanks Eric,

I will I will try that now, and let you know how I get on

Sign in to reply to this post

Jenny I

Thanks so much Eric,

That has done the trick :)

Sign in to reply to this post

Eric Mittman

Nice, it is always good to hear back when things work as they should.

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