Skip to content

Commit

Permalink
change support for ss4
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Anderson committed Oct 10, 2018
1 parent 6d44491 commit e12513b
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 6 deletions.
2 changes: 1 addition & 1 deletion _config/googlesitemaps.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
Name: googleshoppingfeed
---
GoogleShoppingFeed:
ilateral\SilverStripe\GoogleShoppingFeed\GoogleShoppingFeed:
enabled: true
google_notification_enabled: false
use_show_in_search: true
Expand Down
5 changes: 5 additions & 0 deletions src/.upgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mappings:
GoogleShoppingFeedExtension: ilateral\SilverStripe\GoogleShoppingFeed\extensions\GoogleShoppingFeedExtension
GoogleProductCategory: ilateral\SilverStripe\GoogleShoppingFeed\model\GoogleProductCategory
GoogleShoppingFeed: ilateral\SilverStripe\GoogleShoppingFeed\GoogleShoppingFeed
GoogleShoppingFeedController: ilateral\SilverStripe\GoogleShoppingFeed\controllers\GoogleShoppingFeedController
13 changes: 8 additions & 5 deletions code/GoogleShoppingFeed.php → src/GoogleShoppingFeed.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php

namespace ilateral\SilverStripe\GoogleShoppingFeed;

use SilverStripe\ORM\DataList;
use SilverStripe\ORM\ArrayList;
use SilverStripe\Core\Config\Config;
use SilverStripe\Versioned\Versioned;

/**
* Shopping Feeds are a way to tell Google about pages on your site that they might
* not otherwise discover. In its simplest terms, a XML Sitemap usually called
Expand Down Expand Up @@ -130,11 +138,6 @@ public static function get_items()
$filter = array();

// todo migrate to extension hook or DI point for other modules to
// modify state filters
if (class_exists('Translatable')) {
Translatable::disable_locale_filter();
}

foreach (self::$dataobjects as $class) {
if ($class == "SiteTree") {
$search_filter = ($search_filter) ? "\"ShowInSearch\" = 1" : "";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<?php

namespace ilateral\SilverStripe\GoogleShoppingFeed\controllers;

use Zend_Currency;
use SilverStripe\i18n\i18n;
use SilverStripe\Control\Controller;
use SilverStripe\Core\Config\Config;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\SiteConfig\SiteConfig;
use ilateral\SilverStripe\GoogleShoppingFeed\GoogleShoppingFeed;


require_once BASE_PATH . "/" . THIRDPARTY_DIR . "/Zend/Currency.php";

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
<?php

namespace ilateral\SilverStripe\GoogleShoppingFeed\extensions;

use SilverStripe\Assets\Image;
use SilverStripe\ORM\ArrayList;
use SilverStripe\View\ArrayData;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\TextField;
use SilverStripe\Control\Director;
use SilverStripe\ORM\DataExtension;
use SilverStripe\Forms\CheckboxField;
use SilverStripe\Forms\DropdownField;
use SilverStripe\Forms\ToggleCompositeField;
use SilverStripe\AssetAdmin\Forms\UploadField;
use TractorCow\AutoComplete\AutoCompleteField;


class GoogleShoppingFeedExtension extends DataExtension
{

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?php

namespace ilateral\SilverStripe\GoogleShoppingFeed\model;

use SilverStripe\ORM\DB;
use SilverStripe\ORM\DataObject;


class GoogleProductCategory extends DataObject
{
private static $db = [
Expand Down

0 comments on commit e12513b

Please sign in to comment.