Skip to content

Commit

Permalink
Name change
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanWebsmid committed Aug 23, 2024
1 parent 8afad77 commit 8f2415c
Show file tree
Hide file tree
Showing 15 changed files with 35 additions and 56 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "websmid/ws_taggrs",
"name": "websmid/taggrs_prestashop",
"type": "library",
"autoload": {
"psr-4": {
Expand Down
11 changes: 0 additions & 11 deletions config_nl.xml

This file was deleted.

4 changes: 2 additions & 2 deletions src/Config/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ class Config
self::GTM_CODE => [
'type' => 'text',
'label' => 'GTM CODE',
'name' => 'GTM_CODE',
'name' => self::GTM_CODE,
],
self::GTM_URL => [
'type' => 'text',
'label' => 'TAGGRS URL',
'name' => 'GTM_URL',
'name' => self::GTM_URL,
]
];
}
4 changes: 2 additions & 2 deletions src/Module/Hooks/Front/FrontHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public function hookActionFrontControllerSetMedia($params)
]);

$this->context->controller->registerJavascript(
'module-ws_taggrs-taggrs_dynamic_events',
'modules/ws_taggrs/views/js/taggrs_dynamic_events.js',
'module-taggrs-prestashop-_dynamic_events',
'modules/taggrs_prestashop/views/js/taggrs_dynamic_events.js',
[
'priority' => 200,
'attributes' => 'async',
Expand Down
8 changes: 4 additions & 4 deletions src/SimpleForm/FormController.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ public function generateFormWithFields()
// Base form info
$fieldsForm[0]['form'] = [
'legend' => [
'title' => Context::getContext()->getTranslator()->trans('Instellingen', [], 'Modules.Ws_Taggrs.Admin'),
'title' => Context::getContext()->getTranslator()->trans('Instellingen', [], 'Modules.Taggrs_Prestashop.Admin'),
],
'input' => [],
'submit' => [
'title' => Context::getContext()->getTranslator()->trans('Opslaan', [], 'Modules.Ws_Taggrs.Admin'),
'title' => Context::getContext()->getTranslator()->trans('Opslaan', [], 'Modules.Taggrs_Prestashop.Admin'),
'class' => 'btn btn-default pull-right'
]
];
Expand Down Expand Up @@ -87,13 +87,13 @@ public function generateFormWithFields()
$helper->submit_action = 'submitWSForm';
$helper->toolbar_btn = [
'save' => [
'desc' => Context::getContext()->getTranslator()->trans('Opslaan', [], 'Modules.Ws_Taggrs.Admin'),
'desc' => Context::getContext()->getTranslator()->trans('Opslaan', [], 'Modules.Taggrs_Prestashop.Admin'),
'href' => AdminController::$currentIndex.'&configure='.$this->module->name.'&save'.$this->module->name.
'&token='.Tools::getAdminTokenLite('AdminModules'),
],
'back' => [
'href' => AdminController::$currentIndex.'&token='.Tools::getAdminTokenLite('AdminModules'),
'desc' => Context::getContext()->getTranslator()->trans('Terug', [], 'Modules.Ws_Taggrs.Admin')
'desc' => Context::getContext()->getTranslator()->trans('Terug', [], 'Modules.Taggrs_Prestashop.Admin')
]
];

Expand Down
2 changes: 1 addition & 1 deletion src/Tracking/DataRetrievers/CheckoutDataRetriever.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function getBaseData()
$newProduct = [
'item_id' => $product->id,
'item_name' => $product->name,
'price' => (string)round($product->price_amount, 2),
'price' => (string)round((float)$product->price_amount, 2),
'quantity' => $product->quantity
];

Expand Down
6 changes: 3 additions & 3 deletions src/Tracking/DataRetrievers/OrderConfDataRetriever.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public function getBaseData()
'currency' => $currency['iso_code'],
'transaction_id' => $baseOrder->reference,
'value' => (float)round((float)$baseOrder->total_paid, 2),
'tax' => (float)round($totalTax, 2),
'shipping' => (float)round($baseOrder->total_shipping_tax_incl, 2),
'tax' => (float)round((float)$totalTax, 2),
'shipping' => (float)round((float)$baseOrder->total_shipping_tax_incl, 2),
'items' => [],
'user_data' => [
'first_name' => $orderCustomer['firstname'],
Expand Down Expand Up @@ -88,4 +88,4 @@ public function getBaseData()

return $rawData;
}
}
}
4 changes: 2 additions & 2 deletions src/Tracking/DataRetrievers/ProductDataRetriever.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ public function getBaseData()

