Solved

Can you customise checkout liquid to hide delivery info on the order status page?

anton_nv
Shopify Partner
25 1 6

Hi there,

We are trying to add an estimated delivery to our checkout, which we have done successfully but we noticed that this info then appears on the order status page and we are just looking for a way to hide or update this info on the order status page.

I have tried using {% if page.url contains '/checkout/' or 'checkout' %} .... also consider the {% if template.... %} way but checkout isnt a template so I'm a bit stuck.

Is there a way to show this info at checkout but either hide or change this info on the order status page?
          

Accepted Solution (1)
Max11
Shopify Partner
76 4 36

This is an accepted solution.

Ah, I don't use Plus so I probably can't help you as well.

Additional scripts is only for the order status page (at least on normal shopify under Settings - Checkout - Additional Scripts).

I manipulate some of the content on the order status page by using css. You can use css pseudo-classes to place new content before or after objects you hide. People technically say you shouldn't use css for adding page content but sometimes I'm a rebel.

.object_i_don't_want {
display:none;
}

.object_i_don't_want::before {
color: RED;
content: "NEW CONTENT INSERTED";
}

View solution in original post

Replies 5 (5)

Max11
Shopify Partner
76 4 36

You don't have full access (unless you're Shopify Pluss) but you can manipulate the order status page by either adding a css selector that changes or hides content to your normal css template file or you can add html/liquid/css to the custom scripts section that can be found in your store settings under checkout.

anton_nv
Shopify Partner
25 1 6

I am on plus, so can access checkout.liquid its just that the /orders/ status page seems to pull in the checkout page .

Essentially the problem is that we provide an estimate at checkout , which is correct but then this date changes when the customer revisits the order status page as its increasing by X each day.
So either hiding or providing some different content is ideal.

I looked into the checkout additional scripts but then this would hide it from checkout and would still need a way of telling if its the checkout or status page (might be wrong here!)

Max11
Shopify Partner
76 4 36

This is an accepted solution.

Ah, I don't use Plus so I probably can't help you as well.

Additional scripts is only for the order status page (at least on normal shopify under Settings - Checkout - Additional Scripts).

I manipulate some of the content on the order status page by using css. You can use css pseudo-classes to place new content before or after objects you hide. People technically say you shouldn't use css for adding page content but sometimes I'm a rebel.

.object_i_don't_want {
display:none;
}

.object_i_don't_want::before {
color: RED;
content: "NEW CONTENT INSERTED";
}

anton_nv
Shopify Partner
25 1 6

Thanks buddy,

I was close - for some reason it didn't like the huge class name that was there.

Unfortunately what I'm trying to jam in there is a bunch of liquid to calculate dates + the html so ill see if CSS 'content' is up for a challenge 🙃

So dumb that we are on Plus and cant have access to everything easily. If the Order Stat page was actually a template/section/page then normal liquid rules would work but I guess most people arent fiddling as much as some.