brian! Posted June 2, 2018 Share Posted June 2, 2018 {if $product->pricing()->annual()} <li class="price 1yr">{$product->pricing()->annual()->yearlyPrice()|replace:'/mo':{lang key="store.upsell.monthly"}|replace:'/yr':{lang key="store.upsell.yearly"}}</li> {else} <li class="price 1yr na">-</li> {/if} {if $product->pricing()->biennial()} <li class="price 2yr">{$product->pricing()->biennial()->yearlyPrice()|replace:'/mo':{lang key="store.upsell.monthly"}|replace:'/yr':{lang key="store.upsell.yearly"}}</li> {else} <li class="price 2yr na">-</li> {/if} 1 Quote Link to comment Share on other sites More sharing options...
Tengri Posted June 2, 2018 Share Posted June 2, 2018 Just now, brian! said: {if $product->pricing()->annual()} <li class="price 1yr">{$product->pricing()->annual()->yearlyPrice()|replace:'/mo':{lang key="store.upsell.monthly"}|replace:'/yr':{lang key="store.upsell.yearly"}}</li> {else} <li class="price 1yr na">-</li> {/if} {if $product->pricing()->biennial()} <li class="price 2yr">{$product->pricing()->biennial()->yearlyPrice()|replace:'/mo':{lang key="store.upsell.monthly"}|replace:'/yr':{lang key="store.upsell.yearly"}}</li> {else} <li class="price 2yr na">-</li> {/if} Thank you very much. But this is SSL and have only yearly. No month. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 2, 2018 Share Posted June 2, 2018 1 minute ago, Tengri said: Thank you very much. But this is SSL and have only yearly. No month. it wouldn't matter - if there is no "/mo" in the string, then it will just be ignored and not cause an error... but you could use the code below if you are only concerned about years... {if $product->pricing()->annual()} <li class="price 1yr">{$product->pricing()->annual()->yearlyPrice()|replace:'/yr':{lang key="store.upsell.yearly"}}</li> {else} <li class="price 1yr na">-</li> {/if} {if $product->pricing()->biennial()} <li class="price 2yr">{$product->pricing()->biennial()->yearlyPrice()|replace:'/yr':{lang key="store.upsell.yearly"}}</li> {else} <li class="price 2yr na">-</li> {/if} 1 Quote Link to comment Share on other sites More sharing options...
Tengri Posted June 2, 2018 Share Posted June 2, 2018 Thank you very much @brian! And what about this? -> https://prnt.sc/jpvja8 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 2, 2018 Share Posted June 2, 2018 did you try modifying the hook at post #9 in this thread on the first page... 0 Quote Link to comment Share on other sites More sharing options...
Tengri Posted June 2, 2018 Share Posted June 2, 2018 (edited) I know you're tired of us. But really, I can not understand the hooks. There is an example of just the SpamExpert. And I do not know what to named hook when creating a file. And how to adapt it to SSL. Truly. I can not understand. Edited June 2, 2018 by Tengri 0 Quote Link to comment Share on other sites More sharing options...
Tengri Posted June 2, 2018 Share Posted June 2, 2018 I understand that the following code will be added to the hook. Then, of course, I have to add variables to the language. What is the name of this file? And the code I just below is correct? <?php # MarketConnect Upsell (Slightly) Multilingual Hook # Written by brian! add_hook('ClientAreaFooterOutput', 1, function() { $spamheadline1 = Lang::trans('store.upsell.headline.addsecuritytoyouremailandsaygoodbyetospam'); $spamtagline1 = Lang::trans('store.upsell.tagline.withnear100%filteringaccuracyandincreasedemailcontinuity'); $spamfeature1 = Lang::trans('store.upsell.feature.near100%filteringaccuracy'); $spamfeature2 = Lang::trans('store.upsell.feature.easysetupandconfiguration'); $spamfeature3 = Lang::trans('store.upsell.feature.increasedemailcontinuityredundancy'); $spamfeature4 = Lang::trans('store.upsell.feature.supportsupto1000emailboxes'); $spamfeature5 = Lang::trans('store.upsell.feature.learnmore'); $spamfeature6 = Lang::trans('store.upsell.feature.add'); $spamfeature7 = Lang::trans('store.upsell.feature.fromjust'); $spamfeature8 = Lang::trans('store.upsell.feature.mo'); $spamfeature9 = Lang::trans('store.upsell.feature.yr'); $spamfeature10 = Lang::trans('store.upsell.feature.automaticallyscanyourwebsiteformalwareandprotectonlinereputation'); $spamfeature11 = Lang::trans('store.upsell.feature.trythesitelockserviceforfree'); $spamfeature12 = Lang::trans('store.upsell.feature.dailymalwarescanning'); $spamfeature13 = Lang::trans('store.upsell.feature.dailyblacklistmonitoring'); $spamfeature14 = Lang::trans('store.upsell.feature.siteLockriskscore'); $spamfeature15 = Lang::trans('store.upsell.feature.sitelocktrustseal'); $spamfeature16 = Lang::trans('store.upsell.feature.protectyourwebsiteandboostyoursearchrankingswithansslcertificate'); $spamfeature17 = Lang::trans('store.upsell.feature.includedwithyoursslcertificate'); $spamfeature18 = Lang::trans('store.upsell.feature.dataprotectionupto256-bitencryption'); $spamfeature19 = Lang::trans('store.upsell.feature.unlimitedfreereissues'); $spamfeature20 = Lang::trans('store.upsell.feature.compatiblewithallmajorbrowsers'); $spamfeature21 = Lang::trans('store.upsell.feature.displayasecuritysealonyoursite'); $spamfeature22 = Lang::trans('store.upsell.feature.buildyourwebsitewitheaseusingthepowerfulweeblysitebuilder'); $spamfeature23 = Lang::trans('store.upsell.feature.weebly'spowerfuldraganddropwebsitebuilderandguidedsetupgetyoutothefinishlinefasternocodingneeded');<-- Error $spamfeature24 = Lang::trans('store.upsell.feature.rangeofstunningthemestochoosefrom'); $spamfeature25 = Lang::trans('store.upsell.feature.draganddropeditor'); return <<<EOF <script> var hashtable = {}; hashtable['Add Security to your Email and say goodbye to spam'] = '$spamheadline1'; hashtable['With near 100% filtering accuracy and increased email continuity'] = '$spamtagline1'; hashtable['Near 100% filtering accuracy'] = '$spamfeature1'; hashtable['Easy setup and configuration'] = '$spamfeature2'; hashtable['Increased email continuity & redundancy'] = '$spamfeature3'; hashtable['Supports up to 1000 email boxes'] = '$spamfeature4'; hashtable['Learn more...'] = '$spamfeature5'; hashtable['Add'] = '$spamfeature6'; hashtable['from just'] = '$spamfeature7'; hashtable['/mo'] = '$spamfeature8'; hashtable['/yr'] = '$spamfeature9'; hashtable['Automatically scan your website for malware and protect online reputation'] = '$spamfeature10'; hashtable['Try the SiteLock service for free'] = '$spamfeature11'; hashtable['Daily Malware Scanning'] = '$spamfeature12'; hashtable['Daily Blacklist Monitoring'] = '$spamfeature13'; hashtable['SiteLock Risk Score'] = '$spamfeature14'; hashtable['Sitelock Trust Seal'] = '$spamfeature15'; hashtable['Protect your website and boost your search rankings with an SSL certificate'] = '$spamfeature16'; hashtable['Included with your SSL certificate'] = '$spamfeature17'; hashtable['Data protection up to 256-bit encryption'] = '$spamfeature18'; hashtable['Unlimited free reissues'] = '$spamfeature19'; hashtable['Compatible with all major browsers'] = '$spamfeature20'; hashtable['Display a security seal on your site'] = '$spamfeature21'; hashtable['Build your website with ease using the Powerful Weebly Site Builder'] = '$spamfeature22'; hashtable['Weebly's powerful drag and drop website builder and guided set up get you to the finish line faster, no coding needed.'] = '$spamfeature23'; <--Error hashtable['Range of stunning themes to choose from'] = '$spamfeature24'; hashtable['Drag and drop editor'] = '$spamfeature25'; $(document).ready(function() { $('.promo-banner').each(function( index ) { var banner = $(this); $.each(hashtable, function( index, value ) { banner.html(banner.html().replace(index, value)); }); }); }); </script> EOF; }); 0 Quote Link to comment Share on other sites More sharing options...
Tengri Posted June 2, 2018 Share Posted June 2, 2018 Even though I still do not understand that this is upgrading or the customer panel? The code I mentioned above applies only to the banner on the client panel. This is due to my understanding of the code processing mechanism. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 2, 2018 Share Posted June 2, 2018 1 minute ago, Tengri said: I understand that the following code will be added to the hook. Then, of course, I have to add variables to the language. What is the name of this file? you create a new .php file in /includes/hooks, call it anything you like and paste the code in... 6 minutes ago, Tengri said: And the code I just below is correct? it's correct, but not complete.. I think it just includes weebly and spam products, you may need to expand it for SSL. 0 Quote Link to comment Share on other sites More sharing options...
Tengri Posted June 2, 2018 Share Posted June 2, 2018 I do not know how to add the rest. I can not understand the principle of the hooks. It seems to me that he takes everything from heaven. For example, I did something like this: $ssl26 = Lang::trans('store.upsell.feature.securemultiplewebsitesforless'); hashtable['Secure multiple websites for less'] = '$ssl26'; But, of course, nothing was taken. Guys, if you are ready-hooks and there's a variables language file, can you please send me? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 2, 2018 Share Posted June 2, 2018 3 hours ago, Tengri said: I do not know how to add the rest. I can not understand the principle of the hooks. It seems to me that he takes everything from heaven. using the hook method is the "official" WHMCS method to do this... it's crazy they designed it that way, but there you go. 3 hours ago, Tengri said: I did something like this: I think that should work if you put those in the appropriate parts of the hook... 4 hours ago, Tengri said: Guys, if you are ready-hooks and there's a variables language file, can you please send me? your best bet might be to send a private message to Christian @wp4all and see if he will share his hook and language files with you - I think he'll only have the German language translations, but he should have a working hook. 0 Quote Link to comment Share on other sites More sharing options...
Tengri Posted June 3, 2018 Share Posted June 3, 2018 I applied to him. But unfortunately, there is still no answer. 0 Quote Link to comment Share on other sites More sharing options...
wp4all Posted June 3, 2018 Author Share Posted June 3, 2018 Hi Tengri, I do not know what it's like in the other parts of the world, but today it's Sunday and 34 ° C warm . So far you will found everything you need here on this two pages so what is now your question? I mean Brian gave you all you need to translate the WHMCS Shop. I mean we both shared all we have used to translate this bloody hard coded shop you need. By the way Brian sorry I have not yet sent you the data. I have still to clean up some code fragments but at the moment the shop translation is on ice as I fight currently on other corners of this software . I don't know who has the Lead the States or UK but at leased at this time UK is still part of the EU and this software is an GDPR Nightmare. Greetings Christian 0 Quote Link to comment Share on other sites More sharing options...
Tengri Posted June 3, 2018 Share Posted June 3, 2018 Hello @wp4all The point is that I do not understand this mechanism. I just need a ready version. Being in German is not a problem. When I look at the working version, I will understand everything. It is enough that you give me a ready hook. 0 Quote Link to comment Share on other sites More sharing options...
wp4all Posted June 3, 2018 Author Share Posted June 3, 2018 Hi Tengri, this is the only hook i use for the translation so far: <?php # MarketConnect Upsell (Slightly) Multilingual Hook # Written by brian! add_hook('ClientAreaFooterOutput', 1, function() { $spamheadline1 = Lang::trans('store.upsell.headline.addsecuritytoyouremailandsaygoodbyetospam'); $spamtagline1 = Lang::trans('store.upsell.tagline.withnear100%filteringaccuracyandincreasedemailcontinuity'); $spamfeature1 = Lang::trans('store.upsell.feature.near100%filteringaccuracy'); $spamfeature2 = Lang::trans('store.upsell.feature.easysetupandconfiguration'); $spamfeature3 = Lang::trans('store.upsell.feature.increasedemailcontinuityredundancy'); $spamfeature4 = Lang::trans('store.upsell.feature.supportsupto1000emailboxes'); $spamfeature5 = Lang::trans('store.upsell.feature.learnmore'); $spamfeature6 = Lang::trans('store.upsell.feature.add'); $spamfeature7 = Lang::trans('store.upsell.feature.fromjust'); $spamfeature8 = Lang::trans('store.upsell.feature.mo'); $spamfeature9 = Lang::trans('store.upsell.feature.yr'); $spamfeature10 = Lang::trans('store.upsell.feature.sitelock'); $spamfeature11 = Lang::trans('store.upsell.feature.trythesitelockserviceforfree'); $spamfeature12 = Lang::trans('store.upsell.feature.dailymalwarescanning'); $spamfeature13 = Lang::trans('store.upsell.feature.dailyblacklistmonitoring'); $spamfeature14 = Lang::trans('store.upsell.feature.siteLockriskscore'); $spamfeature15 = Lang::trans('store.upsell.feature.sitelocktrustseal'); $spamfeature16 = Lang::trans('store.upsell.feature.protectyourwebsiteandboostyoursearchrankingswithansslcertificate'); $spamfeature17 = Lang::trans('store.upsell.feature.includedwithyoursslcertificate'); $spamfeature18 = Lang::trans('store.upsell.feature.dataprotectionupto256-bitencryption'); $spamfeature19 = Lang::trans('store.upsell.feature.unlimitedfreereissues'); $spamfeature20 = Lang::trans('store.upsell.feature.compatiblewithallmajorbrowsers'); $spamfeature21 = Lang::trans('store.upsell.feature.displayasecuritysealonyoursite'); $spamfeature22 = Lang::trans('store.upsell.feature.buildyourwebsitewitheaseusingthepowerfulweeblysitebuilder'); $spamfeature23 = Lang::trans('store.upsell.feature.weeblyspowerful'); $spamfeature24 = Lang::trans('store.upsell.feature.rangeofstunningthemestochoosefrom'); $spamfeature25 = Lang::trans('store.upsell.feature.draganddropeditor'); $spamfeature26 = Lang::trans('store.upsell.feature.trysitelock'); $spamfeature27 = Lang::trans('store.upsell.feature.upgradesitelock'); $spamfeature28 = Lang::trans('store.upsell.feature.tagline1'); $spamfeature29 = Lang::trans('store.upsell.feature.sitelocklist1'); $spamfeature30 = Lang::trans('store.upsell.feature.sitelocklist2'); $spamfeature31 = Lang::trans('store.upsell.feature.sitelocklist3'); $spamfeature32 = Lang::trans('store.upsell.feature.sitelocklist4'); $spamfeature33 = Lang::trans('store.upsell.feature.sitelocklist5'); $spamfeature34 = Lang::trans('store.upsell.feature.sitelocklist6'); return <<<EOF <script> var hashtable = {}; hashtable['Add Security to your Email and say goodbye to spam'] = '$spamheadline1'; hashtable['With near 100% filtering accuracy and increased email continuity'] = '$spamtagline1'; hashtable['Near 100% filtering accuracy'] = '$spamfeature1'; hashtable['Easy setup and configuration'] = '$spamfeature2'; hashtable[''] = '$spamfeature3'; hashtable['Supports up to 1000 email boxes'] = '$spamfeature4'; hashtable['Learn more...'] = '$spamfeature5'; hashtable['Add'] = '$spamfeature6'; hashtable['from just'] = '$spamfeature7'; hashtable['/mo'] = '$spamfeature8'; hashtable['/yr'] = '$spamfeature9'; hashtable['Automatically scan your website for malware and protect online reputation'] = '$spamfeature10'; hashtable['Try the SiteLock service for free'] = '$spamfeature11'; hashtable['Daily Malware Scanning'] = '$spamfeature12'; hashtable['Daily Blacklist Monitoring'] = '$spamfeature13'; hashtable['SiteLock Risk Score'] = '$spamfeature14'; hashtable['Sitelock Trust Seal'] = '$spamfeature15'; hashtable['Protect your website and boost your search rankings with an SSL certificate'] = '$spamfeature16'; hashtable['Included with your SSL certificate'] = '$spamfeature17'; hashtable['Data protection up to 256-bit encryption'] = '$spamfeature18'; hashtable['Unlimited free reissues'] = '$spamfeature19'; hashtable['Compatible with all major browsers'] = '$spamfeature20'; hashtable['Display a security seal on your site'] = '$spamfeature21'; hashtable['Build your website with ease using the Powerful Weebly Site Builder'] = '$spamfeature22'; hashtable['Weebly\'s powerful drag and drop website builder and guided set up get you to the finish line faster, no coding needed.'] = '$spamfeature23'; hashtable['Range of stunning themes to choose from'] = '$spamfeature24'; hashtable['Drag and drop editor'] = '$spamfeature25'; hashtable['Try SiteLock'] = '$spamfeature26'; hashtable['Upgrade to SiteLock'] = '$spamfeature27'; hashtable['Stop more malware and vulnerabilities'] = '$spamfeature28'; hashtable['Scans up to 25 Pages'] = '$spamfeature29'; hashtable['SQL Injection & Cross-Site (XSS) Scan'] = '$spamfeature30'; hashtable['Website Application Scan'] = '$spamfeature31'; hashtable['WordPress Scan'] = '$spamfeature32'; hashtable['Weebly'] = '$spamfeature33'; hashtable['Erhöhte E-Mail-Kontinuität & Redundanz'] = '$spamfeature34'; $(document).ready(function() { $('.promo-banner').each(function( index ) { var banner = $(this); $.each(hashtable, function( index, value ) { banner.html(banner.html().replace(index, value)); }); }); }); </script> EOF; }); But this is the same hook Brian gave to you. We did so many hacks I need to check specially what kind of translation problem you have. And @ the moment I have the shop not activated either on the Test System and or Live system. Greetings Christian 0 Quote Link to comment Share on other sites More sharing options...
Tengri Posted June 3, 2018 Share Posted June 3, 2018 (edited) Thank you for your sharing. I want translate SSL side. This: https://prnt.sc/jpvja8 To brian! code I add this $ssl36 - please check. I can not understand the principle of the hooks. It seems to me that he takes everything from heaven. <?php # MarketConnect Upsell (Slightly) Multilingual Hook # Written by brian! add_hook('ClientAreaFooterOutput', 1, function() { $spamheadline1 = Lang::trans('store.upsell.headline.addsecuritytoyouremailandsaygoodbyetospam'); $spamtagline1 = Lang::trans('store.upsell.tagline.withnear100%filteringaccuracyandincreasedemailcontinuity'); $spamfeature1 = Lang::trans('store.upsell.feature.near100%filteringaccuracy'); $spamfeature2 = Lang::trans('store.upsell.feature.easysetupandconfiguration'); $spamfeature3 = Lang::trans('store.upsell.feature.increasedemailcontinuityredundancy'); $spamfeature4 = Lang::trans('store.upsell.feature.supportsupto1000emailboxes'); $spamfeature5 = Lang::trans('store.upsell.feature.learnmore'); $spamfeature6 = Lang::trans('store.upsell.feature.add'); $spamfeature7 = Lang::trans('store.upsell.feature.fromjust'); $spamfeature8 = Lang::trans('store.upsell.feature.mo'); $spamfeature9 = Lang::trans('store.upsell.feature.yr'); $spamfeature10 = Lang::trans('store.upsell.feature.sitelock'); $spamfeature11 = Lang::trans('store.upsell.feature.trythesitelockserviceforfree'); $spamfeature12 = Lang::trans('store.upsell.feature.dailymalwarescanning'); $spamfeature13 = Lang::trans('store.upsell.feature.dailyblacklistmonitoring'); $spamfeature14 = Lang::trans('store.upsell.feature.siteLockriskscore'); $spamfeature15 = Lang::trans('store.upsell.feature.sitelocktrustseal'); $spamfeature16 = Lang::trans('store.upsell.feature.protectyourwebsiteandboostyoursearchrankingswithansslcertificate'); $spamfeature17 = Lang::trans('store.upsell.feature.includedwithyoursslcertificate'); $spamfeature18 = Lang::trans('store.upsell.feature.dataprotectionupto256-bitencryption'); $spamfeature19 = Lang::trans('store.upsell.feature.unlimitedfreereissues'); $spamfeature20 = Lang::trans('store.upsell.feature.compatiblewithallmajorbrowsers'); $spamfeature21 = Lang::trans('store.upsell.feature.displayasecuritysealonyoursite'); $spamfeature22 = Lang::trans('store.upsell.feature.buildyourwebsitewitheaseusingthepowerfulweeblysitebuilder'); $spamfeature23 = Lang::trans('store.upsell.feature.weeblyspowerful'); $spamfeature24 = Lang::trans('store.upsell.feature.rangeofstunningthemestochoosefrom'); $spamfeature25 = Lang::trans('store.upsell.feature.draganddropeditor'); $spamfeature26 = Lang::trans('store.upsell.feature.trysitelock'); $spamfeature27 = Lang::trans('store.upsell.feature.upgradesitelock'); $spamfeature28 = Lang::trans('store.upsell.feature.tagline1'); $spamfeature29 = Lang::trans('store.upsell.feature.sitelocklist1'); $spamfeature30 = Lang::trans('store.upsell.feature.sitelocklist2'); $spamfeature31 = Lang::trans('store.upsell.feature.sitelocklist3'); $spamfeature32 = Lang::trans('store.upsell.feature.sitelocklist4'); $spamfeature33 = Lang::trans('store.upsell.feature.sitelocklist5'); $spamfeature34 = Lang::trans('store.upsell.feature.sitelocklist6'); $ssl35 = Lang::trans('store.upsell.feature.securemultiplewebsitesforless'); return <<<EOF <script> var hashtable = {}; hashtable['Add Security to your Email and say goodbye to spam'] = '$spamheadline1'; hashtable['With near 100% filtering accuracy and increased email continuity'] = '$spamtagline1'; hashtable['Near 100% filtering accuracy'] = '$spamfeature1'; hashtable['Easy setup and configuration'] = '$spamfeature2'; hashtable[''] = '$spamfeature3'; hashtable['Supports up to 1000 email boxes'] = '$spamfeature4'; hashtable['Learn more...'] = '$spamfeature5'; hashtable['Add'] = '$spamfeature6'; hashtable['from just'] = '$spamfeature7'; hashtable['/mo'] = '$spamfeature8'; hashtable['/yr'] = '$spamfeature9'; hashtable['Automatically scan your website for malware and protect online reputation'] = '$spamfeature10'; hashtable['Try the SiteLock service for free'] = '$spamfeature11'; hashtable['Daily Malware Scanning'] = '$spamfeature12'; hashtable['Daily Blacklist Monitoring'] = '$spamfeature13'; hashtable['SiteLock Risk Score'] = '$spamfeature14'; hashtable['Sitelock Trust Seal'] = '$spamfeature15'; hashtable['Protect your website and boost your search rankings with an SSL certificate'] = '$spamfeature16'; hashtable['Included with your SSL certificate'] = '$spamfeature17'; hashtable['Data protection up to 256-bit encryption'] = '$spamfeature18'; hashtable['Unlimited free reissues'] = '$spamfeature19'; hashtable['Compatible with all major browsers'] = '$spamfeature20'; hashtable['Display a security seal on your site'] = '$spamfeature21'; hashtable['Build your website with ease using the Powerful Weebly Site Builder'] = '$spamfeature22'; hashtable['Weebly\'s powerful drag and drop website builder and guided set up get you to the finish line faster, no coding needed.'] = '$spamfeature23'; hashtable['Range of stunning themes to choose from'] = '$spamfeature24'; hashtable['Drag and drop editor'] = '$spamfeature25'; hashtable['Try SiteLock'] = '$spamfeature26'; hashtable['Upgrade to SiteLock'] = '$spamfeature27'; hashtable['Stop more malware and vulnerabilities'] = '$spamfeature28'; hashtable['Scans up to 25 Pages'] = '$spamfeature29'; hashtable['SQL Injection & Cross-Site (XSS) Scan'] = '$spamfeature30'; hashtable['Website Application Scan'] = '$spamfeature31'; hashtable['WordPress Scan'] = '$spamfeature32'; hashtable['Weebly'] = '$spamfeature33'; hashtable['Erhöhte E-Mail-Kontinuität & Redundanz'] = '$spamfeature34'; hashtable['Secure multiple websites for less'] = '$ssl35'; $(document).ready(function() { $('.promo-banner').each(function( index ) { var banner = $(this); $.each(hashtable, function( index, value ) { banner.html(banner.html().replace(index, value)); }); }); }); </script> EOF; }); Edited June 3, 2018 by Tengri 0 Quote Link to comment Share on other sites More sharing options...
wp4all Posted June 3, 2018 Author Share Posted June 3, 2018 Hi Tengri, here is the solution --> I guess you should read the post again this is the part we are discussing here. The work of the hook is very simple it just analyses the pointed text and replaced it by override function with your Language string. This makes it very hard if in the code is an special HTML characters or Unicode like this one for an simple space tag. Greetings Christian 0 Quote Link to comment Share on other sites More sharing options...
Tengri Posted June 3, 2018 Share Posted June 3, 2018 Well, that's what I did. Look at the code I sent ($ssl36). It should work but it doesn't work.. 0 Quote Link to comment Share on other sites More sharing options...
wp4all Posted June 3, 2018 Author Share Posted June 3, 2018 Hi Tengri, Quote Well, that's what I did. Look at the code I sent ($ssl36). It should work but it doesn't work.. There is no $ssl36 it ends with $ssl35 Greetings Christian 0 Quote Link to comment Share on other sites More sharing options...
Tengri Posted June 3, 2018 Share Posted June 3, 2018 It was a typo. I meant 35. This is language variable: $_LANG['store.upsell.feature.securemultiplewebsitesforless'] = "Sınaq üçün test"; 0 Quote Link to comment Share on other sites More sharing options...
wp4all Posted June 3, 2018 Author Share Posted June 3, 2018 (edited) Hi Tengril, this is right because it was done by inline coding. File --> your Template/store/order.tpl <h3>{if $LANG.store.cart.promo.{$promotion->getHeadline()|replace:' ':''|replace:',':''|replace:'.':''|strtolower}}{$LANG.store.cart.promo.{$promotion->getHeadline()|replace:' ':''|replace:',':''|replace:'.':''|strtolower}}{else}$promotion->getHeadline(){/if}</h3> <h4>{if $LANG.store.cart.promo.{$promotion->getTagline()|replace:' ':''|replace:',':''|replace:'.':''|strtolower}}{$LANG.store.cart.promo.{$promotion->getTagline()|replace:' ':''|replace:',':''|replace:'.':''|strtolower}}{else}$promotion->getTagline(){/if}</h4> {if $promotion->getDescription()} <p>{$promotion->getDescription()}</p> {/if} {if $promotion->hasHighlights()} <ul> {foreach $promotion->getHighlights() as $highlight} <li>{if $LANG.store.cart.promo.{$highlight|replace:' ':''|replace:',':''|replace:'.':''|strtolower}}{$LANG.store.cart.promo.{$highlight|replace:' ':''|replace:',':''|replace:'.':''|strtolower}}{else}$highlight{/if}</li> {/foreach} </ul> {/if} {if $promotion->hasFeatures()} <ul class="features"> {foreach $promotion->getFeatures() as $highlight} <li><i class="fa fa-check-circle-o"></i> {if $LANG.store.cart.promo.{$highlight|replace:' ':''|replace:',':''|replace:'.':''|strtolower}}{$LANG.store.cart.promo.{$highlight|replace:' ':''|replace:',':''|replace:'.':''|strtolower}}{else}$highlight{/if}</li> {/foreach} </ul> {/if} $_LANG['store']['cart']['promo']['securemultiplewebsitesforless'] = "Sichern Sie multiple Webseiten günstig ab"; $_LANG['store']['cart']['promo']['managesecurityacrosseverysubdomainwithasinglewildcardsslcertificate'] = "Verwalten Sie die Sicherheit für jede Sub-Domain mit einem einzigen Wildcard-SSL-Zertifikat"; $_LANG['store']['cart']['promo']['examplecomprotectstheseandmore'] = "*.beispiel.de schützt diese ... und mehr"; $_LANG['store']['cart']['promo']['wwwexamplecom'] = "<strong>www</strong>.beispiel.de"; $_LANG['store']['cart']['promo']['mailexamplecom'] = "<strong>mail</strong>.beispiel.de"; $_LANG['store']['cart']['promo']['loginexamplecom'] = "<strong>login</strong>.beispiel.de"; $_LANG['store']['cart']['promo']['anythingexamplecom'] = "<strong>anything</strong>.beispiel.de"; Thanks here to WHMCS, especially the responsible guy for designing and scripting the shop Greetings Christian Edited June 3, 2018 by wp4all 2 Quote Link to comment Share on other sites More sharing options...
wp4all Posted June 3, 2018 Author Share Posted June 3, 2018 By the way the Top description came from the Product description under admin-> product-> Greetings Christian 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 3, 2018 Share Posted June 3, 2018 28 minutes ago, wp4all said: By the way Brian sorry I have not yet sent you the data. I have still to clean up some code fragments but at the moment the shop translation is on ice as I fight currently on other corners of this software . no worries Christian - actually, i'd forgotten all about it - like you say, a lot of other things to worry about! 26 minutes ago, Tengri said: The point is that I do not understand this mechanism. I just need a ready version. there almost certainly won't be a ready version - I haven't got one internally (as I don't use MarketConnect myself) and i'm not aware of one being available from elsewhere. 1 hour ago, Tengri said: When I look at the working version, I will understand everything. no you won't - it's working now and you don't understand it... it's only missing the SSL products I think... it will work for those products already added. 1 hour ago, wp4all said: There is no $ssl36 it ends with $ssl35 not that it matters, but the numbers used in the hook don't really matter... you could call it $ssl10000001 and it would still be valid. well done Christian for figuring out which template it was - I didn't recognise it. 0 Quote Link to comment Share on other sites More sharing options...
Tengri Posted June 4, 2018 Share Posted June 4, 2018 21 hours ago, wp4all said: Hi Tengril, this is right because it was done by inline coding. File --> your Template/store/order.tpl <h3>{if $LANG.store.cart.promo.{$promotion->getHeadline()|replace:' ':''|replace:',':''|replace:'.':''|strtolower}}{$LANG.store.cart.promo.{$promotion->getHeadline()|replace:' ':''|replace:',':''|replace:'.':''|strtolower}}{else}$promotion->getHeadline(){/if}</h3> <h4>{if $LANG.store.cart.promo.{$promotion->getTagline()|replace:' ':''|replace:',':''|replace:'.':''|strtolower}}{$LANG.store.cart.promo.{$promotion->getTagline()|replace:' ':''|replace:',':''|replace:'.':''|strtolower}}{else}$promotion->getTagline(){/if}</h4> {if $promotion->getDescription()} <p>{$promotion->getDescription()}</p> {/if} {if $promotion->hasHighlights()} <ul> {foreach $promotion->getHighlights() as $highlight} <li>{if $LANG.store.cart.promo.{$highlight|replace:' ':''|replace:',':''|replace:'.':''|strtolower}}{$LANG.store.cart.promo.{$highlight|replace:' ':''|replace:',':''|replace:'.':''|strtolower}}{else}$highlight{/if}</li> {/foreach} </ul> {/if} {if $promotion->hasFeatures()} <ul class="features"> {foreach $promotion->getFeatures() as $highlight} <li><i class="fa fa-check-circle-o"></i> {if $LANG.store.cart.promo.{$highlight|replace:' ':''|replace:',':''|replace:'.':''|strtolower}}{$LANG.store.cart.promo.{$highlight|replace:' ':''|replace:',':''|replace:'.':''|strtolower}}{else}$highlight{/if}</li> {/foreach} </ul> {/if} $_LANG['store']['cart']['promo']['securemultiplewebsitesforless'] = "Sichern Sie multiple Webseiten günstig ab"; $_LANG['store']['cart']['promo']['managesecurityacrosseverysubdomainwithasinglewildcardsslcertificate'] = "Verwalten Sie die Sicherheit für jede Sub-Domain mit einem einzigen Wildcard-SSL-Zertifikat"; $_LANG['store']['cart']['promo']['examplecomprotectstheseandmore'] = "*.beispiel.de schützt diese ... und mehr"; $_LANG['store']['cart']['promo']['wwwexamplecom'] = "<strong>www</strong>.beispiel.de"; $_LANG['store']['cart']['promo']['mailexamplecom'] = "<strong>mail</strong>.beispiel.de"; $_LANG['store']['cart']['promo']['loginexamplecom'] = "<strong>login</strong>.beispiel.de"; $_LANG['store']['cart']['promo']['anythingexamplecom'] = "<strong>anything</strong>.beispiel.de"; 21 hours ago, wp4all said: Thanks here to WHMCS, especially the responsible guy for designing and scripting the shop Greetings Christian Thank you! But how system recognize it? I don't see any "lang" external in this code. For example now how translate this? https://prnt.sc/jqn48k And I don't know how to translate this because I don't see any variables. For example, you put this: $_LANG['store']['cart']['promo']['loginexamplecom'] = "<strong>login</strong>.beispiel.de"; And where in the code variable: loginexamplecom? 0 Quote Link to comment Share on other sites More sharing options...
wp4all Posted June 4, 2018 Author Share Posted June 4, 2018 (edited) Hi Tengri, as Brian sad you don't understand how the override Funktion is working. You ask for an working example but you are don't understand the basic. You are replacing the written text by an $_Lang string. You need to understand for what this stands for --> {if $LANG.store.cart.promo.{$promotion->getHeadline()|replace:' ':''|replace:',':''|replace:'.':''|strtolower}}{$LANG.store.cart.promo.{$promotion->getHeadline()|replace:' ':''|replace:',':''|replace:'.':''|strtolower}}{else}$promotion->getHeadline(){/if} If i take this --> $_LANG['store']['cart']['promo']['loginexamplecom'] delete everything exept "loginexamplecom" put some space and dots in between you will get this --> login.example.com So there is your heaven !! Greetings Christian Edited June 4, 2018 by wp4all 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.