Réinstallation du module Paypal via Composer
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 136 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 115 KiB |
BIN
local/media/images/module/PayzenEmbedded-11-payzen-logo.png
Normal file
BIN
local/media/images/module/PayzenEmbedded-11-payzen-logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
@@ -23,9 +23,6 @@
|
||||
|
||||
namespace Front\Controller;
|
||||
|
||||
use ReCaptcha\Event\ReCaptchaCheckEvent;
|
||||
use ReCaptcha\Event\ReCaptchaEvents;
|
||||
use Thelia\Model\ModuleQuery;
|
||||
use Thelia\Controller\Front\BaseFrontController;
|
||||
use Thelia\Form\Definition\FrontForm;
|
||||
use Thelia\Form\Exception\FormValidationException;
|
||||
|
||||
@@ -22,9 +22,6 @@
|
||||
/*************************************************************************************/
|
||||
namespace Front\Controller;
|
||||
|
||||
use ReCaptcha\Event\ReCaptchaCheckEvent;
|
||||
use ReCaptcha\Event\ReCaptchaEvents;
|
||||
use Thelia\Model\ModuleQuery;
|
||||
use Front\Front;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use Thelia\Controller\Front\BaseFrontController;
|
||||
|
||||
55
local/modules/HookTest/Config/config.xml
Normal file
55
local/modules/HookTest/Config/config.xml
Normal file
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<config xmlns="http://thelia.net/schema/dic/config"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://thelia.net/schema/dic/config http://thelia.net/schema/dic/config/thelia-1.0.xsd">
|
||||
|
||||
<loops>
|
||||
</loops>
|
||||
|
||||
<forms>
|
||||
</forms>
|
||||
|
||||
<commands>
|
||||
</commands>
|
||||
|
||||
<hooks>
|
||||
<hook id="hooktest.hook.front" class="HookTest\Hook\FrontHook" scope="request">
|
||||
<!-- test: hook tag -->
|
||||
<tag name="hook.event_listener" event="main.head-top" />
|
||||
<tag name="hook.event_listener" event="main.head-top" method="onMainHeadTopTest1" />
|
||||
<tag name="hook.event_listener" event="main.head-top" method="onMainHeadTopTest2" type="front" />
|
||||
<tag name="hook.event_listener" event="main.head-top" method="onMainHeadTopTest3" type="front" active="0" />
|
||||
|
||||
<!-- test: hook function -->
|
||||
<tag name="hook.event_listener" event="main.body-top" />
|
||||
<tag name="hook.event_listener" event="main.body-top" method="onMainBodyTop2" />
|
||||
|
||||
<!-- test: if hook -->
|
||||
<tag name="hook.event_listener" event="main.navbar-secondary" />
|
||||
<tag name="hook.event_listener" event="main.navbar-primary" />
|
||||
|
||||
<!-- test: hookblock / forhook -->
|
||||
<tag name="hook.event_listener" event="main.footer-body" />
|
||||
|
||||
<!-- test: functionality -->
|
||||
<tag name="hook.event_listener" event="main.content-top" />
|
||||
<!-- render function-->
|
||||
<tag name="hook.event_listener" event="main.content-top" method="onMainContentTopRender" />
|
||||
<!-- dump function-->
|
||||
<tag name="hook.event_listener" event="main.content-top" method="onMainContentTopDump" />
|
||||
<!-- addCSS function-->
|
||||
<tag name="hook.event_listener" event="main.content-top" method="onMainContentTopAddCSS" />
|
||||
<!-- addJS function-->
|
||||
<tag name="hook.event_listener" event="main.content-top" method="onMainContentTopAddJS" />
|
||||
<!-- trans function-->
|
||||
<tag name="hook.event_listener" event="main.content-top" method="onMainContentTopTrans" />
|
||||
|
||||
<!-- overriding -->
|
||||
<tag name="hook.event_listener" event="main.content-top" method="onMainContentTopOverriding" />
|
||||
|
||||
|
||||
</hook>
|
||||
</hooks>
|
||||
|
||||
</config>
|
||||
18
local/modules/HookTest/Config/module.xml
Normal file
18
local/modules/HookTest/Config/module.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module>
|
||||
<fullnamespace>HookTest\HookTest</fullnamespace>
|
||||
<descriptive locale="en_US">
|
||||
<title>Hook module tester</title>
|
||||
</descriptive>
|
||||
<descriptive locale="fr_FR">
|
||||
<title>Hook module tester</title>
|
||||
</descriptive>
|
||||
<version>0.1</version>
|
||||
<author>
|
||||
<name>Julien Chanséaume</name>
|
||||
<email>jchanseaume@openstudio.fr</email>
|
||||
</author>
|
||||
<type>classic</type>
|
||||
<thelia>2.0.0</thelia>
|
||||
<stability>other</stability>
|
||||
</module>
|
||||
170
local/modules/HookTest/Hook/FrontHook.php
Normal file
170
local/modules/HookTest/Hook/FrontHook.php
Normal file
@@ -0,0 +1,170 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace HookTest\Hook;
|
||||
|
||||
use Thelia\Core\Event\Hook\HookRenderBlockEvent;
|
||||
use Thelia\Core\Event\Hook\HookRenderEvent;
|
||||
use Thelia\Core\Hook\BaseHook;
|
||||
use Thelia\Core\Hook\Fragment;
|
||||
|
||||
|
||||
/**
|
||||
* Class FrontHook
|
||||
* @package HookCurrency\Hook
|
||||
* @author Julien Chanséaume <jchanseaume@openstudio.fr>
|
||||
*/
|
||||
class FrontHook extends BaseHook {
|
||||
|
||||
protected $ldelim = "::";
|
||||
protected $rdelim = "::";
|
||||
|
||||
|
||||
public function onMainHeadTop(HookRenderEvent $event)
|
||||
{
|
||||
$event->add($this->mark("main.head-top test0"));
|
||||
}
|
||||
|
||||
public function onMainHeadTopTest1(HookRenderEvent $event)
|
||||
{
|
||||
$event->add($this->mark("main.head-top test1"));
|
||||
}
|
||||
|
||||
public function onMainHeadTopTest2(HookRenderEvent $event)
|
||||
{
|
||||
$event->add($this->mark("main.head-top test2"));
|
||||
}
|
||||
|
||||
public function onMainHeadTopTest3(HookRenderEvent $event)
|
||||
{
|
||||
$event->add($this->mark("main.head-top test3"));
|
||||
}
|
||||
|
||||
|
||||
// == Hook Function =====================================================
|
||||
|
||||
public function onMainBodyTop(HookRenderEvent $event){
|
||||
$event->add($this->mark("main.body-top 1-1"));
|
||||
$event->add($this->mark("main.body-top 1-2"));
|
||||
}
|
||||
|
||||
public function onMainBodyTop2(HookRenderEvent $event)
|
||||
{
|
||||
$event->add($this->mark("main.body-top 2"));
|
||||
}
|
||||
|
||||
|
||||
// == ifhook / elsehook ================================================
|
||||
|
||||
public function onMainNavbarSecondary(HookRenderEvent $event){
|
||||
$event->add($this->mark("main.navbar-secondary 1"));
|
||||
}
|
||||
|
||||
/**
|
||||
* empty string should be considered as empty :) and should activate the elsehook
|
||||
*
|
||||
* @param HookRenderEvent $event
|
||||
*/
|
||||
public function onMainNavbarPrimary(HookRenderEvent $event)
|
||||
{
|
||||
$event->add("");
|
||||
$event->add(" ");
|
||||
}
|
||||
|
||||
public function onProductAdditional(HookRenderEvent $event)
|
||||
{
|
||||
// nothing added
|
||||
}
|
||||
|
||||
|
||||
// == hookblock / forhook ==============================================
|
||||
|
||||
public function onMainFooterBody(HookRenderBlockEvent $event)
|
||||
{
|
||||
$event->addFragment(new Fragment(array(
|
||||
"id" => "id1",
|
||||
"class" => "class1",
|
||||
"content" => "content1"
|
||||
)));
|
||||
$event->add(array(
|
||||
"id" => "id2",
|
||||
"class" => "class2",
|
||||
"content" => "content2"
|
||||
));
|
||||
}
|
||||
|
||||
// == global objects ===================================================
|
||||
|
||||
public function onMainContentTop(HookRenderEvent $event)
|
||||
{
|
||||
$event->add($this->mark("main.content-top"));
|
||||
$event->add($this->mark("view : " . $this->getView()));
|
||||
$event->add($this->mark("request : " . $this->getRequest()));
|
||||
$event->add($this->mark("session : " . $this->getSession()->getId()));
|
||||
$event->add($this->mark("cart : " . ($this->getCart() === null ? "null" : "not null")));
|
||||
$event->add($this->mark("order : " . ($this->getOrder() === null ? "null" : "not null")));
|
||||
$event->add($this->mark("currency : " . $this->getCurrency()->getId()));
|
||||
$event->add($this->mark("customer : " . $this->getCustomer()));
|
||||
$event->add($this->mark("lang : " . $this->getLang()->getId()));
|
||||
}
|
||||
|
||||
public function onMainContentTopRender(HookRenderEvent $event)
|
||||
{
|
||||
$event->add($this->render("render.html"));
|
||||
}
|
||||
|
||||
public function onMainContentTopDump(HookRenderEvent $event)
|
||||
{
|
||||
$event->add($this->dump("dump.txt"));
|
||||
}
|
||||
|
||||
public function onMainContentTopAddCSS(HookRenderEvent $event)
|
||||
{
|
||||
$event->add($this->mark($this->addCSS("assets/css/styles.css")));
|
||||
$event->add($this->mark($this->addCSS("assets/css/print.css", array("media" => "print"))));
|
||||
}
|
||||
|
||||
public function onMainContentTopAddJS(HookRenderEvent $event)
|
||||
{
|
||||
$event->add($this->mark($this->addJS("assets/js/script.js")));
|
||||
}
|
||||
|
||||
public function onMainContentTopTrans(HookRenderEvent $event)
|
||||
{
|
||||
$event->add($this->mark($this->trans("Hodor Hodor", array(), "hooktest")));
|
||||
$event->add($this->mark($this->trans("Hello World", array(), "hooktest")));
|
||||
$event->add($this->mark($this->trans("Hello %name%", array("%name%" => "Hodor"))));
|
||||
$event->add($this->mark($this->trans("Hi %name%", array("%name%" => "Hodor"), "hooktest", 'fr_FR')));
|
||||
}
|
||||
|
||||
// == template overriding ====================================================
|
||||
|
||||
public function onMainContentTopOverriding(HookRenderEvent $event)
|
||||
{
|
||||
$event->add($this->render("override1.html"));
|
||||
// redefined in template hooktest in the module
|
||||
$event->add($this->render("override2.html"));
|
||||
// redefined in template hooktest
|
||||
$event->add($this->render("override3.html"));
|
||||
|
||||
$event->add($this->render("override-assets.html"));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected function mark($message, $endofline="\n")
|
||||
{
|
||||
return sprintf("%s %s %s%s", $this->ldelim, $message, $this->rdelim, $endofline);
|
||||
}
|
||||
|
||||
}
|
||||
21
local/modules/HookTest/HookTest.php
Normal file
21
local/modules/HookTest/HookTest.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace HookTest;
|
||||
|
||||
use Thelia\Core\Event\Hook\HookRenderEvent;
|
||||
use Thelia\Module\BaseModule;
|
||||
|
||||
class HookTest extends BaseModule
|
||||
{
|
||||
|
||||
}
|
||||
8
local/modules/HookTest/I18n/en_US.php
Normal file
8
local/modules/HookTest/I18n/en_US.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'Hodor Hodor' => 'Hodor en_US Hodor',
|
||||
'Hello World' => 'Hello en_US World',
|
||||
'Hello %name%' => 'Hello en_US %name%',
|
||||
'Hi %name%' => 'Hi en_US %name%',
|
||||
);
|
||||
7
local/modules/HookTest/I18n/fr_FR.php
Normal file
7
local/modules/HookTest/I18n/fr_FR.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
return array(
|
||||
'Hodor Hodor' => 'Hodor fr_FR Hodor',
|
||||
'Hello World' => 'Bonjour fr_FR monde',
|
||||
'Hello %name%' => 'Bonjour fr_FR %name%',
|
||||
'Hi %name%' => 'Salut fr_FR %name%',
|
||||
);
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
);
|
||||
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
);
|
||||
10
local/modules/HookTest/composer.json
Normal file
10
local/modules/HookTest/composer.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "thelia/hooktest-module",
|
||||
"type": "thelia-module",
|
||||
"require": {
|
||||
"thelia/installer": "~1.1"
|
||||
},
|
||||
"extra": {
|
||||
"installer-name": "HookTest"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
/* print.css */
|
||||
@@ -0,0 +1 @@
|
||||
/* style1 in module/default */
|
||||
@@ -0,0 +1 @@
|
||||
/* style2 in module/default */
|
||||
@@ -0,0 +1 @@
|
||||
/* style3 in module/default */
|
||||
@@ -0,0 +1 @@
|
||||
/* styles.css */
|
||||
@@ -0,0 +1 @@
|
||||
/* script.js */
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
:: function dump ::
|
||||
@@ -0,0 +1,71 @@
|
||||
<ul class="nav navbar-nav navbar-cart navbar-right">
|
||||
{ifloop rel="cartloop"}
|
||||
<li class="dropdown pull-right cart-not-empty cart-container">
|
||||
<a href="{url path="/cart"}" rel="nofollow" class="cart">
|
||||
{intl l="Cart" d="hookcart.fo.default"} <span class="badge">{cart attr="count_item"}</span>
|
||||
</a>
|
||||
<div class="dropdown-menu cart-content">
|
||||
<form id="form-cart-mini" action="{url path="/order/delivery"}" method="post">
|
||||
<table class="table table-cart-mini">
|
||||
<colgroup>
|
||||
<col width="70">
|
||||
<col>
|
||||
<col width="100">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
{assign "total_price" 0}
|
||||
{loop type="cart" name="cartloop"}
|
||||
<tr>
|
||||
<td class="image">
|
||||
{loop type="image" name="product-image" product=$PRODUCT_ID limit="1" width="118" height="60"}
|
||||
<img src="{$IMAGE_URL}" alt="{$TITLE}">
|
||||
{/loop}
|
||||
</td>
|
||||
<td class="product">
|
||||
<h3 class="name" style="margin:0">
|
||||
{$TITLE}
|
||||
</h3>
|
||||
<a href="{url path="/cart/delete/{$ITEM_ID}"}" class="btn btn-remove" data-tip="tooltip" data-title="Delete" data-original-title=""><i class="icon-trash"></i> <span>{intl l="Remove" d="hookcart.fo.default"}</span></a>
|
||||
</td>
|
||||
<td class="unitprice text-center">
|
||||
{if $IS_PROMO == 1}
|
||||
{assign "real_price" $PROMO_TAXED_PRICE}
|
||||
{else}
|
||||
{assign "real_price" $TAXED_PRICE}
|
||||
{/if}
|
||||
<span class="qty">{$QUANTITY}</span> X <span class="price" style="font-size:1em;">{$real_price} {currency attr="symbol"}</span></div>
|
||||
{assign "total_price" $total_price + ($QUANTITY * $real_price)}
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2" class="empty">
|
||||
<a href="{url path="/cart"}" role="button" class="btn btn-default btn-sm"><span>{intl l="View Cart" d="hookcart.fo.default"}</span></a>
|
||||
<a href="{url path="/order/delivery"}" role="button" class="btn btn-warning btn-sm"><span>{intl l="Checkout" d="hookcart.fo.default"}</span></a>
|
||||
{*<button type="submit" name="checkout" class="btn btn-warning btn-sm"><span>{intl l="Checkout" d="hookcart.fo.default"}</span></button>*}
|
||||
</td>
|
||||
<td class="total">
|
||||
<div class="total-price">
|
||||
<span class="price">{$total_price} {currency attr="symbol"}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
{/ifloop}
|
||||
{elseloop rel="cartloop"}
|
||||
<li class="dropdown pull-right cart-container">
|
||||
<a href="{url path="/cart"}" rel="nofollow" class="cart">
|
||||
{intl l="Cart" d="hookcart.fo.default"} <span class="badge">0</span>
|
||||
</a>
|
||||
<div class="dropdown-menu cart-content">
|
||||
<p>{intl l="You have no items in your shopping cart." d="hookcart.fo.default"}</p>
|
||||
</div>
|
||||
</li>
|
||||
{/elseloop}
|
||||
</ul>
|
||||
@@ -0,0 +1,13 @@
|
||||
<!-- OVERRIDING ASSETS -->
|
||||
|
||||
{stylesheets file="assets/css/style1.css" source="HookTest"}
|
||||
asset file 1 : {$asset_url}
|
||||
{/stylesheets}
|
||||
{stylesheets file="assets/css/style2.css" source="HookTest"}
|
||||
asset file 2 : {$asset_url}
|
||||
{/stylesheets}
|
||||
{stylesheets file="assets/css/style3.css" source="HookTest"}
|
||||
asset file 3 : {$asset_url}
|
||||
{/stylesheets}
|
||||
|
||||
<!-- // OVERRIDING ASSETS -->
|
||||
@@ -0,0 +1 @@
|
||||
:: file override1 from module/default ::
|
||||
@@ -0,0 +1 @@
|
||||
:: file override2 from module/default ::
|
||||
@@ -0,0 +1 @@
|
||||
:: file override3 from module/default ::
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
:: function render ::
|
||||
@@ -0,0 +1 @@
|
||||
/* style2 in module/hooktest */
|
||||
@@ -0,0 +1 @@
|
||||
:: file override2 from module/hooktest ::
|
||||
0
local/modules/PayPal/Controller/ConfigurationController.php
Normal file → Executable file
0
local/modules/PayPal/Controller/ConfigurationController.php
Normal file → Executable file
0
local/modules/PayPal/Form/ConfigurationForm.php
Normal file → Executable file
0
local/modules/PayPal/Form/ConfigurationForm.php
Normal file → Executable file
0
local/modules/PayPal/images/logo.png
Normal file → Executable file
0
local/modules/PayPal/images/logo.png
Normal file → Executable file
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
0
local/modules/PayPal/templates/email/default/paypal-payment-confirmation.html
Normal file → Executable file
0
local/modules/PayPal/templates/email/default/paypal-payment-confirmation.html
Normal file → Executable file
0
local/modules/PayPal/templates/email/default/paypal-payment-confirmation.txt
Normal file → Executable file
0
local/modules/PayPal/templates/email/default/paypal-payment-confirmation.txt
Normal file → Executable file
0
local/modules/PayPal/templates/email/default/paypal-recursive-payment-confirmation.html
Normal file → Executable file
0
local/modules/PayPal/templates/email/default/paypal-recursive-payment-confirmation.html
Normal file → Executable file
0
local/modules/PayPal/templates/email/default/paypal-recursive-payment-confirmation.txt
Normal file → Executable file
0
local/modules/PayPal/templates/email/default/paypal-recursive-payment-confirmation.txt
Normal file → Executable file
Reference in New Issue
Block a user