Jump to content

Prices across shops - multishop


djbasspower

Recommended Posts

Hello! I need some help, a I'm not that good with programming...

 

I have two shops: a b2b (shop id 2) and a presentation site (shop id 1). Each store has different prices.

 

I want to display in product.tpl of b2b theme both prices (from shop 1 as well).

 

The code for displaying the price for shop2 is:

 

<span id="our_price_display" {if $enable_google_rich_snippets}itemprop="price"{/if} content="{$productPrice}">{convertPrice price=$productPrice|floatval}</span>

 

How can I display the price from shop1?

 

Thanks in advance!

Link to comment
Share on other sites

The short answer is that you can't. You need to edit the productController, and assign a separate variable by grabbing a new price.
The problem is that you need to pass in another context, or it will use the same shop id. Have a look at

Product::getPriceStatic and see the parameters, change the context's shop id to the one you need and try, it might work as PriceCalculation runs with id_shop as first parameter, retrieved from that context var

Link to comment
Share on other sites

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