Skip to content

Commit

Permalink
Merge pull request #646 from bummzack/remove-og-methods
Browse files Browse the repository at this point in the history
Merged #646
  • Loading branch information
bummzack authored Apr 3, 2018
2 parents 1d24bf3 528875e commit 3925a6c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 31 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 49,6 @@
"silvershop/coloredvariations": "Select colours for variations",
"burnbright/silverstripe-shop-geocoding": "Geocoding support for addresses and visitors.",
"burnbright/silverstripe-shop-googleanalytics": "Records shop sales sales in google analytics.",
"tractorcow/silverstripe-opengraph": "Implementation of the Facebook Opengraph protocol for Silverstripe",
"markguinn/silverstripe-shop-ajax": "Basic ajax behaviours for add to cart, etc"
},
"extra": {
Expand Down
30 changes: 0 additions & 30 deletions src/Page/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 125,6 @@ class Product extends Page implements Buyable

private static $order_item = OrderItem::class;

private static $min_opengraph_img_size = 0;

// Physical Measurement
private static $weight_unit = 'kg';

Expand Down Expand Up @@ -469,34 467,6 @@ public function Image()
return null;
}

/**
* Integration with opengraph module
* TODO: Move this feature into a module
*
* @see https://github.com/tractorcow/silverstripe-opengraph
* @return string opengraph type
*/
public function getOGType()
{
return 'product';
}

/**
* Integration with the opengraph module
* TODO: Move this feature into a module
*
* @return string url of product image
*/
public function getOGImage()
{
if ($image = $this->Image()) {
$min = self::config()->min_opengraph_img_size;
$image = $min && $image->getWidth() < $min ? $image->setWidth($min) : $image;

return Director::absoluteURL($image->URL);
}
}

/**
* Link to add this product to cart.
*
Expand Down

0 comments on commit 3925a6c

Please sign in to comment.