Skip to content

Commit

Permalink
Merge pull request #11 from mage-one-com/develop
Browse files Browse the repository at this point in the history
Improve documentation/informations
  • Loading branch information
Schrank committed Sep 11, 2020
2 parents 0cd4d1f + bc55f19 commit a881f61
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 7 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ Make sure your **Magento cronjob** is running.
## Clean cache/run install scripts

After cleaning the cache, the install scripts should run automatically to create the table for the rules.
In order to see the rules page and configuration, logout and login again.

# Usage

You can find the list of downloaded rules in `System > Tools > Mage One QPS Rules`

## Username + key
To use the QPS you need to [add your username and key in the configuration](https://my.mage-one.com/qps):
Expand Down
17 changes: 12 additions & 5 deletions src/app/code/community/Mageone/Qps/Block/Rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,20 @@ public function __construct()
$this->_controller = 'rule';
$this->_headerText = $this->__('Mage One QPS Rules');
parent::__construct();

$this->removeButton('add');

$this->_addButton('load_rules', array(
'label' => $this->__('Load rules'),
'onclick' => "setLocation('{$this->getUrl('*/*/load')}')",
));
if(Mage::helper('qps')->isEnabled()){
$this->_addButton('load_rules', array(
'label' => $this->__('Load Rules'),
'onclick' => "setLocation('{$this->getUrl('*/*/load')}')",
));
}else {
$this->_addButton('load_rules', array(
'label' => $this->__('To load rules enable QPS first'),
'onclick' => "setLocation('{$this->getUrl('*/system_config/edit/section/qps_section')}')",

));
}
}
}

8 changes: 8 additions & 0 deletions src/app/code/community/Mageone/Qps/etc/adminhtml.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
<children>
<system>
<children>
<tools>
<children>
<qps translate="title" module="qps">
<title>Mage One QPS Rules</title>
<sort_order>10</sort_order>
</qps>
</children>
</tools>
<config>
<children>
<qps_section translate="title" module="qps">
Expand Down
19 changes: 17 additions & 2 deletions src/app/locale/de_DE/Mageone_Qps.csv
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"Auto-Enable New Rules","Neue Regeln automatisch aktivieren"
"Enable module","Modul aktivieren"
"Enable new Rules automatically. Rules will be updated every hour via our API. (We recommend to enable rules manually after intensive testing)","Neue Regeln automatisch aktivieren. Neue Regeln werden automatisch jede Stunde über die API abgeglichen. (Wir empfehlen, Regeln manuell nach intensiven Tests zu aktivieren)"
"Your <a href=""https://my.mage-one.com/qps"">https://my.mage-one.com/qps</a> username","Ihr <a href=""https://my.mage-one.com/qps"">https://my.mage-one.com/qps</a> Benutzername"
"Public key for encryption between API and store. This key can be copied from <a href=""https://my.mage-one.com"">https://my.mage-one.com/qps</a>","Öffentlicher Schlüssel für die Verschlüsselung zwischen API und Ihrem Shop. Diesen Key erhalten Sie von <a href=""https://my.mage-one.com/qps"">https://my.mage-one.com/qps</a>"
"Your <a href=""https://my.mage-one.com/qps"" target=""_blank"">https://my.mage-one.com/qps</a> username","Ihr <a href=""https://my.mage-one.com/qps"" target=""_blank"">https://my.mage-one.com/qps</a> Benutzername"
"Public key for encryption between API and store. This key can be copied from <a href=""https://my.mage-one.com/qps"" target=""_blank"">https://my.mage-one.com/qps</a>","Öffentlicher Schlüssel für die Verschlüsselung zwischen API und Ihrem Shop. Diesen Key erhalten Sie von <a href=""https://my.mage-one.com/qps"" target=""_blank"">https://my.mage-one.com/qps</a>"
"You can only enable and disable a rule.", "Sie können nur Regeln aktivieren und deaktivieren."
"Rule Information","Regel Informationen"
"Save Rule","Regel speichern"
Expand All @@ -25,3 +25,18 @@
"The rule has been saved.","Die Regel wurde gespeichert."
"Unable to save this rule.","Diese Regel konnte nicht gespeichert werden."
"You can't create new rules. You can only change the status of existing rules.","Es können keine neuen Regeln angelegt werden. Es ist lediglich möglich, den Status bestehender Regeln zu ändern."
"Load Rules", "Regeln laden"
"Reset Filter", "Filter zurücksetzen"
"Search", "Suchen"
"No records found.","Keine Einträge gefunden."
"Page","Seite"
"of %s pages","von %s Seiten"
"View","Zeige"
"per page","pro Seite"
"Total %d records found","Insgesamt %d Einträge gefunden"
"To load rules enable QPS first", "Um Regeln laden zu können, aktivieren Sie zuerst QPS"
"Disabled","Inaktiv"
"Enabled","Aktiv"
"Back", "Zurück"
"Reset","Zurücksetzen"
"Save and Continue Edit","Speichern und weiterbearbeiten"
15 changes: 15 additions & 0 deletions src/app/locale/en_US/Mageone_Qps.csv
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,18 @@
"The rule has been saved.","The rule has been saved."
"Unable to save this rule.","Unable to save this rule."
"You can't create new rules. You can only change the status of existing rules.","You can't create new rules. You can only change the status of existing rules."
"Load Rules","Load Rules"
"Reset Filter","Reset Filter"
"Search","Search"
"No records found.","No records found."
"Page","Page"
"of %s pages","of %s pages"
"View","View"
"per page","per page"
"Total %d records found","Total %d records found"
"To load rules enable QPS first","To load rules enable QPS first"
"Disabled","Disabled"
"Enabled","Enabled"
"Back","Back"
"Reset","Reset"
"Save and Continue Edit","Save and Continue Edit"

0 comments on commit a881f61

Please sign in to comment.