Add attribute name to configurable select option in Magento2?

Open the file

magento/vendor/magento/module-configurable-product/view/frontend/web/js/configurable.js

and find this line

element.options[0].innerHTML = this.options.spConfig.chooseText

repleace the line with below code

var attribute_lable = this.options.spConfig.attributes[element.id.replace(/[a-z]*/, '')]['label'];
element.options[0].innerHTML = this.options.spConfig.chooseText + attribute_lable;

On page load change dropdown label,
Open the file

vendor\magento\module-configurable-product\view\frontend\templates\product\view\type\options\configurable.phtml

and find the line

<option value=""><?= /* @escapeNotVerified */ __('Choose an Option...') ?></option>

repleace the line with below code

<?php 
$attrlabel = array();(Declared before loop)
$attrlabel[$i] = $_attribute->getProductAttribute()->getStoreLabel();?>
<option value=""><?phpecho 'Choose '.$attrlabel[$i];?></option>

How to get configurable attribute label and value in magento 2?

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product = $objectManager->create('Magento\Catalog\Model\Product')->load(**product id**);

$productTypeInstance = $objectManager->get('Magento\ConfigurableProduct\Model\Product\Type\Configurable');
$productAttributeOptions = $productTypeInstance->getConfigurableAttributesAsArray($product);
foreach ($productAttributeOptions as $key => $value) {

    $tmp_option = $value['values'];
    if(count($tmp_option) > 0)
    {
        echo "<h3>".$value['label']."</h3>";
        echo "<select id='".$key."_".$value['label']."'>";
        foreach ($tmp_option as $tmp) 
        {
            echo "<option value='".$key."_".$tmp['value_index']."'>".$tmp['label']."</option>";
        }
        echo "</select>";
    }
}

Blank admin page after installing Magento 2

Step 1:

open file /vendor/magento/framework/View/Element/Template/File/Validator.php in magento install dir , find

$realPath = $this->fileDriver->getRealPath($path)

replace with :

$realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));

Step 2:
open file app/etc/di.xml in magento install dir, find

agento\Framework\App\View\Asset\MaterializationStrategy\Symlink

and replace with

Magento\Framework\App\View\Asset\MaterializationStrategy\Copy

Step 3:
Then go to var/cache , delete all folder / file

Step 4:
refresh the page, done.

NGINX server SSL installation and SSL upgrade

Please follow the below steps to Install and Upgrade the SSL in nginx server:

Step1:  Open putty SSH

Step2: Redirect to Domain Config file to find / create the SSL key and SSL crt location.

Step3: Please follow the below step to find view/edit the domain config file.
 — Once logged into SSH.
 — From current folder, redirect to root folder using below comment.
     Comment:  cd ..
     Also, please check the below image.
    

—From root folder, redirect to /etc/nginx/conf.d folder to reach the domain.conf file.
    Comment: cd etc/nginx/conf.d

— From conf.d folder, list out the all files using below comment to find the domain config file name.
     Comment: ls -a (It will list all files)

— Edit the particular domain config file using below comment.
     Comment: vi domainname.com.conf

— It will open the Edit view, there we could add SSL key and SSL crt location and Edit. Files name should be domainname.com.crt and domainname.com.key
     Please find the below image for more information.

— Click i key to enable the insert mode to edit the file.
— Update the ssl_certificate and ssl_certificate_key path based on your need.
— Click “Esc” and “!wq” and “Enter” to save the changes.

— Create / Go to the SSL folder “etc/nginx/ssl” folder

— Create or edit certificate key file “domainname.com.key” and add the Privare key value as like below image and use below comment.
   Comment: vi domainname.com.key
                       Enable Insert using i key
                       Add private key
                       Click Esc key
                       Enter :wq and click Enter to save the file.
   As like below image.

— Same process to add three CERTIFICATE key in same file called “domainname.com.crt”.

— Finally restart the nginx server 
      Comments for Debian/Ubuntu/RHEL/CentOS Linux
      # /etc/init.d/nginx restart 
     OR
     # /etc/init.d/nginx reload
     OR
      # service nginx restart
      OR
      # service nginx reload

DONE!!!
 

Magento Migration One Domain to Another Domain

Step1: Change the ‘secure’ and ‘unsecure’ url in your database ‘core_config_data’ table’

Using Below query or Change manually:

UPDATE core_config_data SET value="http://newhost.com/" WHERE path="web/unsecure/base_url";
UPDATE core_config_data SET value="https://newhost.com/" WHERE path="web/secure/base_url";

 

