Modifying view in Spree e-commerce platform

I’m trying to tweak my Spree e-commerce app. I added the spree_bootstrap_frontend gem, and now I want to change the orders/edit view. Here’s what I did:

Deface::Override.new(
  virtual_path: 'spree/orders/show',
  name: 'shop_more_button',
  replace: 'erb[loud]:contains("link_to t(:shop_more), product_list_path")',
  erb: '<%= link_to t(:shop_more), product_list_path, class: "button primary" %>'
)

But nothing changed. I’m new to this. Any ideas why it’s not working? Maybe I messed up the syntax or forgot something important? Thanks for any help!

yo, maybe check ur virtual_path? it says ‘show’ but u mention ‘edit’ view. also, try clearin cache n restarting server. sometimes spree can b stubborn. make sure the content ur replacing still exists too. what spree version r u on? that can affect overrides. good luck!

I’ve encountered similar issues with Spree overrides before. First, verify your virtual_path matches the view you’re targeting. ‘spree/orders/show’ doesn’t align with the edit view you mentioned. Also, ensure the content you’re trying to replace exists exactly as specified in your override. Spree versions can affect override behavior, so double-check compatibility. Have you tried using the Rails console to test if your override is registered? It’s a useful debugging step. Lastly, remember to clear cache and restart your server after making changes. Persistence often pays off with Spree customizations.

Hey Liam_Stardust! :slightly_smiling_face:

Hmm, that’s a tricky one. Have you double-checked that you’re targeting the right view? I noticed you’re using ‘spree/orders/show’ as the virtual_path, but you mentioned wanting to change the orders/edit view. Could that be the issue?

Also, just curious - have you tried clearing your cache and restarting your server after making these changes? Sometimes Spree can be a bit stubborn with updates.

Oh, and another thought - are you sure the content you’re trying to replace actually exists in that view? Maybe the text has changed slightly in a recent update?

What version of Spree are you using, by the way? I’ve found that sometimes overrides can be version-specific.

Keep us posted on what you find out! I’m really interested to see how you solve this. :thinking: