Funnelish™ Community

How can i hide select products on checkout page?

hi, im trying to test different prices for the same product so i want to be able to show/hide some SKU options on the checkout page

i was wondering if there is some custom code i can inject into the checkout page in order to make this happen



Hi @m123,
Please go ahead to Custom codes > custom JS (Body), and paste this custom JS code:

    // index of products to be hidden (1 is the first).
    let productsIndices = [1,3];
    productsIndices.forEach(p => {
        document.querySelectorAll('.pl-items .pl-item')[p-1].style.display = 'none'; 

Ps: [1,3] are the indices of the products the script is going to hide, feel free to edit them however you see fit.

Let us know how it goes.

Fey @Funnelish.