After many studies, I realized this.
There are two steps in this process. The first is to create a route that matches the route of the new product.
So, go into your .rb routes and in this section:
mount Spree::Core::Engine, :at => '/'
end
Add this line: get ':id/p' => 'spree/products#show'
So now it looks like this:
mount Spree::Core::Engine, :at => '/'
get ':id/p' => 'spree/products#show'
end
At this point, you can visit the product page with the new URL structure: /product-name-here/p
, , spree , - URL, . product_path, spree URL-. "spree", products_helper.rb
app/helpers/spree/products_helper.rb :
module Spree::ProductsHelper
def product_path(product)
"/#{product.permalink}/p"
end
end
. URL. , URL-, , .
:
, , ProductHelper , undefined: line_item_description_text
, , , :
def line_item_description_text (var)
""
end