ruby-on-railsspreedeface

Change Spree commerce with Deface


I'm learning Spree because I want to create an ecommerce with it. I installed successfully Spree and now I would like to customize the standard spree template with deface. I'm trying to delete the table with "product-properties" id in the products page.

the table I want to delete is the one under "Properties" and has 3 rows: 'size', 'type' and 'material'

I've done this way, but it doesn't work:

Deface::Override.new(:virtual_path => 'spree/layouts/spree_application',
         :name => 'product_page',
         :remove => '#product-properties'
        )

I think the virtual path is wrong.


Solution

  • The template which contains #product-properties is:

    https://github.com/spree/spree/blob/v3.0.1/frontend/app/views/spree/products/_properties.html.erb

    so the virtual path you want is:

    spree/products/_properties