first commit
This commit is contained in:
26
plugins/stGoogleShoppingPlugin/config/config.php
Normal file
26
plugins/stGoogleShoppingPlugin/config/config.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
|
||||
stConfiguration::addModule(array('label' => 'Google Shopping', 'route' => '@stGoogleShoppingPluginDefault', 'icon' => 'stGoogleShoppingPlugin'), 'Udostępnianie oferty');
|
||||
|
||||
|
||||
if (SF_APP == 'backend') {
|
||||
stPluginHelper::addEnableModule('stGoogleShoppingBackend', 'backend');
|
||||
stPluginHelper::addRouting('stGoogleShoppingPlugin', '/google_shopping/:action/*', 'stGoogleShoppingBackend', 'list', 'backend');
|
||||
stPluginHelper::addRouting('stGoogleShoppingPluginDefault', '/google_shopping', 'stGoogleShoppingBackend', 'list', 'backend');
|
||||
stSocketView::addComponent('stGoogleShoppingBackend.generateCustom.Content', 'stGoogleShoppingBackend', 'generateXml');
|
||||
$dispatcher->connect('stAdminGenerator.generateStProduct', array('stGoogleShoppingPluginListener', 'generateStProduct'));
|
||||
}
|
||||
|
||||
if (floatval(phpversion()) >= 7.1)
|
||||
{
|
||||
stTaskConfiguration::addTask(
|
||||
'googleshopping_task', // unikalne id zadania
|
||||
'stGoogleShoppingTask', // klasa zadania
|
||||
'Generowanie pliku dla Google Shopping', // Nazwa zadania jaka będzie wyświetlana w panelu lub w logach
|
||||
array(
|
||||
'time_interval' => stTaskConfiguration::TIME_INTERVAL_6HOURS, // odstęp czasowy
|
||||
'is_system' => true, // zadanie systemowe nie może być zmieniane przez użytkownika
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
edit:
|
||||
display:
|
||||
"NONE": [_mpn_code]
|
||||
fields:
|
||||
mpn_code: {name: Kod MPN, params: size=20, i18n: stGoogleShoppingBackend, hide_row: true, module: stGoogleShoppingBackend}
|
||||
export:
|
||||
fields:
|
||||
mpn_code: {name: Kod MPN, sample: 0123456789, type: string, i18n: stGoogleShoppingBackndn}
|
||||
google_shoppinig: {name: Google Shopping, class: stGoogleShopping, method: getProduct}
|
||||
import:
|
||||
fields:
|
||||
mpn_code: {name: Kod MPN, sample: 0123456789, type: custom, i18n: stGoogleShoppingBackend}
|
||||
google_shoppinig: {class: stGoogleShopping, method: setProduct}
|
||||
32
plugins/stGoogleShoppingPlugin/config/schema.yml
Normal file
32
plugins/stGoogleShoppingPlugin/config/schema.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
propel:
|
||||
_attributes:
|
||||
defaultIdMethod: native
|
||||
package: plugins.stGoogleShoppingPlugin.lib.model
|
||||
st_google_shopping:
|
||||
_attributes:
|
||||
phpName: GoogleShopping
|
||||
created_at:
|
||||
type: timestamp
|
||||
updated_at:
|
||||
type: timestamp
|
||||
id:
|
||||
type: INTEGER
|
||||
primaryKey: true
|
||||
required: true
|
||||
autoIncrement: true
|
||||
product_id:
|
||||
type: INTEGER
|
||||
required: true
|
||||
foreignTable: st_product
|
||||
foreignReference: id
|
||||
onDelete: cascade
|
||||
active:
|
||||
type: BOOLEAN
|
||||
required: true
|
||||
shipping_price:
|
||||
type: VARCHAR
|
||||
size: 255
|
||||
sale_price:
|
||||
type: VARCHAR
|
||||
size: 255
|
||||
@@ -0,0 +1,6 @@
|
||||
propel:
|
||||
st_product:
|
||||
_attributes: {phpName: Product}
|
||||
mpn_code:
|
||||
type: VARCHAR
|
||||
size: 255
|
||||
Reference in New Issue
Block a user