Jump to content

Displaying different cart button based on shop ID


Recommended Posts

Hi,

I need to modify my product.tpl on a multistore installation so that it displays a different button based on the shop ID.
I want :

-ADD TO CART button on shop 1

-ASK FOR A QUOTE on shop 2

 

I've tried playing around with $(shop_name); global context variable (ID_SHOP) and other. But all my tests failed so far.
Any one have an idea on how to fix this please ?

 

 

Link to comment
Share on other sites

Hmm, I thought it was more obvious than that, took me a bit of tracking down, but as far as I can see, it should be accessible using $cart->id_shop, if there isn't a cart set up yet, it looks to be getting auto generated anyway, so that should in theory always be accessible

 

So would just need:

{if isset($cart->id_shop) && $cart->id_shop == 1}

{else}

{/if}

And so forth

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...