Step2: Change the ‘local.xml’ file database configuration file path: yourdomain\app\etc

Note: Don’t Backup the local.xml file same folder,remove the older files in that folder.

Step3: Clear the cache and session folder

File path: yourdomain\var\cache, yourdomain\var\session

Step4: Change the .htaccess file configure

Notes:

1.Check the ‘Old Domain’ urls in your Full Database and Files and replace with ‘Live Url’.

2.Take your Old Database Backup with out old caches

3.Magento 1.9 version need the php5 and above version not php7

 

 

 

Windows server HTTP Error 500.50 – URL Rewrite Module Error while accessing the image

Hi All

We faced the problem while upload the image in windows server!

Image uploaded fine into server , but its not accessible from user-end through browser. Error displayed “500.50 – URL Rewrite Module Error

Reason:
The problem happens, when you use PHP to upload a file.  When you upload a file or image, PHP sends the file to a temporary directory on the hard drive (C:\Windows\Temp) and then copies it over to it’s intended directory(into site location).  Once the file has landed in the temporary directory, it is assigned the permissions of that directory. The problem is when Windows copies that file, it keeps the temporary directory’s permissions and doesn’t inherit your web directory’s permissions.

Solution:
1. Change the permissions on the temp folder(C:\Windows\Temp) giving IIS_IUSRS – write/modify. Find below image.

2. Change the path of the temp folder in the PHP.ini file to a folder that does have IIS_IUSRS write/modify permission.

windows temp folder permission change - 500.50 - URL Rewrite Module Error

Increase Upload File Size in PhpMyAdmin and WordPress

Increase the PhpMyAdmin Upload File Size  through php.ini file:

Step1:  xampp -> open php folder and select ‘php.ini’  file

Step2:  Increase memory limit find the word ‘memory_limit‘  in that  file and update the value ‘500M’

Step3: Increase post max size  find the word ‘post_max_size‘  in that  file and update the value ‘500M’

Step4: Increase upload max size  find the word ‘upload_max_filesize‘  in that  file and update the value ‘450M’

Step5:  Increase execution time find the word ‘max_execution_time‘  in that  file and update the value ‘3000’

Step6:   Increase input time find the word ‘max_input_time‘  in that  file and update the value ‘4000’

Step7: Save the file  and restart your xampp server

Increase the WordPress Upload File Size  through php.ini file:

memory_limit = 500M
post_max_size = 500M
upload_max_size = 500M
upload_max_filesize = 450M
max_input_time = 3000
max_execution_time = 3000
max_input_vars = 4000

Increase the WordPress Upload File Size  through .user.ini file:

memory_limit = 500M
post_max_size = 500M should be larger than upload_max_filesize and smaller than memory_limit.
upload_max_size = 500M
upload_max_filesize = 450M
max_input_time = 3000
max_execution_time = 3000
max_input_vars = 4000

Increase the WordPress Upload File Size  through wp-config.php file:

define( 'WP_MEMORY_LIMIT', '64M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' );

Increase the WordPress Upload File Size  through CPanel:

Step1:  cpanel-> ‘Software and Services’ ->  Select PHP Version

Step2:  Find php Version

Step3:  Find  upload_max_filesize’ option select box and change the value

Get latitude | longitude using address in Goolge Map

Step  1

Include  Google map api with  key and libraries
<script                                                                                                                                                                                                     src=”https://maps.googleapis.com/maps/api/js?key=AIzaSyAzXoaC9OV09c- sTdIWWR1hWzUcJppx_g8&libraries=places”></script>

Step 2

Create div tag for map with id

<div id=”location_map” style=”width:500px; height:500px;”></div>

Step 3

Create Address input field with latitude and longitude

<div>Address</div>
<div><input type=”text” name=”loc_address” id=”loc_address” value=”” style=”width:400px; height:40px;” /> </div>

<div>Latitude</div>
<div> <input type=”text” name=”loc_latitude” id=”loc_latitude” value=”” style=”width:300px; height:40px;” /> </div>

<div>Longitude</div>
<div> <input type=”text” name=”loc_longitude” id=”loc_longitude” value=”” style=”width:300px; height:40px;” /> </div>

Step  4

Include this script

