<div class="currency-switcher">
  <select id="currency-select">
    <option value="USD">USD</option>
    <option value="PKR">PKR</option>
  </select>
</div>
  
  
select {
    background-size: 4px 4px, 4px 4px;
    border-radius: 4px;
}
document.addEventListener('DOMContentLoaded', function() {
    const currencySelect = document.getElementById('currency-select');
    
    // Conversion rates (you can update this based on your latest rates)
    const conversionRates = {
        USD: 1,       // Base currency
        PKR: 285,     // Conversion rate from USD to PKR (example)
    };

    // Function to update prices
    function updatePrices(currency) {
        const elements = document.querySelectorAll('.woocommerce-Price-amount, p, label, .options-wrapper li label, .brxe-ltoycd brxe-text-basic');

        elements.forEach(element => {
            let priceText = element.innerText || element.textContent;

            // Skip non-price elements like "25% OFF"
            if (priceText.includes('% OFF')) return;

            // Match prices with currency symbols or numbers
            let matches = priceText.match(/(\$|€|₹|\d+(\.\d{1,2})?)/g);  // Match currency symbols and prices
            
            if (matches) {
                matches.forEach(match => {
                    // Remove the currency symbol and parse the number
                    let price = parseFloat(match.replace(/[^\d.-]/g, ''));

                    // If a valid price is found
                    if (!isNaN(price)) {
                        // Convert the price
                        let convertedPrice = price * conversionRates[currency];

                        // Format the price back with the appropriate currency symbol
                        let formattedPrice;
                        if (currency === 'USD') {
                            formattedPrice = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(convertedPrice);
                        } else if (currency === 'PKR') {
                            formattedPrice = `PKR ${new Intl.NumberFormat('en-IN').format(convertedPrice)}`; // Use Indian locale for PKR formatting
                        }

                        // Remove the existing currency symbol to avoid duplication
                        element.innerHTML = element.innerHTML.replace(match, formattedPrice);
                    }
                });
            }
        });
    }

    // Reload page when the currency changes
    currencySelect.addEventListener('change', function() {
        let selectedCurrency = currencySelect.value;
        localStorage.setItem('selectedCurrency', selectedCurrency); // Store the selected currency

        // Reload the page to properly reapply the conversion with the selected currency
        window.location.reload();
    });

    // Load the currency from localStorage
    const storedCurrency = localStorage.getItem('selectedCurrency') || 'USD';
    currencySelect.value = storedCurrency;
    updatePrices(storedCurrency);  // Apply the selected currency after reload
});

Shared Hosting Page

Shared Hosting

Shared Web Hosting Made Easy, Reliable and Affordable

Choose Your Hosting Plan

Server-copy-shared

Web Hosting

Lorem ipsum dolor sit amet, conse labore adipiscing elit.

500 GB Disk Space Unlimited Bandwidth Daily Backups Free SSL certificate Free domain included 24/7 Live Support

Starting at:

$29/mo

Order Now Server-copy-shared

Web Hosting

Lorem ipsum dolor sit amet, conse labore adipiscing elit.

500 GB Disk Space Unlimited Bandwidth Daily Backups Free SSL certificate Free domain included 24/7 Live Support

Starting at:

$29/mo

Order Now Server-copy-shared

Web Hosting

Lorem ipsum dolor sit amet, conse labore adipiscing elit.

500 GB Disk Space Unlimited Bandwidth Daily Backups Free SSL certificate Free domain included 24/7 Live Support

Starting at:

$29/mo

Order Now Server-copy-shared

Web Hosting

Lorem ipsum dolor sit amet, conse labore adipiscing elit.

500 GB Disk Space Unlimited Bandwidth Daily Backups Free SSL certificate Free domain included 24/7 Live Support

Starting at:

$29/mo

Order Now

Included In All Hosting Plans

Newtork Security

Fastest Server

Email Accounts

Cloud Technology

SpeedHost Features

The best Hosting features you need in one convenient place.

icon-section-4

Maximum Performance

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

icon-section-4

Maximum Performance

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

icon-section-4

Maximum Performance

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

icon-section-4

Maximum Performance

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Why Choose SpeedHost?

Privacy and Security

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Your Business Online

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Customer Service

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Frequently Asked Questions