kajos Posted February 11, 2020 Share Posted February 11, 2020 Hi all, I have a shop where guest can see the products and customers can see the price also on base of customergroup. I want for de quest-user add some additional text. Can you help me with this? John Link to comment Share on other sites More sharing options...
MarlexLadag Posted February 12, 2020 Share Posted February 12, 2020 Yes I think you can just add it with a controller. We can create a module also for that function. Link to comment Share on other sites More sharing options...
kajos Posted February 13, 2020 Author Share Posted February 13, 2020 Thanks for your reply, can you explain a little bit how it can be done by a controller? John Link to comment Share on other sites More sharing options...
MarlexLadag Posted February 13, 2020 Share Posted February 13, 2020 (edited) 36 minutes ago, kajos said: Thanks for your reply, can you explain a little bit how it can be done by a controller? John If you want to do it in the controller, just look for the init, get the current user group if guest or customer and then if its guest pass the additional text or variable through smarty assign function. Your controller will pass this variables to the corresponding template. Look for it in the themes, probably in the catalog then put it somewhere in the template. Edited February 13, 2020 by ML Software Services (see edit history) Link to comment Share on other sites More sharing options...
kajos Posted February 13, 2020 Author Share Posted February 13, 2020 Thank you I'll try it this weekend. Link to comment Share on other sites More sharing options...
kajos Posted February 16, 2020 Author Share Posted February 16, 2020 My solution is as folow: in themes\MyTheme\templates\catalog\_partials\product-prices.tpl i add the following code at the end of the file before {/if} {else} <div> <h6 class="h6">Retailer: <a href="https://www.mydomain.nl/mijn-account">u kunt hier registeren of inloggen om de prijzen te zien.</a><br></h6> <h6 class="h6">particulier: <a href={str_replace("mydomain","customerdomain",$product.url)} target="_blank">u kunt dit artikel bestellen op www.customerdomain.nl</a><br><br></h6> </div> Thnxs for the advise @ML Software Services Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now