multicurrency – instead of Currency convertor, want to set fixed price set to price to Products in Magento 2

I have Magento 2 setup, having one website and 2 stores. I want 5 different currencies in my store. Instead of using the Magento currency converter, I want to set a fixed price for all different currencies.
i.e.
Product one has 5 currencies attributes (Price_KWD, Price_BHS, Price_US, Price_OMR, Price_AED, Price_QAR). If I change the currency from Price_KWD to Price_BHS, then it will show the value Price_BHS

Product Price_KWD =10
Product Price_BHS=20

On conversion, It should show 20 with a currency symbol.
see URL for reference http://autoone.viewmysitenow.com/

magento2 – Category Products – Sort By Newest

Since upgrading to Magento 2.4x and having to use ElasticSearch as default, I am unable to find a way to sort category products by newest (created_at).
I have tried enabling used_in_sort_by for created_at but it does not order products corretly.
I am using the following to sort products –

                case 'new_arrivals':
                $this->_collection
                ->getSelect()
                ->order('e.entity_id '. $this->getCurrentDirection());
                break;

I can get price and name sorting to work fine but sort by created_at does not. I’ve also tried sort by entity_id which does not work also.

What Are All Google Products..?

 

Buzz-worthy news: Products Reseller 50% OFF & cPanel research | Proxies-free

1. Kayako For WHMCS v1.1.0

Whenever we spot the opportunity to strengthen the relationship between you and your clients, we take it. Filled with pride, we now present you Kayako For WHMCS v1.1.0 developed to accomplish this goal to the fullest!

This powerful release will foster the process of communicating with your customers by allowing you to display in your WHMCS tickets any default and custom fields that previously have been defined in the Kayako panel. What is more, the update introduces full-blown WHMCS V8.0 support!

Deliver freshness into the management of your client base with Kayako For WHMCS v1.1.0!

2. Save 50% on Products Reseller For WHMCS

Products Reseller For WHMCS is one of our best-selling modules we would like to interest you in now more than ever for a few important reasons:

  • This product is second to none when it comes to managing reseller groups as well as orders place by end-clients.
  • Since the latest update to 1.0.3 version, Products Reseller For WHMCS boasts perfect compatibility with WHMCS V8.0.
    And now the best part:
  • The module is now available at a colossal discount up to 50%, meaning you can pay even $100 less for it!

If this general outline of key benefits that accrue from using Products Reseller For WHMCS awakened your curiosity for more details, contact us to unlock our exclusive offer in full!

Get in touch with our Pre-Sales teams!

3. 60-Second Survey on cPanel Experience

Are you among cPanel users who have already claimed their 10% promo code?

If not, it may be your last opportunity to join them! All you need to do is let us know where you stand amid cPanel’s controversy fueled by the recently introduced price increase. What options are you considering to reduce your running costs? Share your cPanel experience via our 60-second survey, and accept a personal 10% discount for all ModulesGarden modules as a well-earned reward for your valuable input.

Speak your mind and reap the reward!

4. Straight Talk of WHMCS V8.0

Whether you have updated your WHMCS system to the widely discussed 8.0 version or put this decision on hold for the time being, you probably already know how well it has been received by the business owners. However, are you eager to discover what software developers think about this milestone release?

Look into our latest Blog publication to explore our very own, insightful elaboration on the qualities of WHMCS V8.0, and be the first to find out what the future holds for our WHMCS offerings!

Head over straight to the full disclosure!

Need Custom Software Development For Your Business?

Specially for you we will adapt an application and its design to your own needs, create a new module or even a completely new system built from scratch!

algorithms – Partition a set of factors so that the difference between products is minimized

I’m sure this problem must be well-known…

Given a collection $S$ of numbers, partition them into exactly two sub-collections, $A$ and $B$ (I mean, by definition $B$ is just $S-A$) such that the difference of products
$$
Delta = left|left(prod_{xin B}xright) – left(prod_{xin A}xright)right|
$$

is as small as possible.

If it helps, you can assume that all the members of $S$ are integers, and in fact you can assume that they are all prime! In my particular use-case, we’re trying to split some big integer $n$ into its “squarest possible” pair of factors, and $S$ is simply a prime factorization of $n$ which we happen to have lying around.

What’s the best way to do this? The brutish ways I have thought of are:

  • Trial division (assuming everything is prime). Awful performance.
    int PS = productOf(S);
    for (int PA = sqrt(PS); PA >= 1; --PA) {
        if (PS % PA == 0) {
            int PB = PS / PA;
            return { factorsOf(PA), factorsOf(PB) };
        }
    }
  • Search all the possible partitions. Would give better performance, I think, because $lvert Srvert! ll prod{S}$, but still “obviously” a dumb algorithm.
    int currentDiff = productOf(S);
    intset currentA = {};
    for (intset A in partitionsOf(S)) {
        int PA = productOf(A);
        int PB = productOf(S)/PA;
        if (PB >= PA && PB-PA < currentDiff) {
            currentA = A;
            currentDiff = PB-PA;
        }
    }
    return { currentA, S - currentA };

Is there any simple-ish algorithm to solve this problem without relying on brute exhaustive search?

I wonder if it would work to minimize the difference of sums $sum_{xin B}{log{x}} – sum_{xin A}{log{x}}$, and if that problem has a simpler known solution…

wp enqueue script – How to add image zoom on archive products page?

What I am trying to achieve is to have the gallery zoom enqueued into my products archive page, not just in the single product page.

This is how far I have gotten so far. It supposed to work, but it doesn’t.

In my functions.php first I have the gallery zoom enabled.

add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );

And then I am enqueuing into my archives.


function gallery_scripts() {
    if ( is_archive()) {
        if ( current_theme_supports( 'wc-product-gallery-zoom' ) ) {
            wp_enqueue_script( 'zoom' );
        }
        if ( current_theme_supports( 'wc-product-gallery-slider' ) ) {
            wp_enqueue_script( 'flexslider' );
        }
        if ( current_theme_supports( 'wc-product-gallery-lightbox' ) ) {
            wp_enqueue_script( 'photoswipe-ui-default' );
            wp_enqueue_style( 'photoswipe-default-skin' );
            add_action( 'wp_footer', 'woocommerce_photoswipe' );
        }
        wp_enqueue_script( 'wc-single-product' );
    }
}

Custom field to show bilingual Title, Description for WooCommerce Products?

Is it a good idea to replace Title, Description fields with ACF(Advanced Custom Fields) to show alternate language for products of WooCommerce?

Since I am using Multivendor Storefront to enable vendors to input their own products, they do not have the access to the bilingual plugins that aid in inputting the both languages.

Now, showing Title and Description for English but showing TitleArabic and DescArabic from ACF sound a good idea? I think that would be a lot of work to do so. Like, customizing WooCommerce product, product list and maybe many other templates.

magento2 – How to reset the products grid filter don’t loading in the admin panel?

You can remove it from the database. I will provide examples using Magerun2.

1 – Admin user

Access your database and list the admin users, and find your admin user ID there.

magerun admin:user:list

2 – Find the data

Run this command below to enter into the DB.

magerun db:console

Then get the list of UI Bookmarks that you have saved in the DB using this command.

SELECT * FROM ui_bookmark;

3 – Remove it

Then remove the data saved to the product grid according to your admin user ID, my admin user ID is 3 so I ran these commands below.

DELETE FROM ui_bookmark WHERE user_id='3' AND namespace='product_listing';
DELETE FROM ui_bookmark WHERE user_id='3' AND namespace='product_attributes_grid';