Version Notes
Plugin corresponds to version 6.0.2 of the Bazaarvoice platform
Download this release
Release Info
Developer | BV DTS |
Extension | Bazaarvoice_Connector |
Version | 6.0.4 |
Comparing to | |
See all releases |
Code changes from version 6.0.3 to 6.0.4
- app/code/local/Bazaarvoice/Connector/Block/Questions.php +63 -0
- app/code/local/Bazaarvoice/Connector/Block/Reviews.php +2 -2
- app/code/local/Bazaarvoice/Connector/Model/ProductFeed/Product.php +2 -2
- app/code/local/Bazaarvoice/Connector/etc/config.xml +1 -1
- app/design/frontend/enterprise/default/layout/bazaarvoice.xml +2 -2
- app/design/frontend/enterprise/default/template/bazaarvoice/display/qa/questions.phtml +6 -5
- package.xml +4 -4
app/code/local/Bazaarvoice/Connector/Block/Questions.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once('Bazaarvoice/bvseosdk.php');
|
4 |
+
|
5 |
+
class Bazaarvoice_Connector_Block_Questions extends Mage_Core_Block_Template
|
6 |
+
{
|
7 |
+
|
8 |
+
private $_isEnabled;
|
9 |
+
|
10 |
+
public function _construct()
|
11 |
+
{
|
12 |
+
// enabled/disabled in admin
|
13 |
+
$this->_isEnabled = Mage::getStoreConfig('bazaarvoice/qa/enable_qa') === '1'
|
14 |
+
&& Mage::getStoreConfig('bazaarvoice/general/enable_bv') === '1';
|
15 |
+
}
|
16 |
+
|
17 |
+
/**
|
18 |
+
* returns true if feature is enabled in admin, otherwise returns false
|
19 |
+
* @return bool
|
20 |
+
*/
|
21 |
+
public function getIsEnabled()
|
22 |
+
{
|
23 |
+
return $this->_isEnabled;
|
24 |
+
}
|
25 |
+
|
26 |
+
public function getSEOContent()
|
27 |
+
{
|
28 |
+
$seoContent = '';
|
29 |
+
if(Mage::getStoreConfig('bazaarvoice/general/enable_cloud_seo') === '1' && $this->getIsEnabled()) {
|
30 |
+
// Check if admin has configured a legacy display code
|
31 |
+
if(strlen(Mage::getStoreConfig('bazaarvoice/bv_config/display_code'))) {
|
32 |
+
$deploymentZoneId =
|
33 |
+
Mage::getStoreConfig('bazaarvoice/bv_config/display_code') .
|
34 |
+
'-' . Mage::getStoreConfig('bazaarvoice/general/locale');
|
35 |
+
}
|
36 |
+
else {
|
37 |
+
$deploymentZoneId =
|
38 |
+
str_replace(' ', '_', Mage::getStoreConfig('bazaarvoice/general/deployment_zone')) .
|
39 |
+
'-' . Mage::getStoreConfig('bazaarvoice/general/locale');
|
40 |
+
}
|
41 |
+
$bv = new BV(array(
|
42 |
+
'deployment_zone_id' => $deploymentZoneId, // replace with your display code (BV provided)
|
43 |
+
'product_id' => Mage::helper('bazaarvoice')->getProductId(Mage::registry('current_product')), // replace with product id
|
44 |
+
'cloud_key' => Mage::getStoreConfig('bazaarvoice/general/cloud_seo_key'), // BV provided value
|
45 |
+
'staging' => (Mage::getStoreConfig('bazaarvoice/general/environment') == "staging" ? TRUE : FALSE)
|
46 |
+
));
|
47 |
+
$seoContent = $bv->questions->renderSeo();
|
48 |
+
}
|
49 |
+
|
50 |
+
return $seoContent;
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Retrieve block cache tags based on category
|
55 |
+
*
|
56 |
+
* @return array
|
57 |
+
*/
|
58 |
+
public function getCacheTags()
|
59 |
+
{
|
60 |
+
return array_merge(parent::getCacheTags(), Mage::registry('current_product')->getCacheIdTags());
|
61 |
+
}
|
62 |
+
|
63 |
+
}
|
app/code/local/Bazaarvoice/Connector/Block/Reviews.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
|
5 |
class Bazaarvoice_Connector_Block_Reviews extends Mage_Core_Block_Template
|
6 |
{
|
@@ -42,7 +42,7 @@ class Bazaarvoice_Connector_Block_Reviews extends Mage_Core_Block_Template
|
|
42 |
'deployment_zone_id' => $deploymentZoneId, // replace with your display code (BV provided)
|
43 |
'product_id' => Mage::helper('bazaarvoice')->getProductId(Mage::registry('current_product')), // replace with product id
|
44 |
'cloud_key' => Mage::getStoreConfig('bazaarvoice/general/cloud_seo_key'), // BV provided value
|
45 |
-
'staging' => TRUE
|
46 |
));
|
47 |
$seoContent = $bv->reviews->renderSeo();
|
48 |
}
|
1 |
<?php
|
2 |
|
3 |
+
require_once('Bazaarvoice/bvseosdk.php');
|
4 |
|
5 |
class Bazaarvoice_Connector_Block_Reviews extends Mage_Core_Block_Template
|
6 |
{
|
42 |
'deployment_zone_id' => $deploymentZoneId, // replace with your display code (BV provided)
|
43 |
'product_id' => Mage::helper('bazaarvoice')->getProductId(Mage::registry('current_product')), // replace with product id
|
44 |
'cloud_key' => Mage::getStoreConfig('bazaarvoice/general/cloud_seo_key'), // BV provided value
|
45 |
+
'staging' => (Mage::getStoreConfig('bazaarvoice/general/environment') == "staging" ? TRUE : FALSE)
|
46 |
));
|
47 |
$seoContent = $bv->reviews->renderSeo();
|
48 |
}
|
app/code/local/Bazaarvoice/Connector/Model/ProductFeed/Product.php
CHANGED
@@ -259,14 +259,14 @@ class Bazaarvoice_Connector_Model_ProductFeed_Product extends Mage_Core_Model_Ab
|
|
259 |
$ioObject->streamWrite(" <Names>\n");
|
260 |
foreach ($productsByLocale as $curLocale => $curProduct) {
|
261 |
$ioObject->streamWrite(' <Name locale="' . $curLocale . '"><![CDATA[' .
|
262 |
-
htmlspecialchars($
|
263 |
}
|
264 |
$ioObject->streamWrite(" </Names>\n");
|
265 |
// Write out localized <Descriptions>
|
266 |
$ioObject->streamWrite(" <Descriptions>\n");
|
267 |
foreach ($productsByLocale as $curLocale => $curProduct) {
|
268 |
$ioObject->streamWrite(' <Description locale="' . $curLocale . '"><![CDATA[' .
|
269 |
-
htmlspecialchars($
|
270 |
}
|
271 |
$ioObject->streamWrite(" </Descriptions>\n");
|
272 |
// Write out localized <ProductPageUrls>
|
259 |
$ioObject->streamWrite(" <Names>\n");
|
260 |
foreach ($productsByLocale as $curLocale => $curProduct) {
|
261 |
$ioObject->streamWrite(' <Name locale="' . $curLocale . '"><![CDATA[' .
|
262 |
+
htmlspecialchars($curProduct->getData('name'), ENT_QUOTES, 'UTF-8') . "]]></Name>\n");
|
263 |
}
|
264 |
$ioObject->streamWrite(" </Names>\n");
|
265 |
// Write out localized <Descriptions>
|
266 |
$ioObject->streamWrite(" <Descriptions>\n");
|
267 |
foreach ($productsByLocale as $curLocale => $curProduct) {
|
268 |
$ioObject->streamWrite(' <Description locale="' . $curLocale . '"><![CDATA[' .
|
269 |
+
htmlspecialchars($curProduct->getData('short_description'), ENT_QUOTES, 'UTF-8') . "]]></Description>\n");
|
270 |
}
|
271 |
$ioObject->streamWrite(" </Descriptions>\n");
|
272 |
// Write out localized <ProductPageUrls>
|
app/code/local/Bazaarvoice/Connector/etc/config.xml
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
<config>
|
9 |
<modules>
|
10 |
<Bazaarvoice_Connector>
|
11 |
-
<version>6.0.
|
12 |
<depends>
|
13 |
<!-- no dependencies -->
|
14 |
</depends>
|
8 |
<config>
|
9 |
<modules>
|
10 |
<Bazaarvoice_Connector>
|
11 |
+
<version>6.0.4</version>
|
12 |
<depends>
|
13 |
<!-- no dependencies -->
|
14 |
</depends>
|
app/design/frontend/enterprise/default/layout/bazaarvoice.xml
CHANGED
@@ -38,7 +38,7 @@
|
|
38 |
<block type="bazaarvoice/reviews" name="reviews" as="bv_reviews" template="bazaarvoice/display/rr/reviews.phtml" />
|
39 |
|
40 |
<block type="bazaarvoice/bazaarvoice" name="questionsummary" as="bv_questionsummary" template="bazaarvoice/display/qa/questionsummary.phtml" />
|
41 |
-
<block type="bazaarvoice/
|
42 |
</reference>
|
43 |
</reference>
|
44 |
</catalog_product_view>
|
@@ -128,4 +128,4 @@
|
|
128 |
</reference>
|
129 |
</checkout_onepage_success>
|
130 |
|
131 |
-
</layout>
|
38 |
<block type="bazaarvoice/reviews" name="reviews" as="bv_reviews" template="bazaarvoice/display/rr/reviews.phtml" />
|
39 |
|
40 |
<block type="bazaarvoice/bazaarvoice" name="questionsummary" as="bv_questionsummary" template="bazaarvoice/display/qa/questionsummary.phtml" />
|
41 |
+
<block type="bazaarvoice/questions" name="questions" as="bv_questions" template="bazaarvoice/display/qa/questions.phtml" />
|
42 |
</reference>
|
43 |
</reference>
|
44 |
</catalog_product_view>
|
128 |
</reference>
|
129 |
</checkout_onepage_success>
|
130 |
|
131 |
+
</layout>
|
app/design/frontend/enterprise/default/template/bazaarvoice/display/qa/questions.phtml
CHANGED
@@ -1,15 +1,16 @@
|
|
1 |
<?php if(Mage::getStoreConfig("bazaarvoice/general/enable_bv") === "1"): ?>
|
2 |
<?php
|
3 |
$doShowContentJs = Mage::getStoreConfig('bazaarvoice/qa/do_show_content_js');
|
|
|
4 |
?>
|
5 |
-
|
6 |
-
|
|
|
7 |
<script type="text/javascript">
|
8 |
$BV.ui( 'qa', 'show_questions', {
|
9 |
doShowContent : function () {
|
10 |
<?php echo $doShowContentJs ?>
|
11 |
}
|
12 |
-
});
|
13 |
</script>
|
14 |
-
<?php endif; ?>
|
15 |
-
<?php endif; ?>
|
1 |
<?php if(Mage::getStoreConfig("bazaarvoice/general/enable_bv") === "1"): ?>
|
2 |
<?php
|
3 |
$doShowContentJs = Mage::getStoreConfig('bazaarvoice/qa/do_show_content_js');
|
4 |
+
$seoContent = $this->getSEOContent();
|
5 |
?>
|
6 |
+
<div id="BVQAContainer">
|
7 |
+
<?php echo $seoContent ?>
|
8 |
+
</div>
|
9 |
<script type="text/javascript">
|
10 |
$BV.ui( 'qa', 'show_questions', {
|
11 |
doShowContent : function () {
|
12 |
<?php echo $doShowContentJs ?>
|
13 |
}
|
14 |
+
});
|
15 |
</script>
|
16 |
+
<?php endif; ?>
|
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Bazaarvoice_Connector</name>
|
4 |
-
<version>6.0.
|
5 |
<stability>stable</stability>
|
6 |
<license>Bazaarvoice, Inc.</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>See www.bazaarvoice.com for further details on our offerings</description>
|
11 |
<notes>Plugin corresponds to version 6.0.2 of the Bazaarvoice platform</notes>
|
12 |
<authors><author><name>BV DTS</name><user>bvdts</user><email>dts@bazaarvoice.com</email></author></authors>
|
13 |
-
<date>2014-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magelocal"><dir name="Bazaarvoice"><dir name="Connector"><dir name="Block"><file name="Bazaarvoice.php" hash="473e92e58fd86c823fb55765ed473414"/><file name="Ratings.php" hash="6822db584f2ee777beb8d39c662e8465"/><file name="Reviews.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Bazaarvoice_Connector</name>
|
4 |
+
<version>6.0.4</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>Bazaarvoice, Inc.</license>
|
7 |
<channel>community</channel>
|
10 |
<description>See www.bazaarvoice.com for further details on our offerings</description>
|
11 |
<notes>Plugin corresponds to version 6.0.2 of the Bazaarvoice platform</notes>
|
12 |
<authors><author><name>BV DTS</name><user>bvdts</user><email>dts@bazaarvoice.com</email></author></authors>
|
13 |
+
<date>2014-04-16</date>
|
14 |
+
<time>18:16:19</time>
|
15 |
+
<contents><target name="magelocal"><dir name="Bazaarvoice"><dir name="Connector"><dir name="Block"><file name="Bazaarvoice.php" hash="473e92e58fd86c823fb55765ed473414"/><file name="Questions.php" hash="04a7302c66539d17fac4f75b13b2ff2a"/><file name="Ratings.php" hash="6822db584f2ee777beb8d39c662e8465"/><file name="Reviews.php" hash="3eb82792967e70e5fed975521c5b5ceb"/><dir name="Roi"><file name="Beacon.php" hash="060af59693b1471a98e6b065bad6d93d"/></dir><file name="Submissioncontainer.php" hash="23d04ee9ece011d107bb8b914653a24d"/></dir><dir name="Helper"><file name="Data.php" hash="e088fc56bc227516c34e8614ac572ba2"/></dir><dir name="Model"><file name="ExportProductFeed.php" hash="c118c7b0b6a9c2e2dee9554db2b54b8e"/><file name="ExportPurchaseFeed.php" hash="8d9400ea078aa22e162b9265542ec1bf"/><dir name="Mysql4"><file name="Setup.php" hash="884c886c1e9fa395f05e7872ba6478a2"/></dir><dir name="ProductFeed"><file name="Brand.php" hash="b2ab72e79d7e3afe23b38bc3b64ba115"/><file name="Category.php" hash="c08fe52655879ca6d47caed30c657d7d"/><file name="Product.php" hash="f07b25ac8b3226ac51bfacf90e98e9b7"/></dir><file name="RetrieveInlineRatingsFeed.php" hash="d9b5548838a43917de916dbd5266b48a"/><file name="RetrieveSmartSEOPackage.php" hash="eab3badfb13d16965d280ca13109abe6"/><dir name="Source"><file name="AuthenticationMethod.php" hash="582d6c76372bac64728e6e4d68f959e4"/><file name="Environment.php" hash="1e575c9adb480df80e4a8a917960bd55"/><file name="FeedGenerationScope.php" hash="b2450e4c0c69b0da328f1d0d7d67012a"/><file name="TriggeringEvent.php" hash="fa47f3a2fcec92d9603f21541c853035"/></dir></dir><dir name="controllers"><file name="FeedController.php" hash="933a1555d97ac2cec8ea52306cf63102"/><file name="IndexController.php" hash="16b9a353153d40ebc32e759112ca6d6f"/></dir><dir name="etc"><file name="adminhtml.xml" hash="39cf8642bfc219709849618519a1c767"/><file name="config.xml" hash="bbc603fb7f966ee82f1cf92755329690"/><file name="system.xml" hash="4ab043c44acad63a53bd9f47d3825fae"/></dir><dir name="sql"><dir name="bazaarvoice_setup"><file name="mysql4-install-0.1.0.php" hash="d721fefe4be8cee31e6bd25b8252dca6"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Bazaarvoice_Connector.xml" hash="c517b52d29fec93a83a8010451368ee1"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="enterprise"><dir name="default"><dir name="template"><dir name="bazaarvoice"><dir name="display"><file name="headerincludes.phtml" hash="0faf96303bfe38e1c4130dfdbaff9c87"/><file name="headerproduct.phtml" hash="0d468a860f9d5ad8ae03c77e04c6089c"/><dir name="qa"><file name="questions.phtml" hash="b5c186576e9c20cd764860ad08702349"/><file name="questionsummary.phtml" hash="c6044994c1d355730d7e5cfd3a6e3125"/></dir><dir name="rr"><file name="ratings.phtml" hash="56047515b347d0250d44e4e2eb0a923c"/><file name="reviews.phtml" hash="7d2ad8b18910010d22240c9521131290"/><file name="reviewsummary.phtml" hash="75e823088dd75387fc94e6028d8236a5"/></dir></dir><dir name="submit"><file name="roi_beacon.phtml" hash="494b9a44ceb14b1f376611d30ac18645"/><file name="submissioncontainer.phtml" hash="3f3f22b922c1aa5b87f7bbf4fbeea51c"/></dir></dir></dir><dir name="layout"><file name="bazaarvoice.xml" hash="e8d6c4a2ca62a21ddac1cd22e1ee8ad0"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><file name="bazaarvoice_notification.html" hash="9a0e90ac62d926dad4db13719f3c8b73"/></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="bazaarvoice"><file name="rating-0_0.gif" hash="f50bd3f45f69a753614b2e76f53bdafc"/><file name="rating-1_0.gif" hash="c691e11e3250a18939aec523734d9b67"/><file name="rating-1_1.gif" hash="26377f1337bb6fb9e340292243a6f780"/><file name="rating-1_2.gif" hash="5c51583dc52d901c61d9470d5faeb2a4"/><file name="rating-1_3.gif" hash="3948c716d18ea0389ce9e57c347e7b6d"/><file name="rating-1_4.gif" hash="2211d8586bda467cb8fcc617670b94df"/><file name="rating-1_5.gif" hash="3fa9480c8b86f85749147fa0e8144b05"/><file name="rating-1_6.gif" hash="a577c79e7ea0c6c59ac15251c39de515"/><file name="rating-1_7.gif" hash="b5b52fa267632eda6ba5b3be56319397"/><file name="rating-1_8.gif" hash="205170e1ffbfcc81569286a9e1a88eb5"/><file name="rating-1_9.gif" hash="63709f7b2a2e2f14ae442dbef6513f25"/><file name="rating-2_0.gif" hash="4eec2468b5e41dc03d198ed6fe084a53"/><file name="rating-2_1.gif" hash="155cab7b16f4cfef3e94b99ca297cedc"/><file name="rating-2_2.gif" hash="2e2dc606fd83853bdf90a3beb901cf3e"/><file name="rating-2_3.gif" hash="638632f37a750558722c0bf1a79f2546"/><file name="rating-2_4.gif" hash="6b0a85c21066c6402b9f8914284b999f"/><file name="rating-2_5.gif" hash="c4792dac3b9d5a914a72a4200f931c6e"/><file name="rating-2_6.gif" hash="1c7ac3f4e3721d4779721973cfaaa8db"/><file name="rating-2_7.gif" hash="21b680dce6ffef505532afea7fea1452"/><file name="rating-2_8.gif" hash="136ac6b284d1a2b9452a06eea993c1fa"/><file name="rating-2_9.gif" hash="d13af6920569aa85da6dfb0a139d560a"/><file name="rating-3_0.gif" hash="6b30e597cc23aec52dbd2be978d52351"/><file name="rating-3_1.gif" hash="cb544d168a949100fb5ee117adbd765b"/><file name="rating-3_2.gif" hash="75124c4b4dfc5cbcf5ae3ccfa7bdf906"/><file name="rating-3_3.gif" hash="0693b6a471361957da1dc8ee2e9af5ec"/><file name="rating-3_4.gif" hash="1a6e3cff41a61e1bbed9296badb94392"/><file name="rating-3_5.gif" hash="7f63ecf505414386267fad2e92617a9f"/><file name="rating-3_6.gif" hash="8b9b9ccebc3537cffd2bed75c60eaa9e"/><file name="rating-3_7.gif" hash="7f83f3996a738d1fd6763204cd964376"/><file name="rating-3_8.gif" hash="219a1f2dbd45bcb58a58f460c9491bbf"/><file name="rating-3_9.gif" hash="e4114607ca469db2fd5f87ac21c4f00a"/><file name="rating-4_0.gif" hash="a15541525186bf6911202e0f64daa4a6"/><file name="rating-4_1.gif" hash="818971c067beb397247095f5eedbac29"/><file name="rating-4_2.gif" hash="5b9599176771adfbf8c52c7dfa04e565"/><file name="rating-4_3.gif" hash="18dc68db736819e17ab5cf0d5725d99c"/><file name="rating-4_4.gif" hash="56b124f1a2e599918b462ce29cd1cd96"/><file name="rating-4_5.gif" hash="2044f11b1f7005f66f14219c5fce1020"/><file name="rating-4_6.gif" hash="3166f044e7f73f9b3e75bda4507eaa35"/><file name="rating-4_7.gif" hash="20546d3ebee7a364927e9da9274996a7"/><file name="rating-4_8.gif" hash="9dab0f19785d1592a96c5c295842f308"/><file name="rating-4_9.gif" hash="19a47143b04aceae85def246059fba33"/><file name="rating-5_0.gif" hash="e43b403663785255d2f023ca35566ac3"/></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="Bazaarvoice"><file name="bvseosdk.php" hash="01c63530a4b80a7a70555b5005a4ba5c"/></dir></target><target name="mageweb"><dir name="shell"><file name="bv_export_order_feed.php" hash="309995ede2f85d95a0b91d8845c06ae5"/><file name="bv_export_product_feed.php" hash="1696c363c97bf9943560045b297c98fb"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|