Skip to content

Commit e6d9de7

Browse files
authored
Merge pull request #32 from cortex-cms/topic/EM-1658/Buy-Box-Widget
EM-1658: Buy Box Widget
2 parents 520c664 + 3825c23 commit e6d9de7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/cortex/snippets/webpage.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,15 @@ def accordion_group_widget_data
7474
def accordion_group_widget_data_for(section_name)
7575
accordion_group_widget_data&.[](section_name) || []
7676
end
77-
77+
7878
def charts_widget_data
7979
JSON.parse(@webpage[:charts_widget_json] || 'null', quirks_mode: true)
8080
end
8181

82+
def buy_box_widget_data
83+
JSON.parse(@webpage[:buy_box_widget_json] || 'null', quirks_mode: true)
84+
end
85+
8286
def charts_widget_data_for(section_name)
8387
charts_widget_data&.[](section_name) || {}
8488
end

0 commit comments

Comments
 (0)