This is the respective issue as https://www.drupal.org/project/drupal/issues/2245767, and would be a good addition to the features of our layouts system.
Problem/Motivation
Some blocks, like user login, should be shown on 403/404 response pages. Others, like the help block, should not.
Proposed resolution
Add a visibility setting to blocks that restricts visibility to any combination of 200/403/404 responses. Default this to show the block for all responses.
Perhaps in our case it also makes sense to add that visibility conditions to the layouts (besides blocks), so that if people really have the need for it, they can configure a different layout to be used based on response.
Recent comments
Thanks Alejandro. That was the clues I needed.
Ubercart - Programmatically add product to cart and straight to Checkout
Have you tried uc_cart_add_item()? You need to provide the nid of the product. Then you can use backdrop_goto('cart/checkout'); to send the user to the checkout screen. uc_cart_add_item...
Ubercart - Programmatically add product to cart and straight to Checkout
No problem, let's see how it evolves. I'd be happy to provide a suggested version if i could. I will keep that in mind and try learn this hook chain hopefully very soon. I will...
File hashing uploads made through TinyMCE