<script>
Location_map();
function Location_map() {

var Loc_map = new google.maps.Map(document.getElementById(‘location_map’), {
center: {lat: 34.8375, lng: -106.2370},
zoom: 10
});
var location_input = (document.getElementById(‘loc_address’));

var autocomplete = new google.maps.places.Autocomplete(location_input);
autocomplete.bindTo(‘bounds’, Loc_map);

var loc_marker = new google.maps.Marker({
map: Loc_map,
anchorPoint: new google.maps.Point(0, -29)
});

autocomplete.addListener(‘place_changed’, function() {

loc_marker.setVisible(false);
var place = autocomplete.getPlace();

if (place.geometry.viewport) {

Loc_map.fitBounds(place.geometry.viewport);
}
else {
Loc_map.setCenter(place.geometry.location);
Loc_map.setZoom(17);
}
loc_marker.setPosition(place.geometry.location);
loc_marker.setVisible(true);

$(‘#loc_latitude’).val(place.geometry.location.lat());
$(‘#loc_longitude’).val(place.geometry.location.lng());

});

}

</script>

Step  5

when  type in address field,  address will be loaded automatically and latitude and longitude will be placed in input fields for searching address.

 

Completed

Uncategorized

Игровой клуб Poperlo Casino: Надежный доступ к азартным развлечениям Turinabol 10 Mg: Hoe in te nemen voor optimale resultaten Oxandrolone 10 Mg in Bodybuilding: Een Diepgaande Analyse Resmi Spor ve Casino Platformu Optimale Suppletie voor Maximale Hypertrofie Драгон Мани: Символ Удачи в Мире Онлайн-Слотов Beste Dosierung für Clenbuterol in der Definitionsphase Injectable Steroids: A Guide to Safe Administration Сегодня актуальное зеркало 1хбет — это официальный ресурс 1хбет. Understanding Dianoged 10 Mg: Usage and Post-Use Considerations Wie Steroide die Ausdauerleistung bei Sportlern steigern können Poperlo Casino Сайт: Современный взгляд на азартные развлечения Cómo Comprar Esteroides de Forma Segura y Efectiva Online casino in Nederland: mijn beste opties en criteria Ideale casino’s met casino ideal en iDEAL: checklist en reviews Casino met Paysafecard: snel storten, reviews checken en vergelijken Test Optimierung der Schilddrüsenwerte: Wie Cytomel helfen kann The newest real money games are online slots. Peptide T 500 nello Sport: Benefici e Rischi Gli Steroidi Anabolizzanti: Soluzione ai Progressi Lenti o Rischio per la Salute? Gizbo Casino: Fast-Paced Gameplay for Quick Wins Testosteron Mix 300 w Bodybuilding – Klucz do Twojego Sukcesu Turinabol 10 mg w Bodybuildingu: Kluczowe Informacje i Dawkowanie Test Post Created Casino Lab: Quick Wins and Intense Gameplay for the Modern Player Logging into Mecca Bingo feels surprisingly effortless even for total beginners Test Post Created Обзор нелегальной букмекерской компании 1хБет в России на 2024 год. Vegas Hero – Smart Play for Controlled Risk Gamers Billy Bets Casino: Vincite Rapide per il Giocatore Veloce The Influence of HGH on Fat Loss and Muscle Growth Approfondimento di Tikitaka casino: Uno Sguardo Dettagliato ai Titoli oltre alla all’Esperienza del Giocatore Panoramica su TikItaka casino bonus: Uno Sguardo Dettagliato ai Servizi e alla Qualita del Servizio Valutazione di Instant casino 45: Una Guida Completa ai Giochi insieme alla al Percorso del Membro Panoramica di My Empire spettacoli dal vivo: Una Guida Completa ai Servizi e al Percorso del Membro Optimizing Muscle Building: A Scientific Perspective on Steroids Valutazione su Nine casino accedi: Un Esame Approfondito dei Contenuti insieme alla all’Esperienza del Giocatore Valutazione di Nine casino: Uno Sguardo Dettagliato ai Titoli e al Percorso del Membro Dragon Blaze Slot: Una aventura de ritmo rápido en Unique Casino Panoramica su Big casino: Una Guida Completa ai Giochi e al Percorso del Membro 10 кращих хостингів у 2026 Хмарні рішення стають ідеальними для динамічних бізнесів та зростаючих проектів завдяки еластичності та моделі оплати за фактом використання (Pay-As-You-Go). Рейтинг безкоштовних та платних хостинг-провайдерів: ТОП-31 хмарний хостинг. Approfondimento di savaspin casino login: Una Guida Completa ai Contenuti oltre alla all’Esperienza del Giocatore Аренда VPS VDS: купить виртуальный сервер на хостинге В нашем ассортименте услуг можно найти аренду VPS/VDS (выделенные серверы), облачные решения и прокси-сервисы. Analisi su Sava spin: Un’Analisi Attenta dei Titoli oltre alla alla Qualita del Servizio 7 Greatest Endless Internet Plans Websites, Shops, & Bandwidth Silver Bekannte persönlichkeit Bonuscodes & Aktionen 2026 GoldenStar Casino Offizielle Homepage 3 000 Provision & Traktandum Slots Silver Berühmtheit Bonus & Promo-Codes Alleinig für jedes deutsche Spieler Valutazione su Sport aza: Una Guida Completa ai Titoli e all’Esperienza del Giocatore 100% Bonuspaket & Maklercourtage bloß Einzahlung Kody bonusowe Marvel Casino Propozycji 2026 Marvel Casino Bonusy 2026 jak i również Kody gwoli Własny Golden Star Erprobung 2026 » Unsre Erfahrungen & Aktueller Bonus Panoramica su Winnita casino sito ufficiale: Un’Analisi Attenta dei Contenuti insieme alla all’Esperienza del Giocatore Authoritative Webpages Analisi su Win casinò: Un Esame Approfondito dei Contenuti oltre alla al Percorso del Membro Wonderful Crown Local casino: Greatest Harbors, Incentives, and you will Live Online game 1XBet Software 2025 install 1XBet apk, cellular & ios The fresh Smarter Means to fix Use Android or apple’s ios Analisi di Win casino bonus 10 euro: Uno Sguardo Dettagliato ai Giochi e al Percorso del Membro Etkili Düşüşlerden Elde Edilen Hazineler – Gizli Kayıp LuckyElf Slots: Schnelle Gewinne und intensives Spiel auf https://luckyelf-official.de/ CS2 Peel'lerini Anında Gerçek Paraya Satın, Hızlı ve Güvenli Alışverişler counter-strike-2 Moonwin Gambling establishment Opinion Checked & Rated 2026 Как найти актуальное зеркало Плей Фортуна и не потерять доступ Moonwin Local casino No-deposit Incentive Requirements & Campaigns 2026 Moonwin Gambling establishment within the All of us 1: Speak about Bonuses, Online game, and you may User Perks 6 Casinos Online com 10 Dado Sem Depósito Dezembro 2025 Cliente sobre Counter-Strike dos filtrado en torrent JeetCity Local casino Totally free Spins & No deposit Requirements 2026 Beste Online Casinos uneingeschränkt 2026: Hier kein 1-Limitierung MultiBet Local casino Opinion Professional & Player Recommendations 2026 2026’s Greatest PayPal Gambling enterprises Professional Affirmed Web sites Pulsz: Enjoyable Slots & Gambling enterprise Apps online Play Казино Х Официальный Сайт: Надежный Вход в Мир Азарта Roobet casino: Spannende High‑Intensity Gaming voor Snelle Winsten 2025 年美国顶级在线赌场对比,包括真钱游戏、奖金和新网站,以及 2026 年美国最佳在线赌场。 Enjoy over 22,900 demo games with FREE casino games for entertainment. Best Real Money US Casinos 2026 Payouts Verified Why Deca-Durabolin is Popular in Classic Cycles The Role of Steroid Drugs in Optimizing Bodybuilding Training: A Comprehensive List and Guide Promo akce a online kasino Tren A 100 für Sportler: Anwendung und Wirkungen Télécharger 1XBET APK et App sur Android : méthode fiable The Role of Oral Steroids in Optimizing Bodybuilding Training Isotretinoína y Eritromicina en el Culturismo: Efectos y Consideraciones Dónde comprar esteroides de forma segura La Vida de un Atleta: Desafíos y Logros Ranking independiente de tiendas de esteroides en España Levofloxacina y su Relación con los Ciclos de Preparados de Insulina Comprar esteroides en España: Todo lo que necesitas saber Melanotan II Genheal: Cómo Tomar Tabletas y Todo lo que Necesitas Saber La Mejor Tienda de Esteroides Inyectables en España Сегодня доступно рабочее зеркало 1xBet на официальном сайте. Установите приложение 1хБет APK на устройства Android и iOS, загрузив его с официального сайта. Najlepsze cechy Mostbet APK na urządzenia mobilne w kasynie Optimierung des Bodybuildings: Der sichere und effektive Einsatz von Steroiden