Our site www.viart.com site is operated by latest Viart Shop 5 with default Clear design
Topic Information
drvonshnickel (Guest)
drvonshnickel (Guest)
How can I have the small cart only be in the header section of the website? I want to not have it in the body but instead in the header.html file. I tried copying the code from block_cart.html but it doesn't execute the php script to actually change the "{CONTENT}" to its proper values.
Last modified: 21 Dec 2006 5:02 PM
 
Eugene (Guest)
Eugene (Guest)
Hi,
 
You have to copy HTML code from /templates/user/block_cart.html to some place in header.html. Then don't forget to include block_cart.php in header.php.
 
WBR
ViArt Support Team
 
Suddenhit3000 (Guest)
Suddenhit3000 (Guest)
but when you do so all it shows is the title of the block cmall cart and nothing moreShockWackoSearchingSad
 
ansuk
ansuk
I havent looked into yet but i expect that you would need to create a new containing Div class.
 
msquared
msquared
I also wanted to do this, I have tried everything within my capabilities and all I get is the Block Title "Your Basket"
 
Any further advise on how we can achieve this?
 
Thanks
 
DickS
DickS
I've been trying the same with adding language and currency blocks sitting next to each other horizontally above the shopping cart page.
 
So I created a table with three rows, filled the first with language block data and the third with currency block data.
 
After saving as custom block I only saw the headers, but nothing more.
 
I've asked Viart for help and it seems not so easy task :(
 
DickS
 
fracine
fracine
Hi,
 
I have put the small cart and the login form in my header but it's not yet perfect.
I still have a curious bugg when I click on "forgot password" (below the error message ) if anyone have an idea...
(Notice: Use of undefined constant EMPTY_CART_MSG - assumed 'EMPTY_CART_MSG' in E:\wamp\www\viart\blocks\block_cart.php on line 184,
 
How I have made :
I) The small cart
1) As Eugene said : "You have to copy HTML code from /templates/user/block_cart.html to some place in header.html."
 
2) Open your header.php and add these lines:
include_once("./blocks/block_cart.php");
small_cart('block_body');
 
3) open your block_cart.php, find this line :
$t->set_file("block_body", "block_cart.html");
and modify it like that
$t->set_file("block_body", "header.html");
 
II) The login form
1) You have to copy HTML code from /templates/user/block_login.html to some place in header.html."
 
2) Open your header.php and add this line:
login_form ('block_body');
 
3) open your block_login.php, find this line :
$t->set_file("block_body", "block_login.html");
and modify it like that
$t->set_file("block_body", "header.html");
 
If anyone find a solution about the error message, please share it.
Hope this can help.
Francois
 
arkid
arkid
Hi all
 
Ive got this working without the more complex editing of php files above. This is part of the html from my header.html file from my custom template folder.
 
 
<div id="cartelement">
<!-- begin empty_small_cart --><div id="cartcopy1">   {EMPTY_CART_MSG}</div>
<div id="cartcopy2"></div><!-- end empty_small_cart -->
<!-- begin small_cart -->
<div id="cartcopy1">Your Shopping Cart Contents:</div>
<div id="cartcopy2"> You have <b>{total_quantity}</b> item/s, for a total price of: {total_price} 
</div><!-- end small_cart -->
</div>
 
 
The header file is added to all my documents, and the above code works without a prob for me, with all keyword tags being replaced OK.
 
fracine
fracine
Hello Arkid,
 
I agree with you, it's more easier.
If I'm not mistaken, it is possible to make like that since versions 3.4.x.
 
Nevertheless, for my tests, the problem remains the same.
If you click on "forgot password " you have an error message.
 
Francois
 
WTP
WTP
I am kinda new to this. Does it matter where in the header.html file you add the code you are suggesting. Also if I wanted to put a phone number where customers can reach me just below the cart, is that possible?
 
TOCDCO
TOCDCO
WTP:
 
About adding your phone number below the cart, create a custom block in the cms. On the basket page, add that custom block below the cart box. That would add it to your page. Hope that helps
 
SajMalik
SajMalik
WTP - I have used block for information as Dan suggests - http://www.malikstores.co.uk//products.php?category_id=515 - right column.