spree_static_content icon indicating copy to clipboard operation
spree_static_content copied to clipboard

Promotion Landing Pages

Open Janther opened this issue 10 years ago • 1 comments

Perhaps Spree::StaticContentController could fire the Spree::PromotionHandler::Page#activate, in a similar way as Spree::ContentController,this way static content pages could work as promotion landing pages.

class Spree::StaticContentController < Spree::StoreController
  after_action :fire_visited_path, only: :show

  def fire_visited_path
    Spree::PromotionHandler::Page.new(current_order, params[:path]).activate
  end
end

Janther avatar Dec 16 '14 14:12 Janther

Or maybe this behaviour should be added using a decorator?

Janther avatar Dec 16 '14 17:12 Janther