how to add "Cart content" block in tpl file

How can i call/add “Cart content” block in .tpl file ? is there a way to call any block's content directly ?


{include file=“blocks/cart_content.tpl”}

ohh thanks buddy, i was thinking it would be very hard to call any block’s content in cs-cart, but its so simple, core php type just include. :D

Note that the cart is special so it's easy. The cart is maintained in the session so it's contents are already there. But other blocks have to be 'filled' appropriately by the controller or block_manager before they will have any valid content.

can you please explain in detail with specific block's example ? as I am new to cs-cart and really want to know how cs-cart handles all this.

Sorry, way too much info to reveal in a forum thread.

There are hundreds of threads here on using hooks to modify content.

Suggest you do a search for posts by me and you'll see a series of about 6 tutorials about using PHP hooks which is really a tutorial on how to create an addon, add content, etc. I think it was the developers forum where those posts were made.

You can find many other posts about blocks and block configuration too.

Things have changed some in V3, but essentially, things are done the same with minor differences.

ok thanks, i will check that.

can we call an html block directly in .tpl file ?

A block is simply a template that expects certain template data (variables). So you might need to create a controller that assigns the appropriate variables expected by the block (template).