Quantcast
Channel: Help - FoxyCart Forum
Viewing all articles
Browse latest Browse all 2369

What is the correct twig context for the full page cart?

$
0
0
I am trying to output something when the context is the full page cart ONLY. Basically I want to add an asterisk to the Order Total (what I have relabeled on the cart as Order Subtotal) which refers to a note under the cart which makes clear that a shipping cost will be added at checkout (our cart does not add or calculate shipping on the cart itself but only at checkout - at least for now though that may change).

As a step in that direction I have added the following snippet of twigglized (is that a word? LOL) code into the cart include template.


{% if context == 'cart' %}
{% if cart_is_fullpage %}
<td><p>Hi there</p></td>
{% endif %}
{% endif %}


I am simply adding an extra column after the Order Total column and outputting "Hi there".

But...it's not working.

I have tried just the cart context (without the cart_is_fullpage if / endif) and just the cart_is_fullpage if /endif but in all cases nothing is output in line with the code above.

When I cache the cart include template through the FoxyCart admin interface it shows up in the template code and it caches just fine without any errors but nothing appears on the screen to the affect of "Hi there".

That phrase doesn't even appear in the code of the resultant cart page.

So my twig must be off somehow.

How do I output "Hi there" (as an example) ONLY when the cart is displayed and ONLY when it is a full page cart?

Any input on a solution to this would be a appreciated.

I am whispering a URL through which you can view the cart where the above code is found in the cart include template.

Thanks.

Carlos

Viewing all articles
Browse latest Browse all 2369

Trending Articles