Skip to content

Commit

Permalink
Merge pull request #15 from trustpilot/update-to-1.0.230
Browse files Browse the repository at this point in the history
Update to 1.0.230
  • Loading branch information
vdabar committed Nov 20, 2018
2 parents 8314044 + 6f7f434 commit c80cc10
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
2 changes: 2 additions & 0 deletions Block/Trustbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ public function getTrustBoxConfig()
if ($current_product) {
$sku = $current_product->getSku();
$data['sku'] = $sku;
$name = $current_product->getName();
$data['name'] = $name;
}
return json_encode($data, JSON_HEX_APOS);
}
Expand Down
9 changes: 2 additions & 7 deletions Helper/OrderData.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,10 @@

class OrderData extends AbstractHelper
{
protected $_product;

public function __construct(
Product $product,
StoreManagerInterface $storeManager
) {
$this->_storeManager = $storeManager;
$this->_product = $product;
}

public function getName($order)
Expand Down Expand Up @@ -80,9 +76,8 @@ public function is_empty($var)
public function getProducts($order){
$products = [];
try {
$items = $order->getAllVisibleItems();
foreach ($items as $i) {
$product = $this->_product->load($i->getProductId());
foreach ($order->getAllVisibleItems() as $item) {
$product = $item->getProduct();
$brand = $product->getAttributeText('manufacturer');
array_push(
$products,
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "trustpilot/module-reviews",
"description": "The Trustpilot Review extension makes it simple and easy for merchants to collect reviews from their customers to power their marketing efforts, increase sales conversion, build their online reputation and draw business insights.",
"type": "magento2-module",
"version": "1.0.223",
"version": "1.0.230",
"license": [
"OSL-3.0"
],
Expand All @@ -12,4 +12,4 @@
"Trustpilot\\Reviews\\": ""
}
}
}
}
2 changes: 1 addition & 1 deletion etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<ConnectUrl>https://ecommerce-invitations.b2b.trustpilot.com/#/magento</ConnectUrl>
<SnippetUrl>https://businessapp.b2b.trustpilot.com/#/integrations/trustbox/library</SnippetUrl>
<PreviewUrl>//ecommplugins-scripts.trustpilot.com/</PreviewUrl>
<ReleaseNumber>1.0.222</ReleaseNumber>
<ReleaseNumber>1.0.230</ReleaseNumber>
<key></key>
</general>
</trustpilotGeneral>
Expand Down

0 comments on commit c80cc10

Please sign in to comment.