سكريبت Whmcs كيفية اضافة ايقونات الاعلام / الدول language flags
How to add country flags? - how to change flag? - to change language flags on v8
How to use icons in WHMCS to select the language in client area
https://www.rise.company/upload/uplo...4445432441.png
WHMCS has flags for the following currencies as standard; AUD, CAD, EUR, GBP, INR, JPY, USD and ZAR. If any of these currencies are configured, a flag will appear on the shopping cart for new signups to select as shown above.
In this example I will be adding Chinese Yuan (CNY) and modifying the Modern template,
but you can also follow this same technique with the Slider template.
على سبيل المثال : الصين او وضع مصر
Next we need to copy the order form template to give us one we can customize.اقتباس:
So to add flags for more currencies, first obtain or create a flag image measuring 16px by 11px and then upload it to the whmcs/assets/img/flags directory.
So duplicate the /templates/orderforms/modern directory and name it whatever you like,
https://www.rise.company/upload/uplo...4469274241.png
for this example I will call it 'moderncustom'.
{elseif $curr.code eq "EUR"}euكود:Open /templates/orderforms/moderncustom/products.tpl and look for line 26:
{elseif $curr.code eq "GBP"}gb
{elseif $curr.code eq "INR"}in
{elseif $curr.code eq "JPY"}jp
{elseif $curr.code eq "USD"}us
{elseif $curr.code eq "ZAR"}za
{else}na{/if}.png" border="0" alt="" /> {$curr.code}
Replace it with:
{elseif $curr.code eq "EUR"}eu
{elseif $curr.code eq "GBP"}gb
{elseif $curr.code eq "INR"}in
{elseif $curr.code eq "JPY"}jp
{elseif $curr.code eq "USD"}us
{elseif $curr.code eq "ZAR"}za
{elseif $curr.code eq "EGP"}eg
{else}na{/if}.png" border="0" alt="" /> {$curr.code}
Where my flag image is called ch.png. I've highlighted the code added in the screenshot below.
The end result is a block of code on line 26 which looks like:
افتح هذا المسار اذى كان legacy modern هو الافتراضى لك
and made the exact same modification to line 47 of this file too.كود:whmcs/templates/orderforms/legacy_modern/products.tpl
Now upload the two templates files we just edited. Login to your WHMCS admin area to
select the moderncustom order form template from the Setup > General Settings > Ordering tab and you're done!
A flag image will now be displayed to visitors on the order form next to the CNY currency option.
It would just be a case of adjusting the "CNY" variable and "ch" filename in order to add as many different flags as desired.
https://www.rise.company/forum/image.../2021/11/5.png
الخلاصة :
0- اذهب الى مسار الاعلام وضع لوجو علم دولتك
1- شاهد داخل اعدادات whmcs اسم order template الافتراضى
2- اذهب الى مسار order template وعدل ملف باسم products.tpl
3- داخل هذا الملف ابحث مثلا us شوف الكود الخاص بها وكرره ولكن مع تغيير القيم
4- ضع الصورة فى المسار whmcs/assets/img/flags
ملحوظة :
هتجد الكود الذى هيتطلب تعديله مرتين داخل ملف products.tpl
المرجع:
http://3.12.123.82/96174/whmcs-insig...currency-flags
https://whmcs.community/topic/305858...e-flags-on-v8/
https://whmcs.community/topic/168593...o-change-flag/
https://domainregister.international...ient-area.html