$rawData = [
'currency' => $currency['iso_code'],
'value' => (float)round($baseProduct->price_amount, 2),
'value' => (float)round((float)$baseProduct->price_amount, 2),
'items' => [
'item_id' => $baseProduct->id,
'item_name' => $baseProduct->name,
'price' => (float)round($baseProduct->price_amount, 2),
'price' => (float)round((float)$baseProduct->price_amount, 2),
'item_category' => $baseProduct->category_name,
'item_brand' => $baseProduct->manufacturer_name,
]
Expand Down
2 changes: 1 addition & 1 deletion src/Tracking/Presenter/Presenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function setCustomVariables(array $templateVars)

public function present()
{
if( empty($moduleClass = Module::getInstanceByname('ws_taggrs')) ){
if( empty($moduleClass = Module::getInstanceByname('taggrs_prestashop')) ){
return '';
}

Expand Down
4 changes: 2 additions & 2 deletions ws_taggrs.php → taggrs_prestashop.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@
require_once __DIR__ . '/vendor/autoload.php';
}

class Ws_Taggrs extends Module
class Taggrs_PrestaShop extends Module
{
use Install;
use AdminHooks;
use FrontHooks;

public function __construct()
{
$this->name = 'ws_taggrs';
$this->name = 'taggrs_prestashop';
$this->version = '1.0.1';
$this->author = 'Johan van der Klis | De Websmid BV';
$this->need_instance = 0;
Expand Down
10 changes: 0 additions & 10 deletions vendor/.htaccess

This file was deleted.

2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit34c6e9bc511b04a2dbb3f5cb6679729f::getLoader();
return ComposerAutoloaderInitbef1af25f41ee2416e5b800b21b7f451::getLoader();
8 changes: 4 additions & 4 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInit34c6e9bc511b04a2dbb3f5cb6679729f
class ComposerAutoloaderInitbef1af25f41ee2416e5b800b21b7f451
{
private static $loader;

Expand All @@ -22,15 +22,15 @@ public static function getLoader()
return self::$loader;
}

spl_autoload_register(array('ComposerAutoloaderInit34c6e9bc511b04a2dbb3f5cb6679729f', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitbef1af25f41ee2416e5b800b21b7f451', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit34c6e9bc511b04a2dbb3f5cb6679729f', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitbef1af25f41ee2416e5b800b21b7f451', 'loadClassLoader'));

$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php';

call_user_func(\Composer\Autoload\ComposerStaticInit34c6e9bc511b04a2dbb3f5cb6679729f::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitbef1af25f41ee2416e5b800b21b7f451::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInit34c6e9bc511b04a2dbb3f5cb6679729f
class ComposerStaticInitbef1af25f41ee2416e5b800b21b7f451
{
public static $prefixLengthsPsr4 = array (
'W' =>
Expand All @@ -27,9 +27,9 @@ class ComposerStaticInit34c6e9bc511b04a2dbb3f5cb6679729f
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit34c6e9bc511b04a2dbb3f5cb6679729f::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit34c6e9bc511b04a2dbb3f5cb6679729f::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit34c6e9bc511b04a2dbb3f5cb6679729f::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitbef1af25f41ee2416e5b800b21b7f451::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitbef1af25f41ee2416e5b800b21b7f451::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitbef1af25f41ee2416e5b800b21b7f451::$classMap;

}, null, ClassLoader::class);
}
Expand Down
16 changes: 8 additions & 8 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<?php return array(
'root' => array(
'pretty_version' => '1.0.0+no-version-set',
'version' => '1.0.0.0',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => NULL,
'name' => 'websmid/ws_taggrs',
'reference' => 'f33906b0bdf1809051d879eb1a46c1da323120e6',
'name' => 'websmid/taggrs_prestashop',
'dev' => true,
),
'versions' => array(
'websmid/ws_taggrs' => array(
'pretty_version' => '1.0.0+no-version-set',
'version' => '1.0.0.0',
'websmid/taggrs_prestashop' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => NULL,
'reference' => 'f33906b0bdf1809051d879eb1a46c1da323120e6',
'dev_requirement' => false,
),
),
Expand Down

0 comments on commit 8f2415c

Please sign in to comment.