When click on try it on catalog item instead of order now, Submit button should be displayed

1_DipikaD
Kilo Sage

Hi All,

I have a catalog item when I click on try it it shows order now,add to cart , quantity etc. But my requirement is on try it page instead of all these options only Submit button should be displayed. So for this I also tried below  catalog client script which is in 1st reply but it is not working as expected.

 

Also trying to display this catalog item on custom portal , how can I achieve these 2 requirements.

Plz reply asap.

 

 

@Sandeep Rajput @Ravi Gaurav @Dr Atul G- LNG @Mark Manders @Ankur Bawiskar @Community Alums 

1 ACCEPTED SOLUTION

1_DipikaD
Kilo Sage

To achieve this I wrote below catalog client script(onload):-

 

function onLoad() {
    // Change the 'Order Now' button label to 'Submit'
    var orderNowButton = document.querySelector("button.btn-primary");
    if (orderNowButton) {
        orderNowButton.innerHTML = "Submit";
        document.getElementById("oi_add_to_cart_button").style.display = "none";
        document.getElementById("sc_cart_item_list").style.display = "none";
    }
}

View solution in original post

9 REPLIES 9

Yes I have tried it . It only works on portal page but does not work on Try it page .

 

Hope you got my point.

 

1_DipikaD
Kilo Sage

# want to configure it on Try it  page not in portal.

1_DipikaD
Kilo Sage

I got solution to achieve this .

 

Thank you for your replies and meaningful questions which always helps me to find out best solutions.

@1_DipikaD Could you post the solution here, as it will help others.

1_DipikaD
Kilo Sage

To achieve this I wrote below catalog client script(onload):-

 

function onLoad() {
    // Change the 'Order Now' button label to 'Submit'
    var orderNowButton = document.querySelector("button.btn-primary");
    if (orderNowButton) {
        orderNowButton.innerHTML = "Submit";
        document.getElementById("oi_add_to_cart_button").style.display = "none";
        document.getElementById("sc_cart_item_list").style.display = "none";
    }
}