Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master into 3-0-stable and fixed error when migrate DB. #1

Open
wants to merge 3 commits into
base: 3-0-stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions app/db/seeds.rb

This file was deleted.

4 changes: 4 additions & 0 deletions app/overrides/add_power_reviews_js_to_home.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Deface::Override.new(:virtual_path => 'spree/home/_topselling_products',
:name => 'add_power_reviews_js_to_home',
:insert_before => "div[data-hook='homepage_products']",
:partial => "spree/shared/powerreviews_engine_js")
4 changes: 4 additions & 0 deletions app/overrides/add_power_reviews_js_to_taxon.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Deface::Override.new(:virtual_path => 'spree/taxons/show',
:name => 'add_power_reviews_js_to_home',
:insert_before => "div[data-hook='taxon_products']",
:partial => "spree/shared/powerreviews_engine_js")
2 changes: 1 addition & 1 deletion app/overrides/add_power_reviews_snippet_to_product.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Deface::Override.new(:virtual_path => 'spree/products/show',
:name => 'add_power_reviews_snippet_to_product',
:insert_after => "div[data-hook='product_subtitle_main']",
:insert_before => "div[data-hook='product_subtitle_main']",
:partial => "spree/shared/powerreviews_product_snippet")
4 changes: 4 additions & 0 deletions app/overrides/add_power_reviews_snippet_to_product_list.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Deface::Override.new(:virtual_path => 'spree/home/_product',
:name => 'add_power_reviews_snippet_to_product_list',
:insert_after => "span[data-hook='product-title']",
:partial => "spree/shared/powerreviews_product_snippet")
4 changes: 4 additions & 0 deletions app/overrides/add_power_reviews_snippet_to_taxon.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Deface::Override.new(:virtual_path => 'spree/shared/_product',
:name => 'add_power_reviews_snippet_to_product_list',
:insert_after => "span[data-hook='product-title']",
:partial => "spree/shared/powerreviews_product_snippet")
2 changes: 1 addition & 1 deletion app/overrides/add_qa_to_product.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Deface::Override.new(:virtual_path => 'spree/products/show',
:name => 'add_qa_to_product',
:insert_before => "div[data-hook='description']",
:insert_after => "div[data-hook='product_directions']",
:partial => "spree/shared/powerreviews_product_qas")
52 changes: 50 additions & 2 deletions app/views/spree/shared/_powerreviews_product_qas.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

<div class="pr_review_summary" id="qa_summary_<%[email protected]_s%>">
<div id="qa" class="ui-tabs-panel ui-widget-content ui-corner-bottom" data-hook="product_qa">
</br>
<div class="pr_review_summary" style="display:none;" id="qa_summary_<%[email protected]_s%>">
<% #if ( pwr_config( :enterprise, product ) && product.review_set && !product.review_set_qa_inline_path.blank? && File.exists?( product.review_set_qa_inline_path ) )%>
<%#= File.read( product.review_set_qa_inline_path )%>
<%# end %>
Expand All @@ -17,3 +18,50 @@ POWERREVIEWS.display.productAnswers(q<%= @product.id.to_s %>, {
}
);
</script>

<!-- live chat box if possible-->

<div id="live_chat_div">
<div id="back_to_product" title="End Chat & Return to Store" style="
display:none;
margin-top: 314px;
z-index: 51;
position: absolute;
margin-left: 187px;
" onclick="closeIframe()"><a href="/c/condition/" style="color:#0169AB">End Chat & Return to Store </a></div>

<iframe id="chat_live_expert" style="border:0px;height:1px;width:580px;display:none"> </iframe>
</div>
<br/>
<script type="text/javascript">
function load_live_chat(){
if ($('.bcFloat').height()>30)
{
$('#chat_live_expert').css('height','330px');
//$('#chat_live_expert').attr('src','https://livechat.boldchat.com/aid/2298068183499916261/bc.chat?cwdid=4366147078973920363');

$('#chat_live_expert').attr('src','https://livechat.boldchat.com/aid/2298068183499916261/bc.chat?cwdid=4366147078973920363&amp;wdid=203850399395769927');

// $('#chat_live_expert').show();
$('#chat_live_expert').load(function(){
setTimeout(function(){$('#chat_live_expert').css('display', 'block')},2000); });
$('#qa .pr_review_summary').css('display', 'none');
}
else
$('#qa .pr_review_summary').css('display', 'block');
//$('#live_chat_div').html('<a style="color: #0169AB;font-size: 14px;font-weight: normal;" href="/meetexpert/1133?appName=askQuestion">Ask Paulina</a>')
}


function closeIframe() {
document.getElementById('chat_live_expert').style.display = 'none';

}

jQuery(document).ready(function(){
setTimeout(load_live_chat,500);

});

</script>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var pr_site_id = '2';

<% end -%>


<div id="reviews" class="ui-tabs-panel ui-widget-content ui-corner-bottom" data-hook="product_reviews">
<div itemprop="aggregateRating" class="forschema" style="display:none;"
itemscope itemtype="http://schema.org/AggregateRating">
Rated <span itemprop="ratingValue">4</span>/5
Expand All @@ -33,4 +33,5 @@ var pr_site_id = '2';
POWERREVIEWS.display.engine(r<%[email protected]_s%>, {"pr_snippet_min_reviews":1,"pr_write_review":"/products/<%[email protected]%>/review","pr_style_sheet":"/","pr_page_id":"<%[email protected]_s%>"});
//]]>
</script>
</div>

3 changes: 3 additions & 0 deletions app/views/spree/shared/_powerreviews_product_snippet.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<% @product||=product%>
<div class="pr_review_summary" id="review_summary_<%[email protected]_s%>">
<%#= File.read( product.review_set_inline_path ) if (product.review_set && !product.review_set_inline_path.blank? && File.exists?( product.review_set_inline_path ) )%>
</div>
<div class="rating"><div class="pr_snippet_category"><a href="#qa">Ask a Question</a></div></div>
<div class="clear"></div>
<script>
var rs<%[email protected]_s%>=$("#review_summary_<%[email protected]_s%>")
rs<%[email protected]_s%>.html('')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def self.up
end

def self.down
drop_table :product_power_reviews
drop_table :spree_review_sets
remove_column :spree_products, :review_set_id
end
end
4 changes: 2 additions & 2 deletions spree_power_reviews.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Gem::Specification.new do |s|
s.require_path = 'lib'
s.requirements << 'none'

version = '~> 3-0-stable'
s.add_dependency 'spree_core', version
version = '3-0-stable'
#s.add_dependency 'spree_core'
s.add_dependency 'zip-zip'

s.add_development_dependency 'capybara', '~> 2.4'
Expand Down