Backup before
This commit is contained in:
parent
3f14580904
commit
60a41b5f14
Binary file not shown.
@ -933,7 +933,7 @@ CREATE TABLE `contact_address` (
|
|||||||
`email` varchar(255) DEFAULT NULL,
|
`email` varchar(255) DEFAULT NULL,
|
||||||
`type` int(1) NOT NULL,
|
`type` int(1) NOT NULL,
|
||||||
`company` varchar(100) DEFAULT NULL,
|
`company` varchar(100) DEFAULT NULL,
|
||||||
`anrede` varchar(100) NOT NULL,
|
`anrede` varchar(100) DEFAULT 1,
|
||||||
`country` varchar(100) DEFAULT NULL,
|
`country` varchar(100) DEFAULT NULL,
|
||||||
`fax` varchar(255) DEFAULT NULL,
|
`fax` varchar(255) DEFAULT NULL,
|
||||||
`company2` varchar(255) DEFAULT NULL,
|
`company2` varchar(255) DEFAULT NULL,
|
||||||
|
|||||||
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
namespace PSC\Shop\EntityBundle\Document;
|
namespace PSC\Shop\EntityBundle\Document;
|
||||||
|
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\Id;
|
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\Document;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\Document;
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbedOne;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbedOne;
|
||||||
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
||||||
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\Id;
|
||||||
use PSC\Shop\EntityBundle\Document\Embed\Operator;
|
use PSC\Shop\EntityBundle\Document\Embed\Operator;
|
||||||
|
|
||||||
#[Document]
|
#[Document]
|
||||||
@ -18,7 +18,7 @@ class Order
|
|||||||
protected $uid;
|
protected $uid;
|
||||||
|
|
||||||
#[Field(type: 'string')]
|
#[Field(type: 'string')]
|
||||||
protected ?string $notices = "";
|
protected null|string $notices = '';
|
||||||
|
|
||||||
#[Field(type: 'bool')]
|
#[Field(type: 'bool')]
|
||||||
protected $packageExported;
|
protected $packageExported;
|
||||||
@ -30,17 +30,23 @@ class Order
|
|||||||
protected $draft = false;
|
protected $draft = false;
|
||||||
|
|
||||||
#[Field(type: 'raw')]
|
#[Field(type: 'raw')]
|
||||||
protected string $vouchers = "";
|
protected string $vouchers = '';
|
||||||
|
|
||||||
#[Field(type: 'raw')]
|
#[Field(type: 'raw')]
|
||||||
protected string $discounts = "";
|
protected string $discounts = '';
|
||||||
|
#[Field(type: 'collection')]
|
||||||
|
protected $voucherProduct = [];
|
||||||
|
#[Field(type: 'collection')]
|
||||||
|
protected $voucherPayment = [];
|
||||||
|
#[Field(type: 'collection')]
|
||||||
|
protected $voucherShipping = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function isSendDataToShipping(): bool
|
public function isSendDataToShipping(): bool
|
||||||
{
|
{
|
||||||
return (bool)$this->sendDataToShipping;
|
return (bool) $this->sendDataToShipping;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -50,22 +56,23 @@ class Order
|
|||||||
{
|
{
|
||||||
$this->sendDataToShipping = $sendDataToShipping;
|
$this->sendDataToShipping = $sendDataToShipping;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string $externalOrderNumber;
|
* @var string $externalOrderNumber;
|
||||||
*/
|
*/
|
||||||
#[Field(type: 'string')]
|
#[Field(type: 'string')]
|
||||||
protected $externalOrderNumber;
|
protected $externalOrderNumber;
|
||||||
/**
|
/**
|
||||||
* @var string $paymentRef;
|
* @var string $paymentRef;
|
||||||
*/
|
*/
|
||||||
#[Field(type: 'string')]
|
#[Field(type: 'string')]
|
||||||
protected $paymentRef;
|
protected $paymentRef;
|
||||||
|
|
||||||
#[Field(type: 'string')]
|
#[Field(type: 'string')]
|
||||||
protected $paymentGateway;
|
protected $paymentGateway;
|
||||||
/**
|
/**
|
||||||
* @var string $paymentToken;
|
* @var string $paymentToken;
|
||||||
*/
|
*/
|
||||||
#[Field(type: 'string')]
|
#[Field(type: 'string')]
|
||||||
protected $paymentToken;
|
protected $paymentToken;
|
||||||
#[Field(type: 'hash')]
|
#[Field(type: 'hash')]
|
||||||
@ -79,15 +86,16 @@ class Order
|
|||||||
#[EmbedOne]
|
#[EmbedOne]
|
||||||
protected $senderAddressSaved;
|
protected $senderAddressSaved;
|
||||||
#[EmbedOne]
|
#[EmbedOne]
|
||||||
protected ?Operator $operator = null;
|
protected null|Operator $operator = null;
|
||||||
|
|
||||||
#[EmbedOne]
|
#[EmbedOne]
|
||||||
protected $contactSaved;
|
protected $contactSaved;
|
||||||
/**
|
/**
|
||||||
* @var boolean $withTax
|
* @var boolean $withTax
|
||||||
*/
|
*/
|
||||||
#[Field(type: 'bool')]
|
#[Field(type: 'bool')]
|
||||||
protected $withTax;
|
protected $withTax;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@ -191,16 +199,16 @@ class Order
|
|||||||
*/
|
*/
|
||||||
public function setPluginSettingModule($module, $key, $value)
|
public function setPluginSettingModule($module, $key, $value)
|
||||||
{
|
{
|
||||||
$this->pluginSettings[$module ] [$key] = $value;
|
$this->pluginSettings[$module][$key] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPluginSettingModule($module, $key)
|
public function getPluginSettingModule($module, $key)
|
||||||
{
|
{
|
||||||
if (!isset($this->pluginSettings[$module ]) || !isset($this->pluginSettings[$module ] [$key])) {
|
if (!isset($this->pluginSettings[$module]) || !isset($this->pluginSettings[$module][$key])) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->pluginSettings[$module ] [$key];
|
return $this->pluginSettings[$module][$key];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -272,7 +280,7 @@ class Order
|
|||||||
*/
|
*/
|
||||||
public function getExternalOrderNumber(): string
|
public function getExternalOrderNumber(): string
|
||||||
{
|
{
|
||||||
return (string)$this->externalOrderNumber;
|
return (string) $this->externalOrderNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -286,25 +294,25 @@ class Order
|
|||||||
/**
|
/**
|
||||||
* @return ?float
|
* @return ?float
|
||||||
*/
|
*/
|
||||||
public function getGutscheinAbzugNetto(): ?float
|
public function getGutscheinAbzugNetto(): null|float
|
||||||
{
|
{
|
||||||
return (float)$this->gutscheinAbzugNetto;
|
return (float) $this->gutscheinAbzugNetto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param ?float $gutscheinAbzugNetto
|
* @param ?float $gutscheinAbzugNetto
|
||||||
*/
|
*/
|
||||||
public function setGutscheinAbzugNetto(?float $gutscheinAbzugNetto): void
|
public function setGutscheinAbzugNetto(null|float $gutscheinAbzugNetto): void
|
||||||
{
|
{
|
||||||
$this->gutscheinAbzugNetto = $gutscheinAbzugNetto;
|
$this->gutscheinAbzugNetto = $gutscheinAbzugNetto;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getNotices(): ?string
|
public function getNotices(): null|string
|
||||||
{
|
{
|
||||||
return $this->notices;
|
return $this->notices;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setNotices(?string $notices): void
|
public function setNotices(null|string $notices): void
|
||||||
{
|
{
|
||||||
$this->notices = $notices;
|
$this->notices = $notices;
|
||||||
}
|
}
|
||||||
@ -340,27 +348,127 @@ class Order
|
|||||||
{
|
{
|
||||||
$this->paymentGateway = $paymentGateway;
|
$this->paymentGateway = $paymentGateway;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setDiscounts(string $discounts): void
|
public function setDiscounts(string $discounts): void
|
||||||
{
|
{
|
||||||
$this->discounts = $discounts;
|
$this->discounts = $discounts;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDiscounts(): string
|
public function getDiscounts(): string
|
||||||
{
|
{
|
||||||
return $this->discounts;
|
return $this->discounts;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setVouchers(string $vouchers): void
|
public function setVouchers(string $vouchers): void
|
||||||
{
|
{
|
||||||
$this->vouchers = $vouchers;
|
$this->vouchers = $vouchers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getVouchers(): string
|
public function getVouchers(): string
|
||||||
{
|
{
|
||||||
return $this->vouchers;
|
return $this->vouchers;
|
||||||
}
|
}
|
||||||
public function setOperator(?Operator $operator): void
|
|
||||||
|
public function setVoucherProduct(array $var): void
|
||||||
|
{
|
||||||
|
$this->voucherProduct = $var;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getVoucherProduct(): array
|
||||||
|
{
|
||||||
|
return (array) $this->voucherProduct;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setVoucherPayment(array $var): void
|
||||||
|
{
|
||||||
|
$this->voucherPayment = $var;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getVoucherPayment(): array
|
||||||
|
{
|
||||||
|
return (array) $this->voucherPayment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setVoucherShipping(array $var): void
|
||||||
|
{
|
||||||
|
$this->voucherShipping = $var;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getVoucherShipping(): array
|
||||||
|
{
|
||||||
|
return (array) $this->voucherShipping;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getOverallSumNetto(): float
|
||||||
|
{
|
||||||
|
$alleArrays = array_merge($this->voucherProduct, $this->voucherPayment, $this->voucherShipping);
|
||||||
|
$netto = 0;
|
||||||
|
foreach ($alleArrays as $item) {
|
||||||
|
$netto += $item['netto'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $netto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getOverallSumSteuer(): float
|
||||||
|
{
|
||||||
|
$alleArrays = array_merge($this->voucherProduct, $this->voucherPayment, $this->voucherShipping);
|
||||||
|
$netto = 0;
|
||||||
|
foreach ($alleArrays as $item) {
|
||||||
|
$netto += $item['steuer'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $netto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getOverallSumBrutto(): float
|
||||||
|
{
|
||||||
|
$alleArrays = array_merge($this->voucherProduct, $this->voucherPayment, $this->voucherShipping);
|
||||||
|
$netto = 0;
|
||||||
|
foreach ($alleArrays as $item) {
|
||||||
|
$netto += $item['brutto'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $netto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getVoucherSum(): array
|
||||||
|
{
|
||||||
|
$alleArrays = array_merge($this->voucherProduct, $this->voucherPayment, $this->voucherShipping);
|
||||||
|
|
||||||
|
// Summen nach Prozentsatz gruppieren
|
||||||
|
$summen = [];
|
||||||
|
|
||||||
|
foreach ($alleArrays as $item) {
|
||||||
|
$prozent = $item['prozent'];
|
||||||
|
|
||||||
|
if (!isset($summen[$prozent])) {
|
||||||
|
$summen[$prozent] = [
|
||||||
|
'brutto' => 0,
|
||||||
|
'netto' => 0,
|
||||||
|
'prozent' => $prozent,
|
||||||
|
'steuer' => 0,
|
||||||
|
'rabatt' => 0,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
$summen[$prozent]['brutto'] += $item['brutto'];
|
||||||
|
$summen[$prozent]['netto'] += $item['netto'];
|
||||||
|
$summen[$prozent]['steuer'] += $item['steuer'];
|
||||||
|
$summen[$prozent]['rabatt'] += $item['rabatt'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Umwandeln in numerisch indiziertes Array (optional)
|
||||||
|
$summen = array_values($summen);
|
||||||
|
return $summen;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setOperator(null|Operator $operator): void
|
||||||
{
|
{
|
||||||
$this->operator = $operator;
|
$this->operator = $operator;
|
||||||
}
|
}
|
||||||
public function getOperator(): ?Operator
|
|
||||||
|
public function getOperator(): null|Operator
|
||||||
{
|
{
|
||||||
return $this->operator;
|
return $this->operator;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -65,10 +65,17 @@ class TemplateVars
|
|||||||
|
|
||||||
protected Base $orderModel;
|
protected Base $orderModel;
|
||||||
|
|
||||||
protected $twigVars = array();
|
protected $twigVars = [];
|
||||||
|
|
||||||
public function __construct($projectDir, EntityManagerInterface $em, TokenStorageInterface $tokenStorage, DocumentManager $mongoManager, Environment $twig, PaperDB $paperDb, Order $orderService)
|
public function __construct(
|
||||||
{
|
$projectDir,
|
||||||
|
EntityManagerInterface $em,
|
||||||
|
TokenStorageInterface $tokenStorage,
|
||||||
|
DocumentManager $mongoManager,
|
||||||
|
Environment $twig,
|
||||||
|
PaperDB $paperDb,
|
||||||
|
Order $orderService,
|
||||||
|
) {
|
||||||
$this->entityManager = $em;
|
$this->entityManager = $em;
|
||||||
$this->tokenStorage = $tokenStorage;
|
$this->tokenStorage = $tokenStorage;
|
||||||
$this->mongoManager = $mongoManager;
|
$this->mongoManager = $mongoManager;
|
||||||
@ -78,17 +85,15 @@ class TemplateVars
|
|||||||
$this->orderService = $orderService;
|
$this->orderService = $orderService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function loadOrder($uuid)
|
public function loadOrder($uuid)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->loaded && $this->order->getUuid() == $uuid) {
|
if ($this->loaded && $this->order->getUuid() == $uuid) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$orderRepo = $this->entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Order');
|
$orderRepo = $this->entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Order');
|
||||||
|
|
||||||
$this->order = $orderRepo->findOneBy(array('uuid' => $uuid));
|
$this->order = $orderRepo->findOneBy(['uuid' => $uuid]);
|
||||||
$this->positions = $this->order->getPositions();
|
$this->positions = $this->order->getPositions();
|
||||||
$this->orderModel = $this->orderService->getOrderByUuid($uuid);
|
$this->orderModel = $this->orderService->getOrderByUuid($uuid);
|
||||||
$this->generateTwigVars();
|
$this->generateTwigVars();
|
||||||
@ -100,18 +105,17 @@ class TemplateVars
|
|||||||
|
|
||||||
private function generateTwigVars()
|
private function generateTwigVars()
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var \PSC\Shop\EntityBundle\Document\Order $orderObj */
|
/** @var \PSC\Shop\EntityBundle\Document\Order $orderObj */
|
||||||
$orderObj = $this->mongoManager
|
$orderObj = $this->mongoManager
|
||||||
->getRepository('PSC\Shop\EntityBundle\Document\Order')
|
->getRepository('PSC\Shop\EntityBundle\Document\Order')
|
||||||
->findOneBy(array('uid' => (string) $this->order->getUid()));
|
->findOneBy(['uid' => (string) $this->order->getUid()]);
|
||||||
|
|
||||||
$contact = $this->order->getContact();
|
$contact = $this->order->getContact();
|
||||||
|
|
||||||
/** @var \PSC\Shop\EntityBundle\Document\Contact $contactObj */
|
/** @var \PSC\Shop\EntityBundle\Document\Contact $contactObj */
|
||||||
$contactObj = $this->mongoManager
|
$contactObj = $this->mongoManager
|
||||||
->getRepository('PSC\Shop\EntityBundle\Document\Contact')
|
->getRepository('PSC\Shop\EntityBundle\Document\Contact')
|
||||||
->findOneBy(array('uid' => (string) $contact->getId()));
|
->findOneBy(['uid' => (string) $contact->getId()]);
|
||||||
$invoiceAddress = null;
|
$invoiceAddress = null;
|
||||||
$deliveryAddress = null;
|
$deliveryAddress = null;
|
||||||
$senderAddress = null;
|
$senderAddress = null;
|
||||||
@ -135,36 +139,41 @@ class TemplateVars
|
|||||||
$shipping = $this->order->getShippingType();
|
$shipping = $this->order->getShippingType();
|
||||||
$payment = $this->order->getPaymentType();
|
$payment = $this->order->getPaymentType();
|
||||||
|
|
||||||
$positions = array();
|
$positions = [];
|
||||||
|
|
||||||
$mwert = array();
|
$mwert = [];
|
||||||
|
|
||||||
/** @var Orderpos $pos */
|
/** @var Orderpos $pos */
|
||||||
foreach ($this->positions as $pos) {
|
foreach ($this->positions as $pos) {
|
||||||
|
|
||||||
/** @var Position $objDoc */
|
/** @var Position $objDoc */
|
||||||
$objDoc = $this->mongoManager
|
$objDoc = $this->mongoManager->getRepository(Position::class)->findOneBy(['uid' => (string) $pos->getId()]);
|
||||||
->getRepository(Position::class)
|
|
||||||
->findOneBy(['uid' => (string)$pos->getId()]);
|
|
||||||
|
|
||||||
/** @var \TP_Basket_Item $objPosition */
|
/** @var \TP_Basket_Item $objPosition */
|
||||||
$objPosition = unserialize(($pos->getData()));
|
$objPosition = unserialize($pos->getData());
|
||||||
$paperContainer = new PaperContainer();
|
$paperContainer = new PaperContainer();
|
||||||
$paperContainer->parse(simplexml_load_string($shop->getInstall()->getPaperContainer()));
|
$paperContainer->parse(simplexml_load_string($shop->getInstall()->getPaperContainer()));
|
||||||
|
|
||||||
/** @var \PSC\Shop\EntityBundle\Document\Product $productDoc */
|
/** @var \PSC\Shop\EntityBundle\Document\Product $productDoc */
|
||||||
$productDoc = $this->mongoManager
|
$productDoc = $this->mongoManager
|
||||||
->getRepository('PSC\Shop\EntityBundle\Document\Product')
|
->getRepository('PSC\Shop\EntityBundle\Document\Product')
|
||||||
->findOneBy(array('uid' => (string) $pos->getProduct()->getUid()));
|
->findOneBy(['uid' => (string) $pos->getProduct()->getUid()]);
|
||||||
|
|
||||||
if (isset($mwert[$pos->getProduct()->getMwert()])) {
|
if (isset($mwert[$pos->getProduct()->getMwert()])) {
|
||||||
$mwert[$pos->getProduct()->getMwert()] = ['netto' => $pos->getPriceAllNetto() + $mwert[$pos->getProduct()->getMwert()]['netto'], 'brutto' => $pos->getPriceAllBrutto() + $mwert[$pos->getProduct()->getMwert()]['brutto'], 'steuer' => $pos->getPriceAllSteuer() + $mwert[$pos->getProduct()->getMwert()]['steuer']];
|
$mwert[$pos->getProduct()->getMwert()] = [
|
||||||
|
'netto' => $pos->getPriceAllNetto() + $mwert[$pos->getProduct()->getMwert()]['netto'],
|
||||||
|
'brutto' => $pos->getPriceAllBrutto() + $mwert[$pos->getProduct()->getMwert()]['brutto'],
|
||||||
|
'steuer' => $pos->getPriceAllSteuer() + $mwert[$pos->getProduct()->getMwert()]['steuer'],
|
||||||
|
];
|
||||||
} else {
|
} else {
|
||||||
$mwert[$pos->getProduct()->getMwert()] = ['netto' => $pos->getPriceAllNetto(), 'brutto' => $pos->getPriceAllBrutto(), 'steuer' => $pos->getPriceAllSteuer()];
|
$mwert[$pos->getProduct()->getMwert()] = [
|
||||||
|
'netto' => $pos->getPriceAllNetto(),
|
||||||
|
'brutto' => $pos->getPriceAllBrutto(),
|
||||||
|
'steuer' => $pos->getPriceAllSteuer(),
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (trim($pos->getProduct()->getScaledPrice()) != "") {
|
if (trim($pos->getProduct()->getScaledPrice()) != '') {
|
||||||
$tmp = array(
|
$tmp = [
|
||||||
'pos' => $pos->getPos(),
|
'pos' => $pos->getPos(),
|
||||||
'count' => $objPosition->getOptions()['auflage'],
|
'count' => $objPosition->getOptions()['auflage'],
|
||||||
'product' => $pos->getProduct(),
|
'product' => $pos->getProduct(),
|
||||||
@ -174,8 +183,8 @@ class TemplateVars
|
|||||||
'objDoc' => $objDoc,
|
'objDoc' => $objDoc,
|
||||||
'engine' => false,
|
'engine' => false,
|
||||||
'calc' => false,
|
'calc' => false,
|
||||||
'set' => false
|
'set' => false,
|
||||||
);
|
];
|
||||||
} elseif ($pos->hasCalcXml()) {
|
} elseif ($pos->hasCalcXml()) {
|
||||||
$engine = new Engine();
|
$engine = new Engine();
|
||||||
$engine->setPaperRepository($this->paperDb);
|
$engine->setPaperRepository($this->paperDb);
|
||||||
@ -200,7 +209,7 @@ class TemplateVars
|
|||||||
if (isset($objPosition->getOptions()['kalk_artikel'])) {
|
if (isset($objPosition->getOptions()['kalk_artikel'])) {
|
||||||
$engine->setActiveArticle($objPosition->getOptions()['kalk_artikel']);
|
$engine->setActiveArticle($objPosition->getOptions()['kalk_artikel']);
|
||||||
}
|
}
|
||||||
if ($objPosition->getXmlProduct() != "") {
|
if ($objPosition->getXmlProduct() != '') {
|
||||||
$engine->setActiveArticle($objPosition->getXmlProduct());
|
$engine->setActiveArticle($objPosition->getXmlProduct());
|
||||||
}
|
}
|
||||||
$engine->calc();
|
$engine->calc();
|
||||||
@ -214,7 +223,7 @@ class TemplateVars
|
|||||||
$count = $auflage->getRawValue();
|
$count = $auflage->getRawValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
$tmp = array(
|
$tmp = [
|
||||||
'pos' => $pos->getPos(),
|
'pos' => $pos->getPos(),
|
||||||
'count' => $count,
|
'count' => $count,
|
||||||
'product' => $pos->getProduct(),
|
'product' => $pos->getProduct(),
|
||||||
@ -225,10 +234,9 @@ class TemplateVars
|
|||||||
'engine' => $engine,
|
'engine' => $engine,
|
||||||
'set' => false,
|
'set' => false,
|
||||||
'rabatte' => $tmpDiscounts,
|
'rabatte' => $tmpDiscounts,
|
||||||
);
|
];
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$tmp = array(
|
$tmp = [
|
||||||
'pos' => $pos->getPos(),
|
'pos' => $pos->getPos(),
|
||||||
'count' => $pos->getCount(),
|
'count' => $pos->getCount(),
|
||||||
'product' => $pos->getProduct(),
|
'product' => $pos->getProduct(),
|
||||||
@ -238,8 +246,8 @@ class TemplateVars
|
|||||||
'objDoc' => $objDoc,
|
'objDoc' => $objDoc,
|
||||||
'engine' => false,
|
'engine' => false,
|
||||||
'calc' => false,
|
'calc' => false,
|
||||||
'set' => false
|
'set' => false,
|
||||||
);
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
$setConfig = $pos->getProduct()->getSetConfig();
|
$setConfig = $pos->getProduct()->getSetConfig();
|
||||||
@ -254,7 +262,7 @@ class TemplateVars
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (count($setConfig) > 0) {
|
if (count($setConfig) > 0) {
|
||||||
$productSets = array();
|
$productSets = [];
|
||||||
foreach ($setConfig as $conf) {
|
foreach ($setConfig as $conf) {
|
||||||
/** @var Product $product */
|
/** @var Product $product */
|
||||||
$product = $productRepo->findOneBy(['uid' => $conf->article_id]);
|
$product = $productRepo->findOneBy(['uid' => $conf->article_id]);
|
||||||
@ -288,16 +296,17 @@ class TemplateVars
|
|||||||
$tmp['set'] = $productSets;
|
$tmp['set'] = $productSets;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($objDoc && $objDoc->getLayouterId() != "") {
|
if ($objDoc && $objDoc->getLayouterId() != '') {
|
||||||
/** @var Layoutdesigndata $layoutData */
|
/** @var Layoutdesigndata $layoutData */
|
||||||
$layoutData = $this->entityManager
|
$layoutData = $this->entityManager
|
||||||
->getRepository('PSC\Shop\EntityBundle\Entity\Layoutdesigndata')->findOneBy(array('uuid' => $objDoc->getLayouterId()));
|
->getRepository('PSC\Shop\EntityBundle\Entity\Layoutdesigndata')
|
||||||
|
->findOneBy(['uuid' => $objDoc->getLayouterId()]);
|
||||||
|
|
||||||
if ($layoutData) {
|
if ($layoutData) {
|
||||||
$config = $layoutData->getDesign();
|
$config = $layoutData->getDesign();
|
||||||
|
|
||||||
if (isset($config['products'])) {
|
if (isset($config['products'])) {
|
||||||
$productSets = array();
|
$productSets = [];
|
||||||
|
|
||||||
foreach ($config['products'] as $art) {
|
foreach ($config['products'] as $art) {
|
||||||
if (isset($art['uid'])) {
|
if (isset($art['uid'])) {
|
||||||
@ -331,7 +340,6 @@ class TemplateVars
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$tmp['set'] = $productSets;
|
$tmp['set'] = $productSets;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -343,24 +351,65 @@ class TemplateVars
|
|||||||
/** @var \PSC\Shop\EntityBundle\Document\Shop $shop */
|
/** @var \PSC\Shop\EntityBundle\Document\Shop $shop */
|
||||||
$shopDoc = $this->mongoManager
|
$shopDoc = $this->mongoManager
|
||||||
->getRepository('PSC\Shop\EntityBundle\Document\Shop')
|
->getRepository('PSC\Shop\EntityBundle\Document\Shop')
|
||||||
->findOneBy(array('uid' => (string) $shop->getUid()));
|
->findOneBy(['uid' => (string) $shop->getUid()]);
|
||||||
|
|
||||||
if ($this->order->getZahlKosten() != 0) {
|
if ($this->order->getZahlKosten() != 0) {
|
||||||
if (isset($mwert[$payment->getTaxClass()])) {
|
if (isset($mwert[$payment->getTaxClass()])) {
|
||||||
$mwert[$payment->getTaxClass()] = ['netto' => $mwert[$payment->getTaxClass()]['netto'] + $this->order->getZahlKosten(), 'brutto' => $mwert[$payment->getTaxClass()]['brutto'] + $this->order->getZahlKosten() + ($this->order->getZahlKosten() / 100 * $payment->getTaxClass()) , 'steuer' => $mwert[$payment->getTaxClass()]['steuer'] + ($this->order->getZahlKosten() / 100 * $payment->getTaxClass())];
|
$mwert[$payment->getTaxClass()] = [
|
||||||
|
'netto' => $mwert[$payment->getTaxClass()]['netto'] + $this->order->getZahlKosten(),
|
||||||
|
'brutto' =>
|
||||||
|
|
||||||
|
$mwert[$payment->getTaxClass()]['brutto'] +
|
||||||
|
$this->order->getZahlKosten() +
|
||||||
|
(($this->order->getZahlKosten() / 100) * $payment->getTaxClass())
|
||||||
|
,
|
||||||
|
'steuer' =>
|
||||||
|
|
||||||
|
$mwert[$payment->getTaxClass()]['steuer'] +
|
||||||
|
(($this->order->getZahlKosten() / 100) * $payment->getTaxClass())
|
||||||
|
,
|
||||||
|
];
|
||||||
} else {
|
} else {
|
||||||
$mwert[$payment->getTaxClass()] = ['netto' => $this->order->getZahlKosten(), 'brutto' => $this->order->getZahlKosten() + ($this->order->getZahlKosten() / 100 * $payment->getTaxClass()), 'steuer' => $this->order->getZahlKosten() / 100 * $payment->getTaxClass()];
|
$mwert[$payment->getTaxClass()] = [
|
||||||
|
'netto' => $this->order->getZahlKosten(),
|
||||||
|
'brutto' =>
|
||||||
|
|
||||||
|
$this->order->getZahlKosten() +
|
||||||
|
(($this->order->getZahlKosten() / 100) * $payment->getTaxClass())
|
||||||
|
,
|
||||||
|
'steuer' => ($this->order->getZahlKosten() / 100) * $payment->getTaxClass(),
|
||||||
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($this->order->getVersandKosten() != 0) {
|
if ($this->order->getVersandKosten() != 0) {
|
||||||
if (isset($mwert[$shipping->getTaxClass()])) {
|
if (isset($mwert[$shipping->getTaxClass()])) {
|
||||||
$mwert[$shipping->getTaxClass()] = ['netto' => $mwert[$shipping->getTaxClass()]['netto'] + $this->order->getVersandKosten(), 'brutto' => $mwert[$shipping->getTaxClass()]['brutto'] + $this->order->getVersandKosten() + ($this->order->getVersandKosten() / 100 * $payment->getTaxClass()), 'steuer' => $mwert[$shipping->getTaxClass()]['steuer'] + ($this->order->getVersandKosten() / 100 * $payment->getTaxClass())];
|
$mwert[$shipping->getTaxClass()] = [
|
||||||
|
'netto' => $mwert[$shipping->getTaxClass()]['netto'] + $this->order->getVersandKosten(),
|
||||||
|
'brutto' =>
|
||||||
|
|
||||||
|
$mwert[$shipping->getTaxClass()]['brutto'] +
|
||||||
|
$this->order->getVersandKosten() +
|
||||||
|
(($this->order->getVersandKosten() / 100) * $payment->getTaxClass())
|
||||||
|
,
|
||||||
|
'steuer' =>
|
||||||
|
|
||||||
|
$mwert[$shipping->getTaxClass()]['steuer'] +
|
||||||
|
(($this->order->getVersandKosten() / 100) * $payment->getTaxClass())
|
||||||
|
,
|
||||||
|
];
|
||||||
} else {
|
} else {
|
||||||
$mwert[$shipping->getTaxClass()] = ['netto' => $this->order->getVersandKosten(), 'brutto' => $this->order->getVersandKosten() + ($this->order->getVersandKosten() / 100 * $payment->getTaxClass()), 'steuer' => $this->order->getVersandKosten() / 100 * $payment->getTaxClass()];
|
$mwert[$shipping->getTaxClass()] = [
|
||||||
|
'netto' => $this->order->getVersandKosten(),
|
||||||
|
'brutto' =>
|
||||||
|
|
||||||
|
$this->order->getVersandKosten() +
|
||||||
|
(($this->order->getVersandKosten() / 100) * $payment->getTaxClass())
|
||||||
|
,
|
||||||
|
'steuer' => ($this->order->getVersandKosten() / 100) * $payment->getTaxClass(),
|
||||||
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$this->twigVars = [
|
||||||
$this->twigVars = array(
|
|
||||||
'contact' => $contact,
|
'contact' => $contact,
|
||||||
'contactDoc' => $contactObj,
|
'contactDoc' => $contactObj,
|
||||||
'account' => $contact->getAccount(),
|
'account' => $contact->getAccount(),
|
||||||
@ -376,8 +425,8 @@ class TemplateVars
|
|||||||
'orderObj' => $orderObj,
|
'orderObj' => $orderObj,
|
||||||
'orderDoc' => $orderObj,
|
'orderDoc' => $orderObj,
|
||||||
'positions' => $positions,
|
'positions' => $positions,
|
||||||
'orderModel' => $this->orderModel
|
'orderModel' => $this->orderModel,
|
||||||
);
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -397,21 +446,33 @@ class TemplateVars
|
|||||||
|
|
||||||
public static function getHelp()
|
public static function getHelp()
|
||||||
{
|
{
|
||||||
return [[
|
return [
|
||||||
\PSC\Shop\QueueBundle\Help\Shop::getColumn(),
|
[
|
||||||
\PSC\Shop\QueueBundle\Help\Contact::getColumn(),
|
\PSC\Shop\QueueBundle\Help\Shop::getColumn(),
|
||||||
\PSC\Shop\QueueBundle\Help\Payment::getColumn(),
|
\PSC\Shop\QueueBundle\Help\Contact::getColumn(),
|
||||||
\PSC\Shop\QueueBundle\Help\Shipping::getColumn()
|
\PSC\Shop\QueueBundle\Help\Payment::getColumn(),
|
||||||
], [
|
\PSC\Shop\QueueBundle\Help\Shipping::getColumn(),
|
||||||
\PSC\Shop\QueueBundle\Help\Address::getColumn('invoiceAddress.', 'Rechnungsadresse'),
|
],
|
||||||
\PSC\Shop\QueueBundle\Help\Address::getColumn('deliveryAddress.', 'Lieferadresse'),
|
[
|
||||||
\PSC\Shop\QueueBundle\Help\Address::getColumn('senderAddress.', 'Absenderadresse'),
|
\PSC\Shop\QueueBundle\Help\Address::getColumn('invoiceAddress.', 'Rechnungsadresse'),
|
||||||
\PSC\Shop\QueueBundle\Help\Position::getColumn(),
|
\PSC\Shop\QueueBundle\Help\Address::getColumn('deliveryAddress.', 'Lieferadresse'),
|
||||||
]];
|
\PSC\Shop\QueueBundle\Help\Address::getColumn('senderAddress.', 'Absenderadresse'),
|
||||||
|
\PSC\Shop\QueueBundle\Help\Position::getColumn(),
|
||||||
|
],
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getProductTwigVars(Product $product, Contact $contact, $count, $options, $additionalInfos, $netto, $steuer, $brutto, $xmlProduct = "")
|
public function getProductTwigVars(
|
||||||
{
|
Product $product,
|
||||||
|
Contact $contact,
|
||||||
|
$count,
|
||||||
|
$options,
|
||||||
|
$additionalInfos,
|
||||||
|
$netto,
|
||||||
|
$steuer,
|
||||||
|
$brutto,
|
||||||
|
$xmlProduct = '',
|
||||||
|
) {
|
||||||
$shop = $product->getShop();
|
$shop = $product->getShop();
|
||||||
|
|
||||||
$account = new Account();
|
$account = new Account();
|
||||||
@ -422,13 +483,12 @@ class TemplateVars
|
|||||||
/** @var \PSC\Shop\EntityBundle\Document\Product $productDoc */
|
/** @var \PSC\Shop\EntityBundle\Document\Product $productDoc */
|
||||||
$productDoc = $this->mongoManager
|
$productDoc = $this->mongoManager
|
||||||
->getRepository('PSC\Shop\EntityBundle\Document\Product')
|
->getRepository('PSC\Shop\EntityBundle\Document\Product')
|
||||||
->findOneBy(array('uid' => (string) $product->getUid()));
|
->findOneBy(['uid' => (string) $product->getUid()]);
|
||||||
|
|
||||||
/** @var \PSC\Shop\EntityBundle\Document\Contact $contactObj */
|
/** @var \PSC\Shop\EntityBundle\Document\Contact $contactObj */
|
||||||
$contactObj = $this->mongoManager
|
$contactObj = $this->mongoManager
|
||||||
->getRepository('PSC\Shop\EntityBundle\Document\Contact')
|
->getRepository('PSC\Shop\EntityBundle\Document\Contact')
|
||||||
->findOneBy(array('uid' => (string) $contact->getId()));
|
->findOneBy(['uid' => (string) $contact->getId()]);
|
||||||
|
|
||||||
|
|
||||||
$anonym = true;
|
$anonym = true;
|
||||||
if ($contact->getUid() != null) {
|
if ($contact->getUid() != null) {
|
||||||
@ -439,8 +499,8 @@ class TemplateVars
|
|||||||
$anonym = false;
|
$anonym = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($product->getScaledPrice() != "") {
|
if ($product->getScaledPrice() != '') {
|
||||||
$tmp = array(
|
$tmp = [
|
||||||
'count' => $options['auflage'],
|
'count' => $options['auflage'],
|
||||||
'product' => $product,
|
'product' => $product,
|
||||||
'productObj' => $productDoc,
|
'productObj' => $productDoc,
|
||||||
@ -450,7 +510,7 @@ class TemplateVars
|
|||||||
'netto' => $netto,
|
'netto' => $netto,
|
||||||
'steuer' => $steuer,
|
'steuer' => $steuer,
|
||||||
'brutto' => $brutto,
|
'brutto' => $brutto,
|
||||||
);
|
];
|
||||||
} elseif ($product->hasCalcXml() && $product->getType() == 6) {
|
} elseif ($product->hasCalcXml() && $product->getType() == 6) {
|
||||||
$paperContainer = new PaperContainer();
|
$paperContainer = new PaperContainer();
|
||||||
$paperContainer->parse(simplexml_load_string($shop->getInstall()->getPaperContainer()));
|
$paperContainer->parse(simplexml_load_string($shop->getInstall()->getPaperContainer()));
|
||||||
@ -470,14 +530,14 @@ class TemplateVars
|
|||||||
if (isset($options['kalk_artikel'])) {
|
if (isset($options['kalk_artikel'])) {
|
||||||
$engine->setActiveArticle($options['kalk_artikel']);
|
$engine->setActiveArticle($options['kalk_artikel']);
|
||||||
}
|
}
|
||||||
if ($xmlProduct != "") {
|
if ($xmlProduct != '') {
|
||||||
$engine->setActiveArticle($xmlProduct);
|
$engine->setActiveArticle($xmlProduct);
|
||||||
}
|
}
|
||||||
|
|
||||||
$articleCalc = $engine->getArticle();
|
$articleCalc = $engine->getArticle();
|
||||||
|
|
||||||
$tmp = array(
|
$tmp = [
|
||||||
'count' => (isset($options['auflage'])) ? $options['auflage'] : $count,
|
'count' => isset($options['auflage']) ? $options['auflage'] : $count,
|
||||||
'product' => $product,
|
'product' => $product,
|
||||||
'productObj' => $productDoc,
|
'productObj' => $productDoc,
|
||||||
'calc' => $articleCalc,
|
'calc' => $articleCalc,
|
||||||
@ -486,9 +546,9 @@ class TemplateVars
|
|||||||
'netto' => $engine->getPrice(),
|
'netto' => $engine->getPrice(),
|
||||||
'steuer' => $engine->getTaxPrice(),
|
'steuer' => $engine->getTaxPrice(),
|
||||||
'brutto' => $engine->getPrice() + $engine->getTaxPrice(),
|
'brutto' => $engine->getPrice() + $engine->getTaxPrice(),
|
||||||
);
|
];
|
||||||
} else {
|
} else {
|
||||||
$tmp = array(
|
$tmp = [
|
||||||
'count' => $count,
|
'count' => $count,
|
||||||
'product' => $product,
|
'product' => $product,
|
||||||
'productObj' => $productDoc,
|
'productObj' => $productDoc,
|
||||||
@ -498,13 +558,13 @@ class TemplateVars
|
|||||||
'netto' => $netto,
|
'netto' => $netto,
|
||||||
'steuer' => $steuer,
|
'steuer' => $steuer,
|
||||||
'brutto' => $brutto,
|
'brutto' => $brutto,
|
||||||
'additionalInfos' => $additionalInfos
|
'additionalInfos' => $additionalInfos,
|
||||||
);
|
];
|
||||||
}
|
}
|
||||||
/** @var \PSC\Shop\EntityBundle\Document\Shop $shop */
|
/** @var \PSC\Shop\EntityBundle\Document\Shop $shop */
|
||||||
$shopDoc = $this->mongoManager
|
$shopDoc = $this->mongoManager
|
||||||
->getRepository('PSC\Shop\EntityBundle\Document\Shop')
|
->getRepository('PSC\Shop\EntityBundle\Document\Shop')
|
||||||
->findOneBy(array('uid' => (string) $shop->getUid()));
|
->findOneBy(['uid' => (string) $shop->getUid()]);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'contact' => $contact,
|
'contact' => $contact,
|
||||||
|
|||||||
@ -140,8 +140,12 @@ class SaveFiles
|
|||||||
if ($elm = $this->data->getElement($element, $this->contact)) {
|
if ($elm = $this->data->getElement($element, $this->contact)) {
|
||||||
if ($element->getType() == ElementType::Image && $elm['value'] != '') {
|
if ($element->getType() == ElementType::Image && $elm['value'] != '') {
|
||||||
$media = $this->mediaManager->getModelByUuid($elm['value']);
|
$media = $this->mediaManager->getModelByUuid($elm['value']);
|
||||||
$elmMedia = $media->getVariant($element->getImage()->aspectRatio);
|
if ($element->getImage()->aspectRatio == null) {
|
||||||
$formData[$element->getId()] = ['value' => $elmMedia, 'enable' => (bool) $elm['enable']];
|
$formData[$element->getId()] = ['value' => $media, 'enable' => (bool) $elm['enable']];
|
||||||
|
} else {
|
||||||
|
$elmMedia = $media->getVariant($element->getImage()->aspectRatio);
|
||||||
|
$formData[$element->getId()] = ['value' => $elmMedia, 'enable' => (bool) $elm['enable']];
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$formData[$element->getId()] = ['value' => $elm['value'], 'enable' => $elm['enable']];
|
$formData[$element->getId()] = ['value' => $elm['value'], 'enable' => $elm['enable']];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,24 +6,24 @@ use PSC\Shop\MediaBundle\Model\Media;
|
|||||||
|
|
||||||
class Element
|
class Element
|
||||||
{
|
{
|
||||||
private ?ElementBinding $binding = null;
|
private null|ElementBinding $binding = null;
|
||||||
private ?ElementType $type = null;
|
private null|ElementType $type = null;
|
||||||
private ?string $label = "";
|
private null|string $label = '';
|
||||||
private ?bool $optional = false;
|
private null|bool $optional = false;
|
||||||
private ?bool $optionalDefault = true;
|
private null|bool $optionalDefault = true;
|
||||||
private ?string $default1 = "";
|
private null|string $default1 = '';
|
||||||
private ?string $default2 = "";
|
private null|string $default2 = '';
|
||||||
private ?string $default3 = "";
|
private null|string $default3 = '';
|
||||||
private ?string $default4 = "";
|
private null|string $default4 = '';
|
||||||
private ?bool $saveBack = false;
|
private null|bool $saveBack = false;
|
||||||
private ?bool $required = false;
|
private null|bool $required = false;
|
||||||
private ?bool $list = false;
|
private null|bool $list = false;
|
||||||
private ?string $id = "";
|
private null|string $id = '';
|
||||||
|
|
||||||
private ?int $pos = 1;
|
private null|int $pos = 1;
|
||||||
|
|
||||||
private ?Phone $phone = null;
|
private null|Phone $phone = null;
|
||||||
private ?Image $image = null;
|
private null|Image $image = null;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
@ -33,166 +33,168 @@ class Element
|
|||||||
$this->type = ElementType::eMail;
|
$this->type = ElementType::eMail;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getLabel(): ?string
|
public function getLabel(): null|string
|
||||||
{
|
{
|
||||||
return $this->label;
|
return $this->label;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setLabel(?string $label): void
|
public function setLabel(null|string $label): void
|
||||||
{
|
{
|
||||||
$this->label = $label;
|
$this->label = $label;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getOptional(): ?bool
|
public function getOptional(): null|bool
|
||||||
{
|
{
|
||||||
return $this->optional;
|
return $this->optional;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setOptional(?bool $optional): void
|
public function setOptional(null|bool $optional): void
|
||||||
{
|
{
|
||||||
$this->optional = $optional;
|
$this->optional = $optional;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDefault1(): string
|
public function getDefault1(): string
|
||||||
{
|
{
|
||||||
return (string)$this->default1;
|
return (string) $this->default1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setDefault1(?string $default1): void
|
public function setDefault1(null|string $default1): void
|
||||||
{
|
{
|
||||||
$this->default1 = $default1;
|
$this->default1 = $default1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSaveBack(): ?bool
|
public function getSaveBack(): null|bool
|
||||||
{
|
{
|
||||||
return $this->saveBack;
|
return $this->saveBack;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setSaveBack(?bool $saveBack): void
|
public function setSaveBack(null|bool $saveBack): void
|
||||||
{
|
{
|
||||||
$this->saveBack = $saveBack;
|
$this->saveBack = $saveBack;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBinding(): ?ElementBinding
|
public function getBinding(): null|ElementBinding
|
||||||
{
|
{
|
||||||
return $this->binding;
|
return $this->binding;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setBinding(?ElementBinding $binding): void
|
public function setBinding(null|ElementBinding $binding): void
|
||||||
{
|
{
|
||||||
$this->binding = $binding;
|
$this->binding = $binding;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getType(): ?ElementType
|
public function getType(): null|ElementType
|
||||||
{
|
{
|
||||||
return $this->type;
|
return $this->type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setType(?ElementType $type): void
|
public function setType(null|ElementType $type): void
|
||||||
{
|
{
|
||||||
$this->type = $type;
|
$this->type = $type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getId(): ?string
|
public function getId(): null|string
|
||||||
{
|
{
|
||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setId(?string $id): void
|
public function setId(null|string $id): void
|
||||||
{
|
{
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getOptionalDefault(): ?bool
|
public function getOptionalDefault(): null|bool
|
||||||
{
|
{
|
||||||
return $this->optionalDefault;
|
return $this->optionalDefault;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setOptionalDefault(?bool $optionalDefault): void
|
public function setOptionalDefault(null|bool $optionalDefault): void
|
||||||
{
|
{
|
||||||
$this->optionalDefault = $optionalDefault;
|
$this->optionalDefault = $optionalDefault;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDefault2(): string
|
public function getDefault2(): string
|
||||||
{
|
{
|
||||||
return (string)$this->default2;
|
return (string) $this->default2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setDefault2(?string $default2): void
|
public function setDefault2(null|string $default2): void
|
||||||
{
|
{
|
||||||
$this->default2 = $default2;
|
$this->default2 = $default2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDefault3(): string
|
public function getDefault3(): string
|
||||||
{
|
{
|
||||||
return (string)$this->default3;
|
return (string) $this->default3;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setDefault3(?string $default3): void
|
public function setDefault3(null|string $default3): void
|
||||||
{
|
{
|
||||||
$this->default3 = $default3;
|
$this->default3 = $default3;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDefault4(): string
|
public function getDefault4(): string
|
||||||
{
|
{
|
||||||
return (string)$this->default4;
|
return (string) $this->default4;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setDefault4(?string $default4): void
|
public function setDefault4(null|string $default4): void
|
||||||
{
|
{
|
||||||
$this->default4 = $default4;
|
$this->default4 = $default4;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDefaultForType(): null|string|array
|
public function getDefaultForType(): null|string|array
|
||||||
{
|
{
|
||||||
return match($this->type) {
|
return match ($this->type) {
|
||||||
|
|
||||||
default => $this->default1,
|
default => $this->default1,
|
||||||
ElementType::eMail, ElementType::Text, ElementType::Image => $this->default1,
|
ElementType::eMail, ElementType::Text, ElementType::Image => $this->default1,
|
||||||
ElementType::Phone => [$this->default1, $this->default2, $this->default3, $this->default4],
|
ElementType::Phone => [$this->default1, $this->default2, $this->default3, $this->default4],
|
||||||
ElementType::StreetHouseNumber, ElementType::ZipCity => [$this->default1, $this->default2],
|
ElementType::StreetHouseNumber, ElementType::ZipCity => [$this->default1, $this->default2],
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDefaultForTypePreview(): null|string|array
|
public function getDefaultForTypePreview(): null|string|array
|
||||||
{
|
{
|
||||||
return match($this->type) {
|
return match ($this->type) {
|
||||||
default => $this->default1,
|
default => $this->default1,
|
||||||
ElementType::eMail, ElementType::Text, ElementType::Image => $this->default1,
|
ElementType::eMail, ElementType::Text, ElementType::Image => $this->default1,
|
||||||
ElementType::Phone => ['areacode' => $this->default1, 'prefix' => $this->default2, 'number' => $this->default3, 'appendix' => $this->default4],
|
ElementType::Phone => [
|
||||||
|
'areacode' => $this->default1,
|
||||||
|
'prefix' => $this->default2,
|
||||||
|
'number' => $this->default3,
|
||||||
|
'appendix' => $this->default4,
|
||||||
|
],
|
||||||
ElementType::StreetHouseNumber => ['street' => $this->default1, 'houseNumber' => $this->default2],
|
ElementType::StreetHouseNumber => ['street' => $this->default1, 'houseNumber' => $this->default2],
|
||||||
ElementType::ZipCity => ['zip' => $this->default1, 'city' => $this->default2],
|
ElementType::ZipCity => ['zip' => $this->default1, 'city' => $this->default2],
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getRequired(): ?bool
|
public function getRequired(): null|bool
|
||||||
{
|
{
|
||||||
return $this->required;
|
return $this->required;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setRequired(?bool $required): void
|
public function setRequired(null|bool $required): void
|
||||||
{
|
{
|
||||||
$this->required = $required;
|
$this->required = $required;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getImage(): ?Image
|
public function getImage(): null|Image
|
||||||
{
|
{
|
||||||
return $this->image;
|
return $this->image;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setImage(?Image $image): void
|
public function setImage(null|Image $image): void
|
||||||
{
|
{
|
||||||
$this->image = $image;
|
$this->image = $image;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPhone(): ?Phone
|
public function getPhone(): null|Phone
|
||||||
{
|
{
|
||||||
return $this->phone;
|
return $this->phone;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setPhone(?Phone $phone): void
|
public function setPhone(null|Phone $phone): void
|
||||||
{
|
{
|
||||||
$this->phone = $phone;
|
$this->phone = $phone;
|
||||||
}
|
}
|
||||||
@ -202,62 +204,64 @@ class Element
|
|||||||
if ($this->type === ElementType::Image && $value != null && $value instanceof Media) {
|
if ($this->type === ElementType::Image && $value != null && $value instanceof Media) {
|
||||||
$this->setDefault1($value->getUuid());
|
$this->setDefault1($value->getUuid());
|
||||||
$this->image->url = $value->getUrl();
|
$this->image->url = $value->getUrl();
|
||||||
$this->image->variantUrl = $value->getVariant($this->image->aspectRatio)->getUrl();
|
if ($this->image->aspectRatio != null) {
|
||||||
|
$this->image->variantUrl = $value->getVariant($this->image->aspectRatio)->getUrl();
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
|
||||||
$this->image->title = $value->getTitle();
|
$this->image->title = $value->getTitle();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($this->type === ElementType::Phone) {
|
if ($this->type === ElementType::Phone) {
|
||||||
if (isset($value[0]) && !$this->phone->fixAreaCode) {
|
if (isset($value[0]) && !$this->phone->fixAreaCode) {
|
||||||
$this->setDefault1((string)$value[0]);
|
$this->setDefault1((string) $value[0]);
|
||||||
}
|
}
|
||||||
if (isset($value[1]) && !$this->phone->fixPrefix) {
|
if (isset($value[1]) && !$this->phone->fixPrefix) {
|
||||||
$this->setDefault2((string)$value[1]);
|
$this->setDefault2((string) $value[1]);
|
||||||
}
|
}
|
||||||
if (isset($value[2]) && !$this->phone->fixNumber) {
|
if (isset($value[2]) && !$this->phone->fixNumber) {
|
||||||
$this->setDefault3((string)$value[2]);
|
$this->setDefault3((string) $value[2]);
|
||||||
}
|
}
|
||||||
if (isset($value[3]) && !$this->phone->fixAppendix) {
|
if (isset($value[3]) && !$this->phone->fixAppendix) {
|
||||||
$this->setDefault4((string)$value[3]);
|
$this->setDefault4((string) $value[3]);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (is_array($value)) {
|
if (is_array($value)) {
|
||||||
if (isset($value[0])) {
|
if (isset($value[0])) {
|
||||||
$this->setDefault1((string)$value[0]);
|
$this->setDefault1((string) $value[0]);
|
||||||
}
|
}
|
||||||
if (isset($value[1])) {
|
if (isset($value[1])) {
|
||||||
$this->setDefault2((string)$value[1]);
|
$this->setDefault2((string) $value[1]);
|
||||||
}
|
}
|
||||||
if (isset($value[2])) {
|
if (isset($value[2])) {
|
||||||
$this->setDefault3((string)$value[2]);
|
$this->setDefault3((string) $value[2]);
|
||||||
}
|
}
|
||||||
if (isset($value[3])) {
|
if (isset($value[3])) {
|
||||||
$this->setDefault4((string)$value[3]);
|
$this->setDefault4((string) $value[3]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->setDefault1((string)$value);
|
$this->setDefault1((string) $value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPos(): ?int
|
public function getPos(): null|int
|
||||||
{
|
{
|
||||||
return (int)$this->pos;
|
return (int) $this->pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setPos(?int $pos): void
|
public function setPos(null|int $pos): void
|
||||||
{
|
{
|
||||||
$this->pos = $pos;
|
$this->pos = $pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getList(): ?bool
|
public function getList(): null|bool
|
||||||
{
|
{
|
||||||
return $this->list;
|
return $this->list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setList(?bool $list): void
|
public function setList(null|bool $list): void
|
||||||
{
|
{
|
||||||
$this->list = $list;
|
$this->list = $list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -91,31 +91,47 @@ class Formulare extends AbstractController implements Field
|
|||||||
'/data/www/old/application/design/vorlagen/' .
|
'/data/www/old/application/design/vorlagen/' .
|
||||||
$shopEntity->getLayout() .
|
$shopEntity->getLayout() .
|
||||||
'/config/user/registercontact.ini';
|
'/config/user/registercontact.ini';
|
||||||
$handleregister = fopen($filenameregister, 'r');
|
if (file_exists($filenameregister)) {
|
||||||
$txtregister = fread($handleregister, filesize($filenameregister));
|
$handleregister = fopen($filenameregister, 'r');
|
||||||
fclose($handleregister);
|
$txtregister = fread($handleregister, filesize($filenameregister));
|
||||||
|
fclose($handleregister);
|
||||||
|
} else {
|
||||||
|
$txtregister = '';
|
||||||
|
}
|
||||||
|
|
||||||
$filenamepass =
|
$filenamepass =
|
||||||
'/data/www/old/application/design/vorlagen/' .
|
'/data/www/old/application/design/vorlagen/' .
|
||||||
$shopEntity->getLayout() .
|
$shopEntity->getLayout() .
|
||||||
'/config/user/resetpassword.ini';
|
'/config/user/resetpassword.ini';
|
||||||
$handlepass = fopen($filenamepass, 'r');
|
if (file_exists($filenamepass)) {
|
||||||
$txtpass = fread($handlepass, filesize($filenamepass));
|
$handlepass = fopen($filenamepass, 'r');
|
||||||
fclose($handlepass);
|
$txtpass = fread($handlepass, filesize($filenamepass));
|
||||||
|
fclose($handlepass);
|
||||||
|
} else {
|
||||||
|
$txtpass = '';
|
||||||
|
}
|
||||||
|
|
||||||
$filenameaddress =
|
$filenameaddress =
|
||||||
'/data/www/old/application/design/vorlagen/' .
|
'/data/www/old/application/design/vorlagen/' .
|
||||||
$shopEntity->getLayout() .
|
$shopEntity->getLayout() .
|
||||||
'/config/user/updatecontact.ini';
|
'/config/user/updatecontact.ini';
|
||||||
$handleaddress = fopen($filenameaddress, 'r');
|
if (file_exists($filenameaddress)) {
|
||||||
$txtaddress = fread($handleaddress, filesize($filenameaddress));
|
$handleaddress = fopen($filenameaddress, 'r');
|
||||||
fclose($handleaddress);
|
$txtaddress = fread($handleaddress, filesize($filenameaddress));
|
||||||
|
fclose($handleaddress);
|
||||||
|
} else {
|
||||||
|
$txtaddress = '';
|
||||||
|
}
|
||||||
|
|
||||||
$filenameaddaddress =
|
$filenameaddaddress =
|
||||||
'/data/www/old/application/design/vorlagen/' . $shopEntity->getLayout() . '/config/user/address.ini';
|
'/data/www/old/application/design/vorlagen/' . $shopEntity->getLayout() . '/config/user/address.ini';
|
||||||
$handleaddaddress = fopen($filenameaddaddress, 'r');
|
if (file_exists($filenameaddaddress)) {
|
||||||
$txtaddaddress = fread($handleaddaddress, filesize($filenameaddaddress));
|
$handleaddaddress = fopen($filenameaddaddress, 'r');
|
||||||
fclose($handleaddaddress);
|
$txtaddaddress = fread($handleaddaddress, filesize($filenameaddaddress));
|
||||||
|
fclose($handleaddaddress);
|
||||||
|
} else {
|
||||||
|
$txtaddaddress = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$builder
|
$builder
|
||||||
@ -210,54 +226,74 @@ class Formulare extends AbstractController implements Field
|
|||||||
'/data/www/old/application/design/vorlagen/' .
|
'/data/www/old/application/design/vorlagen/' .
|
||||||
$_POST['settings']['bootstrap4General']['layout'] .
|
$_POST['settings']['bootstrap4General']['layout'] .
|
||||||
'/config/user/login.ini';
|
'/config/user/login.ini';
|
||||||
$handlelogin = fopen($filenamelogin, 'w');
|
if (is_dir(dirname($filenamelogin))) {
|
||||||
\fwrite($handlelogin, $event->getForm()->get('bootstrap4Formulare')->get('formularelogin')->getData());
|
$handlelogin = @fopen($filenamelogin, 'w');
|
||||||
fclose($handlelogin);
|
if ($handlelogin !== false) {
|
||||||
|
\fwrite($handlelogin, $event->getForm()->get('bootstrap4Formulare')->get('formularelogin')->getData());
|
||||||
|
fclose($handlelogin);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($event->getForm()->get('bootstrap4Formulare')->get('formulareregisteredit')->getData() == '1') {
|
if ($event->getForm()->get('bootstrap4Formulare')->get('formulareregisteredit')->getData() == '1') {
|
||||||
$filenameregister =
|
$filenameregister =
|
||||||
'/data/www/old/application/design/vorlagen/' .
|
'/data/www/old/application/design/vorlagen/' .
|
||||||
$_POST['settings']['bootstrap4General']['layout'] .
|
$_POST['settings']['bootstrap4General']['layout'] .
|
||||||
'/config/user/registercontact.ini';
|
'/config/user/registercontact.ini';
|
||||||
$handleregister = fopen($filenameregister, 'w');
|
if (is_dir(dirname($filenameregister))) {
|
||||||
\fwrite(
|
$handleregister = @fopen($filenameregister, 'w');
|
||||||
$handleregister,
|
if ($handleregister !== false) {
|
||||||
$event->getForm()->get('bootstrap4Formulare')->get('formulareregister')->getData(),
|
\fwrite(
|
||||||
);
|
$handleregister,
|
||||||
fclose($handleregister);
|
$event->getForm()->get('bootstrap4Formulare')->get('formulareregister')->getData(),
|
||||||
|
);
|
||||||
|
fclose($handleregister);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($event->getForm()->get('bootstrap4Formulare')->get('formularepassedit')->getData() == '1') {
|
if ($event->getForm()->get('bootstrap4Formulare')->get('formularepassedit')->getData() == '1') {
|
||||||
$filenamepass =
|
$filenamepass =
|
||||||
'/data/www/old/application/design/vorlagen/' .
|
'/data/www/old/application/design/vorlagen/' .
|
||||||
$_POST['settings']['bootstrap4General']['layout'] .
|
$_POST['settings']['bootstrap4General']['layout'] .
|
||||||
'/config/user/resetpassword.ini';
|
'/config/user/resetpassword.ini';
|
||||||
$handlepass = fopen($filenamepass, 'w');
|
if (is_dir(dirname($filenamepass))) {
|
||||||
\fwrite($handlepass, $event->getForm()->get('bootstrap4Formulare')->get('formularepass')->getData());
|
$handlepass = @fopen($filenamepass, 'w');
|
||||||
fclose($handlepass);
|
if ($handlepass !== false) {
|
||||||
|
\fwrite($handlepass, $event->getForm()->get('bootstrap4Formulare')->get('formularepass')->getData());
|
||||||
|
fclose($handlepass);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($event->getForm()->get('bootstrap4Formulare')->get('formulareaddressedit')->getData() == '1') {
|
if ($event->getForm()->get('bootstrap4Formulare')->get('formulareaddressedit')->getData() == '1') {
|
||||||
$filenameaddress =
|
$filenameaddress =
|
||||||
'/data/www/old/application/design/vorlagen/' .
|
'/data/www/old/application/design/vorlagen/' .
|
||||||
$_POST['settings']['bootstrap4General']['layout'] .
|
$_POST['settings']['bootstrap4General']['layout'] .
|
||||||
'/config/user/updatecontact.ini';
|
'/config/user/updatecontact.ini';
|
||||||
$handleaddress = fopen($filenameaddress, 'w');
|
if (is_dir(dirname($filenameaddress))) {
|
||||||
\fwrite(
|
$handleaddress = @fopen($filenameaddress, 'w');
|
||||||
$handleaddress,
|
if ($handleaddress !== false) {
|
||||||
$event->getForm()->get('bootstrap4Formulare')->get('formulareaddress')->getData(),
|
\fwrite(
|
||||||
);
|
$handleaddress,
|
||||||
fclose($handleaddress);
|
$event->getForm()->get('bootstrap4Formulare')->get('formulareaddress')->getData(),
|
||||||
|
);
|
||||||
|
fclose($handleaddress);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($event->getForm()->get('bootstrap4Formulare')->get('formulareaddaddressedit')->getData() == '1') {
|
if ($event->getForm()->get('bootstrap4Formulare')->get('formulareaddaddressedit')->getData() == '1') {
|
||||||
$filenameaddaddress =
|
$filenameaddaddress =
|
||||||
'/data/www/old/application/design/vorlagen/' .
|
'/data/www/old/application/design/vorlagen/' .
|
||||||
$_POST['settings']['bootstrap4General']['layout'] .
|
$_POST['settings']['bootstrap4General']['layout'] .
|
||||||
'/config/user/address.ini';
|
'/config/user/address.ini';
|
||||||
$handleaddaddress = fopen($filenameaddaddress, 'w');
|
if (is_dir(dirname($filenameaddaddress))) {
|
||||||
\fwrite(
|
$handleaddaddress = @fopen($filenameaddaddress, 'w');
|
||||||
$handleaddaddress,
|
if ($handleaddaddress !== false) {
|
||||||
$event->getForm()->get('bootstrap4Formulare')->get('formulareaddaddress')->getData(),
|
\fwrite(
|
||||||
);
|
$handleaddaddress,
|
||||||
fclose($handleaddaddress);
|
$event->getForm()->get('bootstrap4Formulare')->get('formulareaddaddress')->getData(),
|
||||||
|
);
|
||||||
|
fclose($handleaddaddress);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$shopEntity->setDisplayArticleCount(
|
$shopEntity->setDisplayArticleCount(
|
||||||
|
|||||||
@ -146,9 +146,13 @@ class Images extends AbstractController implements Field
|
|||||||
'/data/www/old/application/design/vorlagen/' .
|
'/data/www/old/application/design/vorlagen/' .
|
||||||
$_POST['settings']['bootstrap4General']['layout'] .
|
$_POST['settings']['bootstrap4General']['layout'] .
|
||||||
'/config/images.ini';
|
'/config/images.ini';
|
||||||
$handle = fopen($filename, 'w');
|
if (is_dir(dirname($filename))) {
|
||||||
\fwrite($handle, $event->getForm()->get('bootstrap4Images')->get('imagesini')->getData());
|
$handle = fopen($filename, 'w');
|
||||||
fclose($handle);
|
if ($handle !== false) {
|
||||||
|
\fwrite($handle, $event->getForm()->get('bootstrap4Images')->get('imagesini')->getData());
|
||||||
|
fclose($handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$shopEntity->setDisplayArticleCount(
|
$shopEntity->setDisplayArticleCount(
|
||||||
@ -179,4 +183,3 @@ class Images extends AbstractController implements Field
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -66,81 +66,124 @@ if(isset($_POST["settings"]["bootstrap4Images"]["layout"])) {
|
|||||||
} else {
|
} else {
|
||||||
//copy("/data/www/old/public/styles/vorlagen/" . $shopEntity->getLayout() . "/bootstrap/css/style.css","/data/www/old/public/styles/vorlagen/" . $shopEntity->getLayout() . "/bootstrap/css/style_bakup.css");
|
//copy("/data/www/old/public/styles/vorlagen/" . $shopEntity->getLayout() . "/bootstrap/css/style.css","/data/www/old/public/styles/vorlagen/" . $shopEntity->getLayout() . "/bootstrap/css/style_bakup.css");
|
||||||
$filenamedefault = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/layout/default.phtml";
|
$filenamedefault = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/layout/default.phtml";
|
||||||
$handledefault = fopen($filenamedefault, 'r');
|
$txtdefault = '';
|
||||||
$txtdefault = fread($handledefault, filesize($filenamedefault));
|
if (file_exists($filenamedefault)) {
|
||||||
fclose($handledefault);
|
$handledefault = fopen($filenamedefault, 'r');
|
||||||
|
$txtdefault = fread($handledefault, filesize($filenamedefault));
|
||||||
|
fclose($handledefault);
|
||||||
|
}
|
||||||
|
|
||||||
$filenamehauptmenu = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/layout/_hauptmenu.phtml";
|
$filenamehauptmenu = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/layout/_hauptmenu.phtml";
|
||||||
$handlehauptmenu = fopen($filenamehauptmenu, 'r');
|
$txthauptmenu = '';
|
||||||
$txthauptmenu = fread($handlehauptmenu, filesize($filenamehauptmenu));
|
if (file_exists($filenamehauptmenu)) {
|
||||||
fclose($handlehauptmenu);
|
$handlehauptmenu = fopen($filenamehauptmenu, 'r');
|
||||||
|
$txthauptmenu = fread($handlehauptmenu, filesize($filenamehauptmenu));
|
||||||
|
fclose($handlehauptmenu);
|
||||||
|
}
|
||||||
|
|
||||||
$filenamebasketindex = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/templates/basket/index.phtml";
|
$filenamebasketindex = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/templates/basket/index.phtml";
|
||||||
$handlebasketindex = fopen($filenamebasketindex, 'r');
|
$txtbasketindex = '';
|
||||||
$txtbasketindex = fread($handlebasketindex, filesize($filenamebasketindex));
|
if (file_exists($filenamebasketindex)) {
|
||||||
fclose($handlebasketindex);
|
$handlebasketindex = fopen($filenamebasketindex, 'r');
|
||||||
|
$txtbasketindex = fread($handlebasketindex, filesize($filenamebasketindex));
|
||||||
|
fclose($handlebasketindex);
|
||||||
|
}
|
||||||
|
|
||||||
$filenamereview = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/templates/basket/review.phtml";
|
$filenamereview = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/templates/basket/review.phtml";
|
||||||
$handlereview = fopen($filenamereview, 'r');
|
$txtreview = '';
|
||||||
$txtreview = fread($handlereview, filesize($filenamereview));
|
if (file_exists($filenamereview)) {
|
||||||
fclose($handlereview);
|
$handlereview = fopen($filenamereview, 'r');
|
||||||
|
$txtreview = fread($handlereview, filesize($filenamereview));
|
||||||
|
fclose($handlereview);
|
||||||
|
}
|
||||||
|
|
||||||
$filenamefinish = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/templates/basket/finish.phtml";
|
$filenamefinish = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/templates/basket/finish.phtml";
|
||||||
$handlefinish = fopen($filenamefinish, 'r');
|
$txtfinish = '';
|
||||||
$txtfinish = fread($handlefinish, filesize($filenamefinish));
|
if (file_exists($filenamefinish)) {
|
||||||
fclose($handlefinish);
|
$handlefinish = fopen($filenamefinish, 'r');
|
||||||
|
$txtfinish = fread($handlefinish, filesize($filenamefinish));
|
||||||
|
fclose($handlefinish);
|
||||||
|
}
|
||||||
|
|
||||||
$filenamedone = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/templates/basket/done.phtml";
|
$filenamedone = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/templates/basket/done.phtml";
|
||||||
$handledone = fopen($filenamedone, 'r');
|
$txtdone = '';
|
||||||
$txtdone = fread($handledone, filesize($filenamedone));
|
if (file_exists($filenamedone)) {
|
||||||
fclose($handledone);
|
$handledone = fopen($filenamedone, 'r');
|
||||||
|
$txtdone = fread($handledone, filesize($filenamedone));
|
||||||
|
fclose($handledone);
|
||||||
|
}
|
||||||
|
|
||||||
$filenamewarehouse = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/articletemplates/scripts/2_basket_index.phtml";
|
$filenamewarehouse = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/articletemplates/scripts/2_basket_index.phtml";
|
||||||
$handlewarehouse = fopen($filenamewarehouse, 'r');
|
$txtwarehouse = '';
|
||||||
$txtwarehouse = fread($handlewarehouse, filesize($filenamewarehouse));
|
if (file_exists($filenamewarehouse)) {
|
||||||
fclose($handlewarehouse);
|
$handlewarehouse = fopen($filenamewarehouse, 'r');
|
||||||
|
$txtwarehouse = fread($handlewarehouse, filesize($filenamewarehouse));
|
||||||
|
fclose($handlewarehouse);
|
||||||
|
}
|
||||||
|
|
||||||
$filenamekalkproducts = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/articletemplates/scripts/6_basket_index.phtml";
|
$filenamekalkproducts = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/articletemplates/scripts/6_basket_index.phtml";
|
||||||
$handlekalkproducts = fopen($filenamekalkproducts, 'r');
|
$txtkalkproducts = '';
|
||||||
$txtkalkproducts = fread($handlekalkproducts, filesize($filenamekalkproducts));
|
if (file_exists($filenamekalkproducts)) {
|
||||||
fclose($handlekalkproducts);
|
$handlekalkproducts = fopen($filenamekalkproducts, 'r');
|
||||||
|
$txtkalkproducts = fread($handlekalkproducts, filesize($filenamekalkproducts));
|
||||||
|
fclose($handlekalkproducts);
|
||||||
|
}
|
||||||
|
|
||||||
$filenamelogin= "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/templates/user/login.phtml";
|
$filenamelogin= "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/templates/user/login.phtml";
|
||||||
$handlelogin = fopen($filenamelogin, 'r');
|
$txtlogin = '';
|
||||||
$txtlogin = fread($handlelogin, filesize($filenamelogin));
|
if (file_exists($filenamelogin)) {
|
||||||
fclose($handlelogin);
|
$handlelogin = fopen($filenamelogin, 'r');
|
||||||
|
$txtlogin = fread($handlelogin, filesize($filenamelogin));
|
||||||
|
fclose($handlelogin);
|
||||||
|
}
|
||||||
|
|
||||||
$filenameregister= "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/templates/user/register.phtml";
|
$filenameregister= "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/templates/user/register.phtml";
|
||||||
$handleregister = fopen($filenameregister, 'r');
|
$txtregister = '';
|
||||||
$txtregister = fread($handleregister, filesize($filenameregister));
|
if (file_exists($filenameregister)) {
|
||||||
fclose($handleregister);
|
$handleregister = fopen($filenameregister, 'r');
|
||||||
|
$txtregister = fread($handleregister, filesize($filenameregister));
|
||||||
|
fclose($handleregister);
|
||||||
|
}
|
||||||
|
|
||||||
$filenamemyoverview= "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/templates/user/myoverview.phtml";
|
$filenamemyoverview= "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/templates/user/myoverview.phtml";
|
||||||
$handlemyoverview = fopen($filenamemyoverview, 'r');
|
$txtmyoverview = '';
|
||||||
$txtmyoverview = fread($handlemyoverview, filesize($filenamemyoverview));
|
if (file_exists($filenamemyoverview)) {
|
||||||
fclose($handlemyoverview);
|
$handlemyoverview = fopen($filenamemyoverview, 'r');
|
||||||
|
$txtmyoverview = fread($handlemyoverview, filesize($filenamemyoverview));
|
||||||
|
fclose($handlemyoverview);
|
||||||
|
}
|
||||||
|
|
||||||
$filenamewarehousedetails = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/articletemplates/scripts/2.phtml";
|
$filenamewarehousedetails = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/articletemplates/scripts/2.phtml";
|
||||||
$handlewarehousedetails = fopen($filenamewarehousedetails, 'r');
|
$txtwarehousedetails = '';
|
||||||
$txtwarehousedetails = fread($handlewarehousedetails, filesize($filenamewarehousedetails));
|
if (file_exists($filenamewarehousedetails)) {
|
||||||
fclose($handlewarehousedetails);
|
$handlewarehousedetails = fopen($filenamewarehousedetails, 'r');
|
||||||
|
$txtwarehousedetails = fread($handlewarehousedetails, filesize($filenamewarehousedetails));
|
||||||
|
fclose($handlewarehousedetails);
|
||||||
|
}
|
||||||
|
|
||||||
$filenamekalkproductsdetails = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/articletemplates/scripts/6.phtml";
|
$filenamekalkproductsdetails = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/articletemplates/scripts/6.phtml";
|
||||||
$handlekalkproductsdetails = fopen($filenamekalkproductsdetails, 'r');
|
$txtkalkproductsdetails = '';
|
||||||
$txtkalkproductsdetails = fread($handlekalkproductsdetails, filesize($filenamekalkproductsdetails));
|
if (file_exists($filenamekalkproductsdetails)) {
|
||||||
fclose($handlekalkproductsdetails);
|
$handlekalkproductsdetails = fopen($filenamekalkproductsdetails, 'r');
|
||||||
|
$txtkalkproductsdetails = fread($handlekalkproductsdetails, filesize($filenamekalkproductsdetails));
|
||||||
|
fclose($handlekalkproductsdetails);
|
||||||
|
}
|
||||||
|
|
||||||
$filenamesaxoprintdetails = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/articletemplates/scripts/100.phtml";
|
$filenamesaxoprintdetails = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/articletemplates/scripts/100.phtml";
|
||||||
|
$txtsaxoprintdetails = '';
|
||||||
if (file_exists($filenamesaxoprintdetails)) {
|
if (file_exists($filenamesaxoprintdetails)) {
|
||||||
$handlesaxoprintdetails = fopen($filenamesaxoprintdetails, 'r');
|
$handlesaxoprintdetails = fopen($filenamesaxoprintdetails, 'r');
|
||||||
$txtsaxoprintdetails = fread($handlesaxoprintdetails, filesize($filenamesaxoprintdetails));
|
$txtsaxoprintdetails = fread($handlesaxoprintdetails, filesize($filenamesaxoprintdetails));
|
||||||
fclose($handlesaxoprintdetails);
|
fclose($handlesaxoprintdetails);
|
||||||
}
|
}
|
||||||
|
|
||||||
$filenamecmsindex= "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/templates/cms/index.phtml";
|
$filenamecmsindex= "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/templates/cms/index.phtml";
|
||||||
$handlecmsindex = fopen($filenamecmsindex, 'r');
|
$txtcmsindex = '';
|
||||||
$txtcmsindex = fread($handlecmsindex, filesize($filenamecmsindex));
|
if (file_exists($filenamecmsindex)) {
|
||||||
fclose($handlecmsindex);
|
$handlecmsindex = fopen($filenamecmsindex, 'r');
|
||||||
|
$txtcmsindex = fread($handlecmsindex, filesize($filenamecmsindex));
|
||||||
|
fclose($handlecmsindex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$builder
|
$builder
|
||||||
@ -291,96 +334,154 @@ if(isset($_POST["settings"]["bootstrap4Images"]["layout"])) {
|
|||||||
if($event->getForm()->get('bootstrap4Style')->get('write')->getData() == "1") {
|
if($event->getForm()->get('bootstrap4Style')->get('write')->getData() == "1") {
|
||||||
if($event->getForm()->get('bootstrap4Sites')->get('defaultedit')->getData() == "1") {
|
if($event->getForm()->get('bootstrap4Sites')->get('defaultedit')->getData() == "1") {
|
||||||
$filenamedefault = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/layout/default.phtml";
|
$filenamedefault = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/layout/default.phtml";
|
||||||
$handledefault = fopen($filenamedefault, 'w');
|
if (is_dir(dirname($filenamedefault))) {
|
||||||
fputs($handledefault, $event->getForm()->get('bootstrap4Sites')->get('default')->getData());
|
$handledefault = @fopen($filenamedefault, 'w');
|
||||||
fclose($handledefault);
|
if ($handledefault !== false) {
|
||||||
|
fputs($handledefault, $event->getForm()->get('bootstrap4Sites')->get('default')->getData());
|
||||||
|
fclose($handledefault);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if($event->getForm()->get('bootstrap4Sites')->get('hauptmenuedit')->getData() == "1") {
|
if($event->getForm()->get('bootstrap4Sites')->get('hauptmenuedit')->getData() == "1") {
|
||||||
$filenamehauptmenu = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/layout/_hauptmenu.phtml";
|
$filenamehauptmenu = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/layout/_hauptmenu.phtml";
|
||||||
$handlehauptmenu = fopen($filenamehauptmenu, 'w');
|
if (is_dir(dirname($filenamehauptmenu))) {
|
||||||
fputs($handlehauptmenu, $event->getForm()->get('bootstrap4Sites')->get('hauptmenu')->getData());
|
$handlehauptmenu = @fopen($filenamehauptmenu, 'w');
|
||||||
fclose($handlehauptmenu);
|
if ($handlehauptmenu !== false) {
|
||||||
|
fputs($handlehauptmenu, $event->getForm()->get('bootstrap4Sites')->get('hauptmenu')->getData());
|
||||||
|
fclose($handlehauptmenu);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if($event->getForm()->get('bootstrap4Sites')->get('basketindexedit')->getData() == "1") {
|
if($event->getForm()->get('bootstrap4Sites')->get('basketindexedit')->getData() == "1") {
|
||||||
$filenamebasketindex = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/templates/basket/index.phtml";
|
$filenamebasketindex = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/templates/basket/index.phtml";
|
||||||
$handlebasketindex = fopen($filenamebasketindex, 'w');
|
if (is_dir(dirname($filenamebasketindex))) {
|
||||||
fputs($handlebasketindex, $event->getForm()->get('bootstrap4Sites')->get('basketindex')->getData());
|
$handlebasketindex = @fopen($filenamebasketindex, 'w');
|
||||||
fclose($handlebasketindex);
|
if ($handlebasketindex !== false) {
|
||||||
|
fputs($handlebasketindex, $event->getForm()->get('bootstrap4Sites')->get('basketindex')->getData());
|
||||||
|
fclose($handlebasketindex);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if($event->getForm()->get('bootstrap4Sites')->get('basketreviewedit')->getData() == "1") {
|
if($event->getForm()->get('bootstrap4Sites')->get('basketreviewedit')->getData() == "1") {
|
||||||
$filenamereview = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/templates/basket/review.phtml";
|
$filenamereview = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/templates/basket/review.phtml";
|
||||||
$handlereview = fopen($filenamereview, 'w');
|
if (is_dir(dirname($filenamereview))) {
|
||||||
fputs($handlereview, $event->getForm()->get('bootstrap4Sites')->get('basketreview')->getData());
|
$handlereview = @fopen($filenamereview, 'w');
|
||||||
fclose($handlereview);
|
if ($handlereview !== false) {
|
||||||
|
fputs($handlereview, $event->getForm()->get('bootstrap4Sites')->get('basketreview')->getData());
|
||||||
|
fclose($handlereview);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if($event->getForm()->get('bootstrap4Sites')->get('basketfinishedit')->getData() == "1") {
|
if($event->getForm()->get('bootstrap4Sites')->get('basketfinishedit')->getData() == "1") {
|
||||||
$filenamefinish = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/templates/basket/finish.phtml";
|
$filenamefinish = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/templates/basket/finish.phtml";
|
||||||
$handlefinish = fopen($filenamefinish, 'w');
|
if (is_dir(dirname($filenamefinish))) {
|
||||||
fputs($handlefinish, $event->getForm()->get('bootstrap4Sites')->get('basketfinish')->getData());
|
$handlefinish = @fopen($filenamefinish, 'w');
|
||||||
fclose($handlefinish);
|
if ($handlefinish !== false) {
|
||||||
|
fputs($handlefinish, $event->getForm()->get('bootstrap4Sites')->get('basketfinish')->getData());
|
||||||
|
fclose($handlefinish);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if($event->getForm()->get('bootstrap4Sites')->get('basketdoneedit')->getData() == "1") {
|
if($event->getForm()->get('bootstrap4Sites')->get('basketdoneedit')->getData() == "1") {
|
||||||
$filenamedone = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/templates/basket/done.phtml";
|
$filenamedone = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/templates/basket/done.phtml";
|
||||||
$handledone = fopen($filenamedone, 'w');
|
if (is_dir(dirname($filenamedone))) {
|
||||||
fputs($handledone, $event->getForm()->get('bootstrap4Sites')->get('basketdone')->getData());
|
$handledone = @fopen($filenamedone, 'w');
|
||||||
fclose($handledone);
|
if ($handledone !== false) {
|
||||||
|
fputs($handledone, $event->getForm()->get('bootstrap4Sites')->get('basketdone')->getData());
|
||||||
|
fclose($handledone);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if($event->getForm()->get('bootstrap4Sites')->get('warehouseedit')->getData() == "1") {
|
if($event->getForm()->get('bootstrap4Sites')->get('warehouseedit')->getData() == "1") {
|
||||||
$filenamedone = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/articletemplates/scripts/2_basket_index.phtml";
|
$filenamedone = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/articletemplates/scripts/2_basket_index.phtml";
|
||||||
$handledone = fopen($filenamedone, 'w');
|
if (is_dir(dirname($filenamedone))) {
|
||||||
fputs($handledone, $event->getForm()->get('bootstrap4Sites')->get('warehouse')->getData());
|
$handledone = @fopen($filenamedone, 'w');
|
||||||
fclose($handledone);
|
if ($handledone !== false) {
|
||||||
|
fputs($handledone, $event->getForm()->get('bootstrap4Sites')->get('warehouse')->getData());
|
||||||
|
fclose($handledone);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if($event->getForm()->get('bootstrap4Sites')->get('kalkproductsedit')->getData() == "1") {
|
if($event->getForm()->get('bootstrap4Sites')->get('kalkproductsedit')->getData() == "1") {
|
||||||
$filenamedone = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/articletemplates/scripts/6_basket_index.phtml";
|
$filenamedone = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/articletemplates/scripts/6_basket_index.phtml";
|
||||||
$handledone = fopen($filenamedone, 'w');
|
if (is_dir(dirname($filenamedone))) {
|
||||||
fputs($handledone, $event->getForm()->get('bootstrap4Sites')->get('kalkproducts')->getData());
|
$handledone = @fopen($filenamedone, 'w');
|
||||||
fclose($handledone);
|
if ($handledone !== false) {
|
||||||
|
fputs($handledone, $event->getForm()->get('bootstrap4Sites')->get('kalkproducts')->getData());
|
||||||
|
fclose($handledone);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if($event->getForm()->get('bootstrap4Sites')->get('userloginedit')->getData() == "1") {
|
if($event->getForm()->get('bootstrap4Sites')->get('userloginedit')->getData() == "1") {
|
||||||
$filenamedone = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/templates/user/login.phtml";
|
$filenamedone = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/templates/user/login.phtml";
|
||||||
$handledone = fopen($filenamedone, 'w');
|
if (is_dir(dirname($filenamedone))) {
|
||||||
fputs($handledone, $event->getForm()->get('bootstrap4Sites')->get('userlogin')->getData());
|
$handledone = @fopen($filenamedone, 'w');
|
||||||
fclose($handledone);
|
if ($handledone !== false) {
|
||||||
|
fputs($handledone, $event->getForm()->get('bootstrap4Sites')->get('userlogin')->getData());
|
||||||
|
fclose($handledone);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if($event->getForm()->get('bootstrap4Sites')->get('userregisteredit')->getData() == "1") {
|
if($event->getForm()->get('bootstrap4Sites')->get('userregisteredit')->getData() == "1") {
|
||||||
$filenameregister = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/templates/user/register.phtml";
|
$filenameregister = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/templates/user/register.phtml";
|
||||||
$handleregister = fopen($filenameregister, 'w');
|
if (is_dir(dirname($filenameregister))) {
|
||||||
fputs($handleregister, $event->getForm()->get('bootstrap4Sites')->get('userregister')->getData());
|
$handleregister = @fopen($filenameregister, 'w');
|
||||||
fclose($handleregister);
|
if ($handleregister !== false) {
|
||||||
|
fputs($handleregister, $event->getForm()->get('bootstrap4Sites')->get('userregister')->getData());
|
||||||
|
fclose($handleregister);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if($event->getForm()->get('bootstrap4Sites')->get('usermyoverviewedit')->getData() == "1") {
|
if($event->getForm()->get('bootstrap4Sites')->get('usermyoverviewedit')->getData() == "1") {
|
||||||
$filenamemyoverview = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/templates/user/myoverview.phtml";
|
$filenamemyoverview = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/templates/user/myoverview.phtml";
|
||||||
$handlemyoverview = fopen($filenamemyoverview, 'w');
|
if (is_dir(dirname($filenamemyoverview))) {
|
||||||
fputs($handlemyoverview, $event->getForm()->get('bootstrap4Sites')->get('usermyoverview')->getData());
|
$handlemyoverview = @fopen($filenamemyoverview, 'w');
|
||||||
fclose($handlemyoverview);
|
if ($handlemyoverview !== false) {
|
||||||
|
fputs($handlemyoverview, $event->getForm()->get('bootstrap4Sites')->get('usermyoverview')->getData());
|
||||||
|
fclose($handlemyoverview);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if($event->getForm()->get('bootstrap4Sites')->get('warehousedetailsedit')->getData() == "1") {
|
if($event->getForm()->get('bootstrap4Sites')->get('warehousedetailsedit')->getData() == "1") {
|
||||||
$filenamedone = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/articletemplates/scripts/2.phtml";
|
$filenamedone = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/articletemplates/scripts/2.phtml";
|
||||||
$handledone = fopen($filenamedone, 'w');
|
if (is_dir(dirname($filenamedone))) {
|
||||||
fputs($handledone, $event->getForm()->get('bootstrap4Sites')->get('warehousedetails')->getData());
|
$handledone = @fopen($filenamedone, 'w');
|
||||||
fclose($handledone);
|
if ($handledone !== false) {
|
||||||
|
fputs($handledone, $event->getForm()->get('bootstrap4Sites')->get('warehousedetails')->getData());
|
||||||
|
fclose($handledone);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if($event->getForm()->get('bootstrap4Sites')->get('kalkproductsdetailsedit')->getData() == "1") {
|
if($event->getForm()->get('bootstrap4Sites')->get('kalkproductsdetailsedit')->getData() == "1") {
|
||||||
$filenamedone = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/articletemplates/scripts/6.phtml";
|
$filenamedone = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/articletemplates/scripts/6.phtml";
|
||||||
$handledone = fopen($filenamedone, 'w');
|
if (is_dir(dirname($filenamedone))) {
|
||||||
fputs($handledone, $event->getForm()->get('bootstrap4Sites')->get('kalkproductsdetails')->getData());
|
$handledone = @fopen($filenamedone, 'w');
|
||||||
fclose($handledone);
|
if ($handledone !== false) {
|
||||||
|
fputs($handledone, $event->getForm()->get('bootstrap4Sites')->get('kalkproductsdetails')->getData());
|
||||||
|
fclose($handledone);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$filenamesaxoprintdetails = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/articletemplates/scripts/100.phtml";
|
$filenamesaxoprintdetails = "/data/www/old/application/design/vorlagen/" . $shopEntity->getLayout() . "/articletemplates/scripts/100.phtml";
|
||||||
if (file_exists($filenamesaxoprintdetails)) {
|
if (is_dir(dirname($filenamesaxoprintdetails))) {
|
||||||
if($event->getForm()->get('bootstrap4Sites')->get('saxoprintdetailsedit')->getData() == "1") {
|
if($event->getForm()->get('bootstrap4Sites')->get('saxoprintdetailsedit')->getData() == "1") {
|
||||||
$filenamedone = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/articletemplates/scripts/100.phtml";
|
$filenamedone = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/articletemplates/scripts/100.phtml";
|
||||||
$handledone = fopen($filenamedone, 'w');
|
$handledone = @fopen($filenamedone, 'w');
|
||||||
fputs($handledone, $event->getForm()->get('bootstrap4Sites')->get('saxoprintdetails')->getData());
|
if ($handledone !== false) {
|
||||||
fclose($handledone);
|
fputs($handledone, $event->getForm()->get('bootstrap4Sites')->get('saxoprintdetails')->getData());
|
||||||
|
fclose($handledone);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($event->getForm()->get('bootstrap4Sites')->get('cmsindexedit')->getData() == "1") {
|
if($event->getForm()->get('bootstrap4Sites')->get('cmsindexedit')->getData() == "1") {
|
||||||
$filenamecmsindex = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/templates/cms/index.phtml";
|
$filenamecmsindex = "/data/www/old/application/design/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/templates/cms/index.phtml";
|
||||||
$handlecmsindex = fopen($filenamecmsindex, 'w');
|
if (is_dir(dirname($filenamecmsindex))) {
|
||||||
fputs($handlecmsindex, $event->getForm()->get('bootstrap4Sites')->get('cmsindex')->getData());
|
$handlecmsindex = @fopen($filenamecmsindex, 'w');
|
||||||
fclose($handlecmsindex);
|
if ($handlecmsindex !== false) {
|
||||||
|
fputs($handlecmsindex, $event->getForm()->get('bootstrap4Sites')->get('cmsindex')->getData());
|
||||||
|
fclose($handlecmsindex);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$shopEntity->setDisplayArticleCount($event->getForm()->get('bootstrap4General')->get('displayArticleCount')->getData());
|
$shopEntity->setDisplayArticleCount($event->getForm()->get('bootstrap4General')->get('displayArticleCount')->getData());
|
||||||
|
|||||||
@ -118,9 +118,13 @@ if(isset($_POST["settings"]["bootstrap4General"]["layout"])) {
|
|||||||
if($event->getForm()->get('bootstrap4Style')->get('write')->getData() == "1") {
|
if($event->getForm()->get('bootstrap4Style')->get('write')->getData() == "1") {
|
||||||
if($event->getForm()->get('bootstrap4Style')->get('stylecssedit')->getData() == "1") {
|
if($event->getForm()->get('bootstrap4Style')->get('stylecssedit')->getData() == "1") {
|
||||||
$filename = "/data/www/old/public/styles/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/bootstrap/css/style.css";
|
$filename = "/data/www/old/public/styles/vorlagen/" . $_POST["settings"]["bootstrap4General"]["layout"] . "/bootstrap/css/style.css";
|
||||||
$handle = fopen($filename, 'w');
|
if (is_dir(dirname($filename))) {
|
||||||
fputs($handle, $event->getForm()->get('bootstrap4Style')->get('stylecss')->getData());
|
$handle = @fopen($filename, 'w');
|
||||||
fclose($handle);
|
if ($handle !== false) {
|
||||||
|
fputs($handle, $event->getForm()->get('bootstrap4Style')->get('stylecss')->getData());
|
||||||
|
fclose($handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$shopEntity->setDisplayArticleCount($event->getForm()->get('bootstrap4General')->get('displayArticleCount')->getData());
|
$shopEntity->setDisplayArticleCount($event->getForm()->get('bootstrap4General')->get('displayArticleCount')->getData());
|
||||||
|
|||||||
@ -35,7 +35,6 @@
|
|||||||
*/
|
*/
|
||||||
class Orders extends BaseOrders
|
class Orders extends BaseOrders
|
||||||
{
|
{
|
||||||
|
|
||||||
protected $packageExported = false;
|
protected $packageExported = false;
|
||||||
public $mongoLoaded = false;
|
public $mongoLoaded = false;
|
||||||
protected $paymentRef = '';
|
protected $paymentRef = '';
|
||||||
@ -44,13 +43,16 @@ class Orders extends BaseOrders
|
|||||||
protected $invoiceAddressSaved = [];
|
protected $invoiceAddressSaved = [];
|
||||||
protected $deliveryAddressSaved = [];
|
protected $deliveryAddressSaved = [];
|
||||||
protected $senderAddressSaved = [];
|
protected $senderAddressSaved = [];
|
||||||
|
protected $voucherProduct = [];
|
||||||
|
protected $voucherPayment = [];
|
||||||
|
protected $voucherShipping = [];
|
||||||
protected $withTax = true;
|
protected $withTax = true;
|
||||||
protected $gutscheinAbzugNetto = 0;
|
protected $gutscheinAbzugNetto = 0;
|
||||||
protected $sendDataToShipping = false;
|
protected $sendDataToShipping = false;
|
||||||
private array $gutscheinAbzugMwSt = [];
|
private array $gutscheinAbzugMwSt = [];
|
||||||
|
|
||||||
public function preSave($event) {
|
public function preSave($event)
|
||||||
|
{
|
||||||
if ($this->uuid == '') {
|
if ($this->uuid == '') {
|
||||||
$this->uuid = TP_Util::uuid();
|
$this->uuid = TP_Util::uuid();
|
||||||
}
|
}
|
||||||
@ -64,20 +66,20 @@ class Orders extends BaseOrders
|
|||||||
$this->created = date('Y-m-d H:i:s');
|
$this->created = date('Y-m-d H:i:s');
|
||||||
$this->updated = date('Y-m-d H:i:s');
|
$this->updated = date('Y-m-d H:i:s');
|
||||||
}
|
}
|
||||||
if ($this->version == "") {
|
if ($this->version == '') {
|
||||||
$this->version = 0;
|
$this->version = 0;
|
||||||
}
|
}
|
||||||
if ($this->type == "") {
|
if ($this->type == '') {
|
||||||
$this->type = 1;
|
$this->type = 1;
|
||||||
}
|
}
|
||||||
$this->version = $this->version + 1;
|
$this->version = $this->version + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPayment() {
|
public function getPayment()
|
||||||
|
{
|
||||||
$paymenttype = Doctrine_Query::create()
|
$paymenttype = Doctrine_Query::create()
|
||||||
->from('Paymenttype c')
|
->from('Paymenttype c')
|
||||||
->where('c.id = ?', array(intval($this->paymenttype_id)))
|
->where('c.id = ?', [intval($this->paymenttype_id)])
|
||||||
->fetchOne();
|
->fetchOne();
|
||||||
|
|
||||||
if ($paymenttype != false) {
|
if ($paymenttype != false) {
|
||||||
@ -86,10 +88,11 @@ class Orders extends BaseOrders
|
|||||||
return new Paymenttype();
|
return new Paymenttype();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getShipping() {
|
public function getShipping()
|
||||||
|
{
|
||||||
$shippingtype = Doctrine_Query::create()
|
$shippingtype = Doctrine_Query::create()
|
||||||
->from('Shippingtype c')
|
->from('Shippingtype c')
|
||||||
->where('c.id = ?', array(intval($this->shippingtype_id)))
|
->where('c.id = ?', [intval($this->shippingtype_id)])
|
||||||
->fetchOne();
|
->fetchOne();
|
||||||
|
|
||||||
if ($shippingtype != false) {
|
if ($shippingtype != false) {
|
||||||
@ -98,69 +101,64 @@ class Orders extends BaseOrders
|
|||||||
return new Shippingtype();
|
return new Shippingtype();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getInvoiceAddress() {
|
public function getInvoiceAddress()
|
||||||
|
{
|
||||||
if ($this->invoice_address != 0) {
|
if ($this->invoice_address != 0) {
|
||||||
|
|
||||||
$address = Doctrine_Query::create()
|
$address = Doctrine_Query::create()
|
||||||
->from('ContactAddress c')
|
->from('ContactAddress c')
|
||||||
->where('c.id = ?', array(intval($this->invoice_address)))
|
->where('c.id = ?', [intval($this->invoice_address)])
|
||||||
->fetchOne();
|
->fetchOne();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$address = Doctrine_Query::create()
|
$address = Doctrine_Query::create()
|
||||||
->from('ContactAddress c')
|
->from('ContactAddress c')
|
||||||
->where('c.id = ?', array(intval($this->delivery_address)))
|
->where('c.id = ?', [intval($this->delivery_address)])
|
||||||
->fetchOne();
|
->fetchOne();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $address;
|
return $address;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDeliveryAddress() {
|
public function getDeliveryAddress()
|
||||||
|
{
|
||||||
$address = Doctrine_Query::create()
|
$address = Doctrine_Query::create()
|
||||||
->from('ContactAddress c')
|
->from('ContactAddress c')
|
||||||
->where('c.id = ?', array(intval($this->delivery_address)))
|
->where('c.id = ?', [intval($this->delivery_address)])
|
||||||
->fetchOne();
|
->fetchOne();
|
||||||
|
|
||||||
if(!$address) {
|
if (!$address) {
|
||||||
return new ContactAddress();
|
return new ContactAddress();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $address;
|
return $address;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSenderAddress() {
|
public function getSenderAddress()
|
||||||
|
{
|
||||||
if ($this->sender_address != 0) {
|
if ($this->sender_address != 0) {
|
||||||
|
|
||||||
$address = Doctrine_Query::create()
|
$address = Doctrine_Query::create()
|
||||||
->from('ContactAddress c')
|
->from('ContactAddress c')
|
||||||
->where('c.id = ?', array(intval($this->sender_address)))
|
->where('c.id = ?', [intval($this->sender_address)])
|
||||||
->fetchOne();
|
->fetchOne();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$address = Doctrine_Query::create()
|
$address = Doctrine_Query::create()
|
||||||
->from('ContactAddress c')
|
->from('ContactAddress c')
|
||||||
->where('c.id = ?', array(intval($this->invoice_address)))
|
->where('c.id = ?', [intval($this->invoice_address)])
|
||||||
->fetchOne();
|
->fetchOne();
|
||||||
|
|
||||||
}
|
}
|
||||||
if(!$address) {
|
if (!$address) {
|
||||||
$address = Doctrine_Query::create()
|
$address = Doctrine_Query::create()
|
||||||
->from('ContactAddress c')
|
->from('ContactAddress c')
|
||||||
->where('c.id = ?', array(intval($this->delivery_address)))
|
->where('c.id = ?', [intval($this->delivery_address)])
|
||||||
->fetchOne();
|
->fetchOne();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $address;
|
return $address;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getInfo() {
|
public function getInfo()
|
||||||
if($this->info == "") {
|
{
|
||||||
return array();
|
if ($this->info == '') {
|
||||||
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
return json_decode($this->info, true);
|
return json_decode($this->info, true);
|
||||||
@ -183,16 +181,32 @@ class Orders extends BaseOrders
|
|||||||
$this->packageExported = $packageExported;
|
$this->packageExported = $packageExported;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function loadMongo() {
|
public function setVoucherProduct(array $voucherProduct): void
|
||||||
if($this->mongoLoaded) {
|
{
|
||||||
|
$this->voucherProduct = $voucherProduct;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setVoucherPayment(array $voucherPayment): void
|
||||||
|
{
|
||||||
|
$this->voucherPayment = $voucherPayment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setVoucherShipping(array $voucherShipping): void
|
||||||
|
{
|
||||||
|
$this->voucherShipping = $voucherShipping;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function loadMongo()
|
||||||
|
{
|
||||||
|
if ($this->mongoLoaded) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
$dbMongo = TP_Mongo::getInstance();
|
$dbMongo = TP_Mongo::getInstance();
|
||||||
$obj = $dbMongo->Order->findOne(array('uid' => (string)$this->id));
|
$obj = $dbMongo->Order->findOne(['uid' => (string) $this->id]);
|
||||||
if(!$obj) {
|
if (!$obj) {
|
||||||
$obj = $dbMongo->Order->findOne(array('uid' => $this->id));
|
$obj = $dbMongo->Order->findOne(['uid' => $this->id]);
|
||||||
}
|
}
|
||||||
if($obj) {
|
if ($obj) {
|
||||||
$this->packageExported = $obj['packageExported'];
|
$this->packageExported = $obj['packageExported'];
|
||||||
$this->paymentRef = $obj['paymentRef'];
|
$this->paymentRef = $obj['paymentRef'];
|
||||||
$this->mongoLoaded = true;
|
$this->mongoLoaded = true;
|
||||||
@ -201,26 +215,31 @@ class Orders extends BaseOrders
|
|||||||
$this->deliveryAddressSaved = $obj['deliveryAddressSaved'];
|
$this->deliveryAddressSaved = $obj['deliveryAddressSaved'];
|
||||||
$this->senderAddressSaved = $obj['senderAddressSaved'];
|
$this->senderAddressSaved = $obj['senderAddressSaved'];
|
||||||
$this->gutscheinAbzugNetto = $obj['gutscheinAbzugNetto'];
|
$this->gutscheinAbzugNetto = $obj['gutscheinAbzugNetto'];
|
||||||
$this->gutscheinAbzugMwSt = (array)$obj['gutscheinAbzugMwSt'];
|
$this->gutscheinAbzugMwSt = (array) $obj['gutscheinAbzugMwSt'];
|
||||||
$this->sendDataToShipping = $obj['sendDataToShipping'];
|
$this->sendDataToShipping = $obj['sendDataToShipping'];
|
||||||
|
$this->voucherProduct = $obj['voucherProduct'];
|
||||||
|
$this->voucherPayment = $obj['voucherPayment'];
|
||||||
|
$this->voucherShipping = $obj['voucherShipping'];
|
||||||
$this->withTax = $obj['withTax'];
|
$this->withTax = $obj['withTax'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function saveMongo() {
|
public function saveMongo()
|
||||||
|
{
|
||||||
$this->loadMongo();
|
$this->loadMongo();
|
||||||
$dbMongo = TP_Mongo::getInstance();
|
$dbMongo = TP_Mongo::getInstance();
|
||||||
$obj = $dbMongo->Order->findOne(array('uid' => $this->id));
|
$obj = $dbMongo->Order->findOne(['uid' => $this->id]);
|
||||||
if($obj) {
|
if ($obj) {
|
||||||
$dbMongo->Order->updateOne(array('uid' => $this->id), [ '$set' => $this->getArray()]);
|
$dbMongo->Order->updateOne(['uid' => $this->id], ['$set' => $this->getArray()]);
|
||||||
}else{
|
} else {
|
||||||
$dbMongo->Order->insertOne($this->getArray());
|
$dbMongo->Order->insertOne($this->getArray());
|
||||||
} $this->mongoLoaded = true;
|
}
|
||||||
|
$this->mongoLoaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getArray() {
|
public function getArray()
|
||||||
return array(
|
{
|
||||||
|
return [
|
||||||
'uid' => $this->id,
|
'uid' => $this->id,
|
||||||
'packageExported' => $this->packageExported,
|
'packageExported' => $this->packageExported,
|
||||||
'paymentRef' => $this->paymentRef,
|
'paymentRef' => $this->paymentRef,
|
||||||
@ -232,8 +251,11 @@ class Orders extends BaseOrders
|
|||||||
'gutscheinAbzugNetto' => $this->gutscheinAbzugNetto,
|
'gutscheinAbzugNetto' => $this->gutscheinAbzugNetto,
|
||||||
'gutscheinAbzugMwSt' => $this->gutscheinAbzugMwSt,
|
'gutscheinAbzugMwSt' => $this->gutscheinAbzugMwSt,
|
||||||
'sendDataToShipping' => $this->sendDataToShipping,
|
'sendDataToShipping' => $this->sendDataToShipping,
|
||||||
|
'voucherProduct' => $this->voucherProduct,
|
||||||
|
'voucherShipping' => $this->voucherShipping,
|
||||||
|
'voucherPayment' => $this->voucherPayment,
|
||||||
'withTax' => $this->withTax,
|
'withTax' => $this->withTax,
|
||||||
);
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -252,6 +274,7 @@ class Orders extends BaseOrders
|
|||||||
{
|
{
|
||||||
$this->paymentRef = $paymentRef;
|
$this->paymentRef = $paymentRef;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@ -385,6 +408,5 @@ class Orders extends BaseOrders
|
|||||||
{
|
{
|
||||||
$this->gutscheinAbzugMwSt = $gutscheinAbzugMwSt;
|
$this->gutscheinAbzugMwSt = $gutscheinAbzugMwSt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$this->headScript()->prependFile('/scripts/underscore.js');
|
$this->headScript()->prependFile('/scripts/underscore.js');
|
||||||
$this->headScript()->prependFile('/' . $this->designPath . '/basket/index.js');
|
$this->headScript()->prependFile('/' . $this->designPath . '/basket/index.js');
|
||||||
?>
|
?>
|
||||||
@ -15,30 +16,40 @@ $this->headScript()->prependFile('/' . $this->designPath . '/basket/index.js');
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php if ($this->basketIsEmpty) : ?>
|
<?php if ($this->basketIsEmpty): ?>
|
||||||
|
|
||||||
<div class="basket col-xs-12">
|
<div class="basket col-xs-12">
|
||||||
<div class="alert alert-danger" style="min-height:2em;"><?php echo $this->translate('Sie haben keine Artikel im Warenkorb. Keine Bestellung möglich.') ?></div>
|
<div class="alert alert-danger" style="min-height:2em;"><?php echo
|
||||||
|
$this->translate('Sie haben keine Artikel im Warenkorb. Keine Bestellung möglich.')
|
||||||
|
?></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-10 col-xs-offset-1" style="margin-bottom:7em;">
|
<div class="col-xs-10 col-xs-offset-1" style="margin-bottom:7em;">
|
||||||
<h3><?php echo $this->translate('Vielleicht möchten Sie einfach auf der Startseite beginnen?')?></h3>
|
<h3><?php echo $this->translate('Vielleicht möchten Sie einfach auf der Startseite beginnen?') ?></h3>
|
||||||
<br>
|
<br>
|
||||||
<a class="btn btn-lg btn-success" href="/" title="<?= $this->shop->name; ?>: zur Startseite"><?php echo $this->translate('Zur Startseite') ?></a>
|
<a class="btn btn-lg btn-success" href="/" title="<?= $this->shop->name; ?>: zur Startseite"><?php echo
|
||||||
|
$this->translate('Zur Startseite')
|
||||||
|
?></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<?php else : ?>
|
<?php else: ?>
|
||||||
|
|
||||||
<div class="btn-group basket col-xs-12">
|
<div class="btn-group basket col-xs-12">
|
||||||
<label class="btn btn-success active">
|
<label class="btn btn-success active">
|
||||||
<h4><?php echo $this->translate('Schritt') ?> 1: <?php echo $this->translate('Warenkorb') ?></h4><?php echo $this->translate('Übersicht über Ihre Bestellung') ?>
|
<h4><?php echo $this->translate('Schritt') ?> 1: <?php echo $this->translate('Warenkorb') ?></h4><?php echo
|
||||||
|
$this->translate('Übersicht über Ihre Bestellung')
|
||||||
|
?>
|
||||||
</label>
|
</label>
|
||||||
<label class="btn btn-default">
|
<label class="btn btn-default">
|
||||||
<h4><?php echo $this->translate('Schritt') ?> 2: <?php echo $this->translate('Adressdaten') ?></h4><?php echo $this->translate('Rechnungs- und Lieferadresse angeben') ?>
|
<h4><?php echo $this->translate('Schritt') ?> 2: <?php echo $this->translate('Adressdaten') ?></h4><?php echo
|
||||||
|
$this->translate('Rechnungs- und Lieferadresse angeben')
|
||||||
|
?>
|
||||||
</label>
|
</label>
|
||||||
<label class="btn btn-default">
|
<label class="btn btn-default">
|
||||||
<h4><?php echo $this->translate('Schritt') ?> 3: <?php echo $this->translate('AGB') ?></h4><?php echo $this->translate('Bestätigen und bestellen') ?>
|
<h4><?php echo $this->translate('Schritt') ?> 3: <?php echo $this->translate('AGB') ?></h4><?php echo
|
||||||
|
$this->translate('Bestätigen und bestellen')
|
||||||
|
?>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -47,18 +58,26 @@ $this->headScript()->prependFile('/' . $this->designPath . '/basket/index.js');
|
|||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
|
|
||||||
<div class="basketborder">
|
<div class="basketborder">
|
||||||
<?php foreach ($this->articles as $article) : ?>
|
<?php foreach ($this->articles as $article): ?>
|
||||||
<div class="col-lg-12 <?php echo $this->cycle(array("odd", "even"))->next() ?>">
|
<div class="col-lg-12 <?php echo $this->cycle(array('odd', 'even'))->next() ?>">
|
||||||
<?php echo $this->partial($article['article']->typ . '_basket_index.phtml', array('article' => $article, 'currency' => $this->currency, 'shop' => $this->shop, 'finish' => false)) ?>
|
<?php echo
|
||||||
|
$this->partial($article['article']->typ . '_basket_index.phtml', array(
|
||||||
|
'article' => $article,
|
||||||
|
'currency' => $this->currency,
|
||||||
|
'shop' => $this->shop,
|
||||||
|
'finish' => false,
|
||||||
|
))
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/************************************************************************************************************************************************************************
|
/************************************************************************************************************************************************************************
|
||||||
* Zusammenfassung der Bestellung
|
* Zusammenfassung der Bestellung
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -66,11 +85,15 @@ $this->headScript()->prependFile('/' . $this->designPath . '/basket/index.js');
|
|||||||
|
|
||||||
<form action="<?php echo $this->redirect_ssl_path ?>/basket" method="post" class="niceform" enctype="multipart/form-data">
|
<form action="<?php echo $this->redirect_ssl_path ?>/basket" method="post" class="niceform" enctype="multipart/form-data">
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
<?php if(!$this->designsettings()->get('display_no_price')) { ?><thead>
|
<?php if (!$this->designsettings()->get('display_no_price')) { ?><thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="well text-right" style="font-weight:100;"><?php echo $this->translate('Produktpreis'); ?>:</th>
|
<th class="well text-right" style="font-weight:100;"><?php echo
|
||||||
|
$this->translate('Produktpreis')
|
||||||
|
; ?>:</th>
|
||||||
<th class="well"> </th>
|
<th class="well"> </th>
|
||||||
<th class="well text-right" style="font-weight:100;"><?php echo $this->currency->toCurrency($this->productnetto) ?> (<?php echo $this->currency->toCurrency($this->productbrutto) ?>)</th>
|
<th class="well text-right" style="font-weight:100;"><?php echo
|
||||||
|
$this->currency->toCurrency($this->productnetto)
|
||||||
|
?> (<?php echo $this->currency->toCurrency($this->productbrutto) ?>)</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead><?php } ?>
|
</thead><?php } ?>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -78,67 +101,90 @@ $this->headScript()->prependFile('/' . $this->designPath . '/basket/index.js');
|
|||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<td align="right">
|
<td align="right">
|
||||||
<?php if(!$this->designsettings()->get('display_no_price')) { ?><?php echo $this->translate('zzgl. Versand'); ?><?php } else { ?><?php echo $this->translate('Versand'); ?><?php } ?>:
|
<?php if (!$this->designsettings()->get('display_no_price')) { ?><?php echo
|
||||||
|
$this->translate('zzgl. Versand')
|
||||||
|
; ?><?php } else { ?><?php echo $this->translate('Versand'); ?><?php } ?>:
|
||||||
</td>
|
</td>
|
||||||
<td style="width:36%">
|
<td style="width:36%">
|
||||||
<select name="shippingtype" onchange="javascript:this.form.submit()" style="width:100%">
|
<select name="shippingtype" onchange="javascript:this.form.submit()" style="width:100%">
|
||||||
<?php foreach ($this->shippingtype as $shippingtype) : ?>
|
<?php foreach ($this->shippingtype as $shippingtype): ?>
|
||||||
<option value="<?php echo $shippingtype['id'] ?>" <?php echo ($shippingtype['id'] == $this->shippingselected) ? 'selected="selected"' : '' ?>><?php echo $shippingtype['title'] ?></option>
|
<option value="<?php echo $shippingtype['id'] ?>" <?php echo
|
||||||
|
$shippingtype['id'] == $this->shippingselected
|
||||||
|
? 'selected="selected"'
|
||||||
|
: ''
|
||||||
|
?>><?php echo $shippingtype['title'] ?></option>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</select>
|
</select>
|
||||||
<?php echo $this->shippingtypeselected['description'] ?>
|
<?php echo $this->shippingtypeselected['description'] ?>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" style="width:21%">
|
<td align="right" style="width:21%">
|
||||||
<?php if(!$this->designsettings()->get('display_no_price')) { ?><?php echo $this->currency->toCurrency($this->versand) ?> (<?php echo $this->currency->toCurrency($this->versandbrutto) ?>)<?php } ?>
|
<?php if (!$this->designsettings()->get('display_no_price')) { ?><?php echo
|
||||||
|
$this->currency->toCurrency($this->versand)
|
||||||
|
?> (<?php echo $this->currency->toCurrency($this->versandbrutto) ?>)<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php if (!$this->no_payment) : ?>
|
<?php if (!$this->no_payment): ?>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
|
|
||||||
<?php if(!$this->designsettings()->get('display_no_price')) { ?><td align="right">
|
<?php if (!$this->designsettings()->get('display_no_price')) { ?><td align="right">
|
||||||
<?php echo $this->translate('zzgl. Zahlart'); ?>:
|
<?php echo $this->translate('zzgl. Zahlart'); ?>:
|
||||||
</td>
|
</td>
|
||||||
<td style="width:36%">
|
<td style="width:36%">
|
||||||
<select name="paymenttype" onchange="javascript:this.form.submit()" style="width:100%">
|
<select name="paymenttype" onchange="javascript:this.form.submit()" style="width:100%">
|
||||||
<?php foreach ($this->paymenttype as $paymenttype) : ?>
|
<?php foreach ($this->paymenttype as $paymenttype): ?>
|
||||||
<option value="<?php echo $paymenttype['id'] ?>" <?php echo ($paymenttype['id'] == $this->paymentselected) ? 'selected="selected"' : '' ?>><?php echo $paymenttype['title'] ?></option>
|
<option value="<?php echo $paymenttype['id'] ?>" <?php echo
|
||||||
|
$paymenttype['id'] == $this->paymentselected
|
||||||
|
? 'selected="selected"'
|
||||||
|
: ''
|
||||||
|
?>><?php echo $paymenttype['title'] ?></option>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php foreach ($this->paymenttypecontact as $paymenttype) : ?>
|
<?php foreach ($this->paymenttypecontact as $paymenttype): ?>
|
||||||
<option value="<?php echo $paymenttype['id'] ?>" <?php echo ($paymenttype['id'] == $this->paymentselected) ? 'selected="selected"' : '' ?>><?php echo $paymenttype['title'] ?></option>
|
<option value="<?php echo $paymenttype['id'] ?>" <?php echo
|
||||||
|
$paymenttype['id'] == $this->paymentselected
|
||||||
|
? 'selected="selected"'
|
||||||
|
: ''
|
||||||
|
?>><?php echo $paymenttype['title'] ?></option>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</select>
|
</select>
|
||||||
<?php echo $this->paymenttypeselected['description'] ?>
|
<?php echo $this->paymenttypeselected['description'] ?>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" style="width:21%">
|
<td align="right" style="width:21%">
|
||||||
<?php if(!$this->designsettings()->get('display_no_price')) { ?><?php echo $this->currency->toCurrency($this->paymentwert) ?> (<?php echo $this->currency->toCurrency($this->paymentwertbrutto) ?>)<?php } ?>
|
<?php if (!$this->designsettings()->get('display_no_price')) { ?><?php echo
|
||||||
|
$this->currency->toCurrency($this->paymentwert)
|
||||||
|
?> (<?php echo $this->currency->toCurrency($this->paymentwertbrutto) ?>)<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
</tr><?php } ?>
|
</tr><?php } ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if (!$this->designsettings()->get('b2bshop')) : ?>
|
<?php if (!$this->designsettings()->get('b2bshop')): ?>
|
||||||
<?php if(!$this->designsettings()->get('display_no_price')) { ?>
|
<?php if (!$this->designsettings()->get('display_no_price')) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right"><?php echo $this->translate('Gutscheincode') ?>:</td>
|
<td align="right"><?php echo $this->translate('Gutscheincode') ?>:</td>
|
||||||
<td align="right">
|
<td align="right">
|
||||||
<input style="width: 100%;" type="text" name="gutscheincode" value="<?php echo $this->gutscheincode ?>" class="" />
|
<input style="width: 100%;" type="text" name="gutscheincode" value="<?php echo
|
||||||
|
$this->gutscheincode
|
||||||
|
?>" class="" />
|
||||||
</td>
|
</td>
|
||||||
<td align="right" style="width:21%">
|
<td align="right" style="width:21%">
|
||||||
<input class="btn vouchersubmit" type="submit" value="<?php echo $this->translate('Einlösen') ?>" />
|
<input class="btn vouchersubmit" type="submit" value="<?php echo
|
||||||
|
$this->translate('Einlösen')
|
||||||
|
?>" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } endif; ?>
|
<?php }
|
||||||
<?php if ($this->errorGutscheincode == false && $this->gutscheincode != "" && (TP_Basket::getBasket()->getGutscheinAbzugTyp() == TP_Basket::GUTSCHEIN_ALL || TP_Basket::getBasket()->getGutscheinAbzugTyp() == TP_Basket::GUTSCHEIN_PRODUCT)) : ?>
|
endif; ?>
|
||||||
<tr>
|
<?php if (
|
||||||
<td align="right" class="grey"></td>
|
$this->errorGutscheincode == false &&
|
||||||
<td align="right" class="grey">
|
$this->gutscheincode != '' &&
|
||||||
<strong><?php echo $this->translate('abzgl. Gutschein'); ?>:</strong>
|
(
|
||||||
</td>
|
TP_Basket::getBasket()->getGutscheinAbzugTyp() ==
|
||||||
<td align="right" style="width:21%" class="grey">
|
TP_Basket::GUTSCHEIN_ALL ||
|
||||||
<?php echo $this->currency->toCurrency($this->gutscheincodeabzugnetto) ?> (<?php echo $this->currency->toCurrency($this->gutscheincodeabzug) ?>)
|
TP_Basket::getBasket()->getGutscheinAbzugTyp() ==
|
||||||
</td>
|
TP_Basket::GUTSCHEIN_PRODUCT
|
||||||
</tr>
|
)
|
||||||
|
): ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if(!$this->designsettings()->get('display_no_price')) { ?><?php foreach ($this->mwertalle as $key => $mw) : ?>
|
<?php if (!$this->designsettings()->get('display_no_price')) { ?><?php foreach ($this->mwertalle as $key => $mw): ?>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<td align="right">
|
<td align="right">
|
||||||
@ -152,7 +198,7 @@ $this->headScript()->prependFile('/' . $this->designPath . '/basket/index.js');
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?><?php } ?>
|
<?php endforeach; ?><?php } ?>
|
||||||
<?php if(!$this->designsettings()->get('display_no_price')) { ?><tr class="brutto">
|
<?php if (!$this->designsettings()->get('display_no_price')) { ?><tr class="brutto">
|
||||||
|
|
||||||
<td align="right" class="well">
|
<td align="right" class="well">
|
||||||
<h4><?php echo $this->translate('Gesamtbetrag'); ?>:<?php /*echo $this->currency->toCurrency($this->brutto / 1.19)*/ ?></h4>
|
<h4><?php echo $this->translate('Gesamtbetrag'); ?>:<?php /*echo $this->currency->toCurrency($this->brutto / 1.19)*/ ?></h4>
|
||||||
@ -164,7 +210,16 @@ $this->headScript()->prependFile('/' . $this->designPath . '/basket/index.js');
|
|||||||
<h4><?php echo $this->currency->toCurrency($this->brutto) ?></h4>
|
<h4><?php echo $this->currency->toCurrency($this->brutto) ?></h4>
|
||||||
</td>
|
</td>
|
||||||
</tr><?php } ?>
|
</tr><?php } ?>
|
||||||
<?php if ($this->errorGutscheincode == false && $this->gutscheincode != "" && (TP_Basket::getBasket()->getGutscheinAbzugTyp() == TP_Basket::GUTSCHEIN_ALL || TP_Basket::getBasket()->getGutscheinAbzugTyp() == TP_Basket::GUTSCHEIN_PRODUCT)) : ?>
|
<?php if (
|
||||||
|
$this->errorGutscheincode == false &&
|
||||||
|
$this->gutscheincode != '' &&
|
||||||
|
(
|
||||||
|
TP_Basket::getBasket()->getGutscheinAbzugTyp() ==
|
||||||
|
TP_Basket::GUTSCHEIN_ALL ||
|
||||||
|
TP_Basket::getBasket()->getGutscheinAbzugTyp() ==
|
||||||
|
TP_Basket::GUTSCHEIN_PRODUCT
|
||||||
|
)
|
||||||
|
): ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right" class="grey"></td>
|
<td align="right" class="grey"></td>
|
||||||
<td align="right" class="grey">
|
<td align="right" class="grey">
|
||||||
@ -187,7 +242,7 @@ $this->headScript()->prependFile('/' . $this->designPath . '/basket/index.js');
|
|||||||
|
|
||||||
</form>
|
</form>
|
||||||
<form action="<?php echo $this->redirect_ssl_path ?>/basket/review" method="GET" class="niceform" enctype="multipart/form-data" id="form-demo">
|
<form action="<?php echo $this->redirect_ssl_path ?>/basket/review" method="GET" class="niceform" enctype="multipart/form-data" id="form-demo">
|
||||||
<?php if ($this->shop->basketfield1) : ?>
|
<?php if ($this->shop->basketfield1): ?>
|
||||||
<tr class="brutto">
|
<tr class="brutto">
|
||||||
|
|
||||||
<td align="right">
|
<td align="right">
|
||||||
@ -199,7 +254,7 @@ $this->headScript()->prependFile('/' . $this->designPath . '/basket/index.js');
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if ($this->shop->basketfield2) : ?>
|
<?php if ($this->shop->basketfield2): ?>
|
||||||
<tr class="brutto">
|
<tr class="brutto">
|
||||||
|
|
||||||
<td align="right">
|
<td align="right">
|
||||||
@ -216,8 +271,12 @@ $this->headScript()->prependFile('/' . $this->designPath . '/basket/index.js');
|
|||||||
<div style="clear:both"></div>
|
<div style="clear:both"></div>
|
||||||
|
|
||||||
<div class="basketButtons pull-right">
|
<div class="basketButtons pull-right">
|
||||||
<input type="submit" class="btn btn-info btn-lg" title="weiter" onclick="location.href='/';return false;" value="<?php echo $this->translate('weiter einkaufen') ?>" />
|
<input type="submit" class="btn btn-info btn-lg" title="weiter" onclick="location.href='/';return false;" value="<?php echo
|
||||||
<input type="submit" class="btn btn-success btn-lg" title="bestellen" value="<?php echo $this->translate('Zur Kasse gehen') ?>" />
|
$this->translate('weiter einkaufen')
|
||||||
|
?>" />
|
||||||
|
<input type="submit" class="btn btn-success btn-lg" title="bestellen" value="<?php echo
|
||||||
|
$this->translate('Zur Kasse gehen')
|
||||||
|
?>" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
@ -225,15 +284,21 @@ $this->headScript()->prependFile('/' . $this->designPath . '/basket/index.js');
|
|||||||
</div>
|
</div>
|
||||||
<!-- //Mobileview -->
|
<!-- //Mobileview -->
|
||||||
<div class="col-lg-12 mobilebasketprice">
|
<div class="col-lg-12 mobilebasketprice">
|
||||||
<h4 class="h4netprice"><?php echo $this->translate('Produktsumme Brutto'); ?>: <span class="basket_netprice pull-right"><?php echo $this->currency->toCurrency($this->productbrutto) ?></span></h4>
|
<h4 class="h4netprice"><?php echo $this->translate('Produktsumme Brutto'); ?>: <span class="basket_netprice pull-right"><?php echo
|
||||||
|
$this->currency->toCurrency($this->productbrutto)
|
||||||
|
?></span></h4>
|
||||||
<form action="<?php echo $this->redirect_ssl_path ?>/basket" method="post" class="niceform" enctype="multipart/form-data">
|
<form action="<?php echo $this->redirect_ssl_path ?>/basket" method="post" class="niceform" enctype="multipart/form-data">
|
||||||
|
|
||||||
|
|
||||||
<?php echo $this->translate('zzgl. Versand'); ?>:
|
<?php echo $this->translate('zzgl. Versand'); ?>:
|
||||||
<span class="shippingprice pull-right"><?php echo $this->currency->toCurrency($this->versandbrutto) ?></span>
|
<span class="shippingprice pull-right"><?php echo
|
||||||
|
$this->currency->toCurrency($this->versandbrutto)
|
||||||
|
?></span>
|
||||||
<select name="shippingtype" onchange="javascript:this.form.submit()" class="formpaymenttype pull-right">>
|
<select name="shippingtype" onchange="javascript:this.form.submit()" class="formpaymenttype pull-right">>
|
||||||
<?php foreach ($this->shippingtype as $shippingtype) : ?>
|
<?php foreach ($this->shippingtype as $shippingtype): ?>
|
||||||
<option value="<?php echo $shippingtype['id'] ?>" <?php echo ($shippingtype['id'] == $this->shippingselected) ? 'selected="selected"' : '' ?>><?php echo $shippingtype['title'] ?></option>
|
<option value="<?php echo $shippingtype['id'] ?>" <?php echo
|
||||||
|
$shippingtype['id'] == $this->shippingselected ? 'selected="selected"' : ''
|
||||||
|
?>><?php echo $shippingtype['title'] ?></option>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</select>
|
</select>
|
||||||
<hr class="transparenthr" />
|
<hr class="transparenthr" />
|
||||||
@ -243,56 +308,70 @@ $this->headScript()->prependFile('/' . $this->designPath . '/basket/index.js');
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php if (!$this->no_payment) : ?>
|
<?php if (!$this->no_payment): ?>
|
||||||
<?php echo $this->translate('zzgl. Zahlart'); ?>:
|
<?php echo $this->translate('zzgl. Zahlart'); ?>:
|
||||||
<span class="paymentprice pull-right"><?php echo $this->currency->toCurrency($this->paymentwertbrutto) ?></span>
|
<span class="paymentprice pull-right"><?php echo
|
||||||
|
$this->currency->toCurrency($this->paymentwertbrutto)
|
||||||
|
?></span>
|
||||||
<select name="paymenttype" onchange="javascript:this.form.submit()" class="formpaymenttype pull-right">
|
<select name="paymenttype" onchange="javascript:this.form.submit()" class="formpaymenttype pull-right">
|
||||||
<?php foreach ($this->paymenttype as $paymenttype) : ?>
|
<?php foreach ($this->paymenttype as $paymenttype): ?>
|
||||||
<option value="<?php echo $paymenttype['id'] ?>" <?php echo ($paymenttype['id'] == $this->paymentselected) ? 'selected="selected"' : '' ?>><?php echo $paymenttype['title'] ?></option>
|
<option value="<?php echo $paymenttype['id'] ?>" <?php echo
|
||||||
|
$paymenttype['id'] == $this->paymentselected ? 'selected="selected"' : ''
|
||||||
|
?>><?php echo $paymenttype['title'] ?></option>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php foreach ($this->paymenttypecontact as $paymenttype) : ?>
|
<?php foreach ($this->paymenttypecontact as $paymenttype): ?>
|
||||||
<option value="<?php echo $paymenttype['id'] ?>" <?php echo ($paymenttype['id'] == $this->paymentselected) ? 'selected="selected"' : '' ?>><?php echo $paymenttype['title'] ?></option>
|
<option value="<?php echo $paymenttype['id'] ?>" <?php echo
|
||||||
|
$paymenttype['id'] == $this->paymentselected ? 'selected="selected"' : ''
|
||||||
|
?>><?php echo $paymenttype['title'] ?></option>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<hr class="transparenthr" />
|
<hr class="transparenthr" />
|
||||||
<span class="paymenttypdescription"><?php echo $this->paymenttypeselected['description'] ?></span>
|
<span class="paymenttypdescription"><?php echo
|
||||||
|
$this->paymenttypeselected['description']
|
||||||
|
?></span>
|
||||||
<hr class="transparenthr" />
|
<hr class="transparenthr" />
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if (!$this->designsettings()->get('b2bshop')) : ?>
|
<?php if (!$this->designsettings()->get('b2bshop')): ?>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label for="basket_voucher" class="control-label"><?php echo $this->translate('Gutscheincode') ?></label>
|
<label for="basket_voucher" class="control-label"><?php echo
|
||||||
|
$this->translate('Gutscheincode')
|
||||||
|
?></label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<input type="text" name="gutscheincode" value="<?php echo $this->gutscheincode ?>" class="basketmobileform" />
|
<input type="text" name="gutscheincode" value="<?php echo $this->gutscheincode ?>" class="basketmobileform" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group clearfix">
|
<div class="control-group clearfix">
|
||||||
<?php if((isset($_POST["gutscheincode"]) and $_POST["gutscheincode"] != "") and $this->gutscheincode == "") { ?>
|
<?php if (
|
||||||
|
(isset($_POST['gutscheincode']) and $_POST['gutscheincode'] != '') and
|
||||||
|
$this->gutscheincode == ''
|
||||||
|
) { ?>
|
||||||
<strong class="danger">Gutscheincode ungültig</strong>
|
<strong class="danger">Gutscheincode ungültig</strong>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<div class="controls pull-right">
|
<div class="controls pull-right">
|
||||||
<input class="btn vouchersubmit" type="submit" value="<?php echo $this->translate('Einlösen') ?>" />
|
<input class="btn vouchersubmit" type="submit" value="<?php echo
|
||||||
|
$this->translate('Einlösen')
|
||||||
|
?>" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
||||||
<?php if ($this->errorGutscheincode == false && $this->gutscheincode != "" && (TP_Basket::getBasket()->getGutscheinAbzugTyp() == TP_Basket::GUTSCHEIN_ALL || TP_Basket::getBasket()->getGutscheinAbzugTyp() == TP_Basket::GUTSCHEIN_PRODUCT)) : ?>
|
|
||||||
<hr class="transparenthr" />
|
|
||||||
<?php echo $this->translate('abzgl. Gutschein'); ?>: <span class="basketvoucherprice pull-right"><?php echo $this->currency->toCurrency($this->gutscheincodeabzug) ?></span><br />
|
|
||||||
<?php echo $this->translate('Preis abzgl. Gutschein'); ?>: <span class="basketvoucherprice pull-right"><?php echo $this->currency->toCurrency($this->productbruttogutschein) ?></span>
|
|
||||||
<?php endif; ?>
|
|
||||||
<hr class="transparenthr" />
|
<hr class="transparenthr" />
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<?php foreach ($this->mwertalle as $key => $mw) : ?>
|
<?php foreach ($this->mwertalle as $key => $mw): ?>
|
||||||
<span class="basketVattxt"><?php echo $this->translate('enth. MwSt.'); ?><?= $key ?>%:</span> <span class="basketVatprice pull-right"><?php echo $this->currency->toCurrency($mw) ?></span><br />
|
<span class="basketVattxt"><?php echo $this->translate('enth. MwSt.'); ?><?= $key ?>%:</span> <span class="basketVatprice pull-right"><?php echo
|
||||||
|
$this->currency->toCurrency($mw)
|
||||||
|
?></span><br />
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
<h4 class="h4grossprice"><?php echo $this->translate('Gesamtsumme Brutto'); ?>:<?php /*echo $this->currency->toCurrency($this->brutto / 1.19)*/ ?> <span class="basket_grossprice pull-right"><?php echo $this->currency->toCurrency($this->brutto) ?></span></h4>
|
<h4 class="h4grossprice"><?php echo $this->translate('Gesamtsumme Brutto'); ?>:<?php /*echo $this->currency->toCurrency($this->brutto / 1.19)*/ ?> <span class="basket_grossprice pull-right"><?php echo
|
||||||
|
$this->currency->toCurrency($this->brutto)
|
||||||
|
?></span></h4>
|
||||||
</form>
|
</form>
|
||||||
<form action="<?php echo $this->redirect_ssl_path ?>/basket/review" method="GET" class="niceform" enctype="multipart/form-data" id="basketformmobile">
|
<form action="<?php echo $this->redirect_ssl_path ?>/basket/review" method="GET" class="niceform" enctype="multipart/form-data" id="basketformmobile">
|
||||||
<?php if ($this->shop->basketfield1) : ?>
|
<?php if ($this->shop->basketfield1): ?>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label for="basket_fild1" class="control-label"><?php echo $this->shop->basketfield1 ?></label>
|
<label for="basket_fild1" class="control-label"><?php echo $this->shop->basketfield1 ?></label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
@ -300,7 +379,7 @@ $this->headScript()->prependFile('/' . $this->designPath . '/basket/index.js');
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if ($this->shop->basketfield2) : ?>
|
<?php if ($this->shop->basketfield2): ?>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label for="basket_fild2" class="control-label"><?php echo $this->shop->basketfield2 ?></label>
|
<label for="basket_fild2" class="control-label"><?php echo $this->shop->basketfield2 ?></label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
@ -309,8 +388,12 @@ $this->headScript()->prependFile('/' . $this->designPath . '/basket/index.js');
|
|||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<div class="basketButtons pull-right">
|
<div class="basketButtons pull-right">
|
||||||
<input type="submit" class="btn btn-info btn-lg" title="weiter" onclick="location.href='/';return false;" value="<?php echo $this->translate('weiter einkaufen') ?>" />
|
<input type="submit" class="btn btn-info btn-lg" title="weiter" onclick="location.href='/';return false;" value="<?php echo
|
||||||
<input type="submit" class="btn btn-success btn-lg" title="bestellen" value="<?php echo $this->translate('Zur Kasse gehen') ?>" />
|
$this->translate('weiter einkaufen')
|
||||||
|
?>" />
|
||||||
|
<input type="submit" class="btn btn-success btn-lg" title="bestellen" value="<?php echo
|
||||||
|
$this->translate('Zur Kasse gehen')
|
||||||
|
?>" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div><!-- //mobilebasketprice -->
|
</div><!-- //mobilebasketprice -->
|
||||||
|
|||||||
@ -1676,9 +1676,7 @@ class BasketController extends TP_Controller_Action
|
|||||||
} else {
|
} else {
|
||||||
$basket->setPreisNetto($netto);
|
$basket->setPreisNetto($netto);
|
||||||
if ($netto > 0) {
|
if ($netto > 0) {
|
||||||
$basket->setPreisBrutto(
|
$basket->setPreisBrutto($netto + $versand + $mwert + $this->view->paymentwert);
|
||||||
($netto + $versand + $mwert + $this->view->paymentwert) - ($basket->getGutscheinAbzug() * 1),
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
$basket->setPreisBrutto($versand + $mwert + $this->view->paymentwert);
|
$basket->setPreisBrutto($versand + $mwert + $this->view->paymentwert);
|
||||||
}
|
}
|
||||||
@ -1886,6 +1884,9 @@ class BasketController extends TP_Controller_Action
|
|||||||
$order->versandkosten = $basket->getVersandkosten();
|
$order->versandkosten = $basket->getVersandkosten();
|
||||||
$order->lang = strtolower(Zend_Registry::get('locale')->getLanguage());
|
$order->lang = strtolower(Zend_Registry::get('locale')->getLanguage());
|
||||||
$order->mwertalle = Zend_Json::encode($basket->getMWert());
|
$order->mwertalle = Zend_Json::encode($basket->getMWert());
|
||||||
|
$order->setVoucherProduct($basket->getVoucherProduct());
|
||||||
|
$order->setVoucherShipping($basket->getVoucherShipping());
|
||||||
|
$order->setVoucherPayment($basket->getVoucherPayment());
|
||||||
|
|
||||||
$order->save();
|
$order->save();
|
||||||
$order->saveMongo();
|
$order->saveMongo();
|
||||||
@ -1961,10 +1962,7 @@ class BasketController extends TP_Controller_Action
|
|||||||
$basket->setShippingtype(0);
|
$basket->setShippingtype(0);
|
||||||
$basket->setPreisNetto($basket->getProduktPreisNetto());
|
$basket->setPreisNetto($basket->getProduktPreisNetto());
|
||||||
$basket->setPreisSteuer($basket->getProduktPreisSteuer());
|
$basket->setPreisSteuer($basket->getProduktPreisSteuer());
|
||||||
$basket->setPreisBrutto(
|
$basket->setPreisBrutto($basket->getProduktPreisSteuer() + $basket->getProduktPreisNetto());
|
||||||
($basket->getProduktPreisSteuer() + $basket->getProduktPreisNetto()) -
|
|
||||||
($basket->getGutscheinAbzug() * 1),
|
|
||||||
);
|
|
||||||
$basket->setVersandkosten(0);
|
$basket->setVersandkosten(0);
|
||||||
$basket->setVersandBrutto(0);
|
$basket->setVersandBrutto(0);
|
||||||
} else {
|
} else {
|
||||||
@ -2016,9 +2014,7 @@ class BasketController extends TP_Controller_Action
|
|||||||
|
|
||||||
$basket->setPreisNetto($basket->getProduktPreisNetto() + $versand);
|
$basket->setPreisNetto($basket->getProduktPreisNetto() + $versand);
|
||||||
$basket->setPreisSteuer($basket->getProduktPreisSteuer() + $mwert);
|
$basket->setPreisSteuer($basket->getProduktPreisSteuer() + $mwert);
|
||||||
$basket->setPreisBrutto(
|
$basket->setPreisBrutto($basket->getPreisNetto() + $basket->getPreisSteuer());
|
||||||
($basket->getPreisNetto() + $basket->getPreisSteuer()) - ($basket->getGutscheinAbzug() * 1),
|
|
||||||
);
|
|
||||||
$basket->setVersandkosten($versand);
|
$basket->setVersandkosten($versand);
|
||||||
$basket->setVersandBrutto($versand + $mwert);
|
$basket->setVersandBrutto($versand + $mwert);
|
||||||
}
|
}
|
||||||
@ -2516,6 +2512,10 @@ class BasketController extends TP_Controller_Action
|
|||||||
$basket->setGutscheinAbzugTyp(TP_Basket::GUTSCHEIN_ALL);
|
$basket->setGutscheinAbzugTyp(TP_Basket::GUTSCHEIN_ALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$bruttoGesamt = 0;
|
||||||
|
$bruttoGesamtForVoucher = [];
|
||||||
|
$bruttoGesamtShippingForVoucher = [];
|
||||||
|
$bruttoGesamtPaymentForVoucher = [];
|
||||||
$basket->setGutscheinAbzug(0);
|
$basket->setGutscheinAbzug(0);
|
||||||
$basket->setGutscheinAbzugNetto(0);
|
$basket->setGutscheinAbzugNetto(0);
|
||||||
$basket->setGutscheinAbzugMwSt([]);
|
$basket->setGutscheinAbzugMwSt([]);
|
||||||
@ -2675,7 +2675,7 @@ class BasketController extends TP_Controller_Action
|
|||||||
}
|
}
|
||||||
$art->setHasGutschein(false);
|
$art->setHasGutschein(false);
|
||||||
|
|
||||||
if ($basket->getGutschein() != '') {
|
if (false && $basket->getGutschein() != '') {
|
||||||
$articleGroups = array_keys($article->ArticleGroupArticle->toKeyValueArray(
|
$articleGroups = array_keys($article->ArticleGroupArticle->toKeyValueArray(
|
||||||
'articlegroup_id',
|
'articlegroup_id',
|
||||||
'article_id',
|
'article_id',
|
||||||
@ -2742,6 +2742,15 @@ class BasketController extends TP_Controller_Action
|
|||||||
$summewarenwert[$prozent] +
|
$summewarenwert[$prozent] +
|
||||||
($art->getnetto() * $art->getCount()) +
|
($art->getnetto() * $art->getCount()) +
|
||||||
($art->getNetto() * $art->getCount());
|
($art->getNetto() * $art->getCount());
|
||||||
|
|
||||||
|
if (!isset($bruttoGesamtForVoucher[$prozent])) {
|
||||||
|
$bruttoGesamtForVoucher[$prozent] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$bruttoGesamtForVoucher[$prozent] =
|
||||||
|
$bruttoGesamtForVoucher[$prozent] +
|
||||||
|
round((($art->getnetto() * $art->getCount()) / 100) * $prozent, 2) +
|
||||||
|
($art->getnetto() * $art->getCount());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$mwert = 0;
|
$mwert = 0;
|
||||||
@ -2751,9 +2760,9 @@ class BasketController extends TP_Controller_Action
|
|||||||
$basket->setProduktPreisSteuer($mwert);
|
$basket->setProduktPreisSteuer($mwert);
|
||||||
$this->view->productmwert = $mwert;
|
$this->view->productmwert = $mwert;
|
||||||
$this->view->productbrutto = $netto + $mwert;
|
$this->view->productbrutto = $netto + $mwert;
|
||||||
|
$usedBruttoVoucher = $this->view->productbrutto;
|
||||||
$this->view->productnetto = $netto;
|
$this->view->productnetto = $netto;
|
||||||
$this->view->gutschein = false;
|
$this->view->gutschein = false;
|
||||||
|
|
||||||
if ($creditSystemMinBasketValue > 0 && $creditSystemMinBasketValue > ($netto + $mwert)) {
|
if ($creditSystemMinBasketValue > 0 && $creditSystemMinBasketValue > ($netto + $mwert)) {
|
||||||
$this->view->priorityMessenger('Warenwert zu niedrig', 'success');
|
$this->view->priorityMessenger('Warenwert zu niedrig', 'success');
|
||||||
$basket->setGutschein('');
|
$basket->setGutschein('');
|
||||||
@ -2837,7 +2846,6 @@ class BasketController extends TP_Controller_Action
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$basket->setShippingtype($shippingtype['id']);
|
$basket->setShippingtype($shippingtype['id']);
|
||||||
$this->view->shippingselected = $shippingtype['id'];
|
$this->view->shippingselected = $shippingtype['id'];
|
||||||
$this->view->shippingtypeselected = $shippingtype;
|
$this->view->shippingtypeselected = $shippingtype;
|
||||||
@ -2879,48 +2887,34 @@ class BasketController extends TP_Controller_Action
|
|||||||
if ($versand > 0 || $versandpos > 0) {
|
if ($versand > 0 || $versandpos > 0) {
|
||||||
$versand = $versand + $versandpos;
|
$versand = $versand + $versandpos;
|
||||||
}
|
}
|
||||||
if (false && $creditSystemRest > 0 && $creditSystemShipping) {
|
$maxMwert = array_search(max($bruttoGesamtForVoucher), $bruttoGesamtForVoucher);
|
||||||
|
$maxValue = max($bruttoGesamtForVoucher);
|
||||||
|
|
||||||
|
if ($maxValue > $versand) {
|
||||||
|
$shippingtype['mwert'] = $maxMwert;
|
||||||
|
}
|
||||||
|
if ($creditSystemShipping) {
|
||||||
$mwert =
|
$mwert =
|
||||||
$mwert + round(($versand / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])), 2);
|
$mwert + round(($versand / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])), 2);
|
||||||
if (
|
$basket->setGutscheinAbzug(
|
||||||
$creditSystemRest >
|
$basket->getGutscheinAbzug() +
|
||||||
(
|
$versand +
|
||||||
round(($versand / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])), 2) +
|
|
||||||
$versand
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
$basket->setGutscheinAbzug(
|
|
||||||
$basket->getGutscheinAbzug() +
|
|
||||||
$versand +
|
|
||||||
round(($versand / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])), 2),
|
|
||||||
);
|
|
||||||
$basket->setGutscheinAbzugNetto($basket->getGutscheinAbzugNetto() + $versand);
|
|
||||||
$basket->setGutscheinAbzugMwStKey(
|
|
||||||
(float) str_replace('%', '', $shippingtype['mwert']),
|
|
||||||
round(($versand / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])), 2),
|
round(($versand / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])), 2),
|
||||||
);
|
);
|
||||||
$creditSystemRest = ($creditSystemRest - $mwert) - $versand;
|
$basket->setGutscheinAbzugNetto($basket->getGutscheinAbzugNetto() + $versand);
|
||||||
} else {
|
$basket->setGutscheinAbzugMwStKey(
|
||||||
$basket->setGutscheinAbzug($basket->getGutscheinAbzug() + $creditSystemRest);
|
(float) str_replace('%', '', $shippingtype['mwert']),
|
||||||
$basket->setGutscheinAbzugNetto(
|
round(($versand / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])), 2),
|
||||||
($basket->getGutscheinAbzugNetto() + $creditSystemRest) -
|
);
|
||||||
round(
|
$creditSystemRest = ($creditSystemRest - $mwert) - $versand;
|
||||||
($creditSystemRest / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])),
|
|
||||||
2,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
$basket->setGutscheinAbzugMwStKey(
|
|
||||||
(float) str_replace('%', '', $shippingtype['mwert']),
|
|
||||||
round(
|
|
||||||
($creditSystemRest / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])),
|
|
||||||
2,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
$mwertalle[str_replace('%', '', $shippingtype['mwert'])] =
|
$mwertalle[str_replace('%', '', $shippingtype['mwert'])] =
|
||||||
$mwertalle[str_replace('%', '', $shippingtype['mwert'])] + $versand;
|
$mwertalle[str_replace('%', '', $shippingtype['mwert'])] + $versand;
|
||||||
$this->view->versandbrutto =
|
$this->view->versandbrutto =
|
||||||
$versand + round(($versand / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])), 2);
|
$versand + round(($versand / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])), 2);
|
||||||
|
$bruttoGesamtShippingForVoucher[str_replace('%', '', $shippingtype['mwert'])] =
|
||||||
|
$this->view->versandbrutto;
|
||||||
|
$usedBruttoVoucher += round($this->view->versandbrutto, 2);
|
||||||
} else {
|
} else {
|
||||||
$mwert =
|
$mwert =
|
||||||
$mwert + round(($versand / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])), 2);
|
$mwert + round(($versand / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])), 2);
|
||||||
@ -3026,49 +3020,35 @@ class BasketController extends TP_Controller_Action
|
|||||||
if ($versand > 0 || $versandpos > 0) {
|
if ($versand > 0 || $versandpos > 0) {
|
||||||
$versand = $versand + $versandpos;
|
$versand = $versand + $versandpos;
|
||||||
}
|
}
|
||||||
|
$maxMwert = array_search(max($bruttoGesamtForVoucher), $bruttoGesamtForVoucher);
|
||||||
|
$maxValue = max($bruttoGesamtForVoucher);
|
||||||
|
|
||||||
if (false && $creditSystemRest > 0 && $creditSystemShipping) {
|
if ($maxValue > $versand) {
|
||||||
|
$shippingtype['mwert'] = $maxMwert;
|
||||||
|
}
|
||||||
|
if ($creditSystemShipping) {
|
||||||
$mwert =
|
$mwert =
|
||||||
$mwert + round(($versand / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])), 2);
|
$mwert + round(($versand / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])), 2);
|
||||||
if (
|
$basket->setGutscheinAbzug(
|
||||||
$creditSystemRest >
|
$basket->getGutscheinAbzug() +
|
||||||
(
|
$versand +
|
||||||
round(($versand / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])), 2) +
|
|
||||||
$versand
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
$basket->setGutscheinAbzug(
|
|
||||||
$basket->getGutscheinAbzug() +
|
|
||||||
$versand +
|
|
||||||
round(($versand / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])), 2),
|
|
||||||
);
|
|
||||||
$basket->setGutscheinAbzugNetto($basket->getGutscheinAbzugNetto() + $versand);
|
|
||||||
$basket->setGutscheinAbzugMwStKey(
|
|
||||||
(float) str_replace('%', '', $shippingtype['mwert']),
|
|
||||||
round(($versand / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])), 2),
|
round(($versand / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])), 2),
|
||||||
);
|
);
|
||||||
$creditSystemRest = ($creditSystemRest - $mwert) - $versand;
|
$basket->setGutscheinAbzugNetto($basket->getGutscheinAbzugNetto() + $versand);
|
||||||
} else {
|
$basket->setGutscheinAbzugMwStKey(
|
||||||
$basket->setGutscheinAbzug($basket->getGutscheinAbzug() + $creditSystemRest);
|
(float) str_replace('%', '', $shippingtype['mwert']),
|
||||||
$basket->setGutscheinAbzugNetto(
|
round(($versand / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])), 2),
|
||||||
($basket->getGutscheinAbzugNetto() + $creditSystemRest) -
|
);
|
||||||
round(
|
$creditSystemRest = ($creditSystemRest - $mwert) - $versand;
|
||||||
($creditSystemRest / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])),
|
|
||||||
2,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
$basket->setGutscheinAbzugMwStKey(
|
|
||||||
(float) str_replace('%', '', $shippingtype['mwert']),
|
|
||||||
round(
|
|
||||||
($creditSystemRest / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])),
|
|
||||||
2,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
$mwertalle[str_replace('%', '', $shippingtype['mwert'])] =
|
$mwertalle[str_replace('%', '', $shippingtype['mwert'])] =
|
||||||
$mwertalle[str_replace('%', '', $shippingtype['mwert'])] + $versand;
|
$mwertalle[str_replace('%', '', $shippingtype['mwert'])] + $versand;
|
||||||
$this->view->versandbrutto =
|
$this->view->versandbrutto =
|
||||||
$versand + round(($versand / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])), 2);
|
$versand + round(($versand / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])), 2);
|
||||||
|
|
||||||
|
$bruttoGesamtShippingForVoucher[str_replace('%', '', $shippingtype['mwert'])] =
|
||||||
|
$this->view->versandbrutto;
|
||||||
|
$usedBruttoVoucher += round($this->view->versandbrutto, 2);
|
||||||
} else {
|
} else {
|
||||||
$mwert =
|
$mwert =
|
||||||
$mwert + round(($versand / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])), 2);
|
$mwert + round(($versand / 100) * ((float) str_replace('%', '', $shippingtype['mwert'])), 2);
|
||||||
@ -3238,34 +3218,16 @@ class BasketController extends TP_Controller_Action
|
|||||||
$this->view->paymentwert = $paymenttype['wert'];
|
$this->view->paymentwert = $paymenttype['wert'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (false && $creditSystemRest > 0 && $creditSystemPayment) {
|
if ($creditSystemPayment) {
|
||||||
$mwert = $mwert + round(($this->view->paymentwert / 100) * $paymenttype['mwert'], 2);
|
$mwert = $mwert + round(($this->view->paymentwert / 100) * $paymenttype['mwert'], 2);
|
||||||
if ($creditSystemRest > round(($this->view->paymentwert / 100) * $paymenttype['mwert'], 2)) {
|
|
||||||
$basket->setGutscheinAbzug(
|
|
||||||
$basket->getGutscheinAbzug() +
|
|
||||||
round(($this->view->paymentwert / 100) * $paymenttype['mwert'], 2) +
|
|
||||||
$this->view->paymentwert,
|
|
||||||
);
|
|
||||||
$basket->setGutscheinAbzugNetto($basket->getGutscheinAbzugNetto() + $this->view->paymentwert);
|
|
||||||
$basket->setGutscheinAbzugMwStKey(
|
|
||||||
$paymenttype['mwert'],
|
|
||||||
round(($this->view->paymentwert / 100) * $paymenttype['mwert'], 2),
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
$basket->setGutscheinAbzug($basket->getGutscheinAbzug() + $creditSystemRest);
|
|
||||||
$basket->setGutscheinAbzugNetto(
|
|
||||||
($basket->getGutscheinAbzugNetto() + $creditSystemRest) -
|
|
||||||
round(($creditSystemRest / 100) * ((float) str_replace('%', '', $paymenttype['mwert'])), 2),
|
|
||||||
);
|
|
||||||
$basket->setGutscheinAbzugMwStKey(
|
|
||||||
(float) str_replace('%', '', $paymenttype['mwert']),
|
|
||||||
round(($creditSystemRest / 100) * ((float) str_replace('%', '', $paymenttype['mwert'])), 2),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
$mwertalle[(string) $paymenttype['mwert']] =
|
$mwertalle[(string) $paymenttype['mwert']] =
|
||||||
$mwertalle[(string) $paymenttype['mwert']] + $this->view->paymentwert;
|
$mwertalle[(string) $paymenttype['mwert']] + $this->view->paymentwert;
|
||||||
$this->view->paymentwertbrutto =
|
$this->view->paymentwertbrutto =
|
||||||
$this->view->paymentwert + round(($this->view->paymentwert / 100) * $paymenttype['mwert'], 2);
|
$this->view->paymentwert + round(($this->view->paymentwert / 100) * $paymenttype['mwert'], 2);
|
||||||
|
$bruttoGesamtPaymentForVoucher[$paymenttype['mwert']] = $this->view->paymentwertbrutto;
|
||||||
|
$usedBruttoVoucher += round($this->view->paymentwertbrutto, 2);
|
||||||
|
$usedBruttoVoucher = intval($usedBruttoVoucher * 100) / 100;
|
||||||
} elseif ($creditSystemZeroPayment) {
|
} elseif ($creditSystemZeroPayment) {
|
||||||
$basket->setGutscheinAbzug(
|
$basket->setGutscheinAbzug(
|
||||||
$basket->getGutscheinAbzug() +
|
$basket->getGutscheinAbzug() +
|
||||||
@ -3293,16 +3255,111 @@ class BasketController extends TP_Controller_Action
|
|||||||
$this->view->articles = $temp;
|
$this->view->articles = $temp;
|
||||||
|
|
||||||
$this->_helper->layout->setLayout('default');
|
$this->_helper->layout->setLayout('default');
|
||||||
$summenUeberAlleSteuersaetze = $mwertalle;
|
|
||||||
$tmpMwertAlle = [];
|
$tmpMwertAlle = [];
|
||||||
foreach ($mwertalle as $key => $wert) {
|
foreach ($mwertalle as $key => $wert) {
|
||||||
$tmpMwertAlle[$key] = round(($wert / 100) * ((float) $key), 2);
|
$tmpMwertAlle[$key] = round(($wert / 100) * ((float) $key), 2);
|
||||||
}
|
}
|
||||||
$mwertalle = $tmpMwertAlle;
|
$mwertalle = $tmpMwertAlle;
|
||||||
|
$rabatteProduct = [];
|
||||||
var_dump($summenUeberAlleSteuersaetze);
|
$rabatteShipping = [];
|
||||||
$voucherMwert = [];
|
$rabattePayment = [];
|
||||||
foreach ($summenUeberAlleSteuersaetzer as $key => $value) {
|
// Berechnung Gutschein
|
||||||
|
if ($creditSystemValue > 0) {
|
||||||
|
if ($creditSystemValue > $usedBruttoVoucher && !$creditSystemPercent) {
|
||||||
|
$basket->setGutscheinAbzug($usedBruttoVoucher);
|
||||||
|
foreach ($bruttoGesamtForVoucher as $prozent => $value) {
|
||||||
|
$rabatteProduct[] = [
|
||||||
|
'brutto' => 0,
|
||||||
|
'netto' => 0,
|
||||||
|
'prozent' => $prozent,
|
||||||
|
'steuer' => 0,
|
||||||
|
'rabatt' => $value,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
foreach ($bruttoGesamtPaymentForVoucher as $prozent => $value) {
|
||||||
|
$rabattePayment[] = [
|
||||||
|
'brutto' => 0,
|
||||||
|
'netto' => 0,
|
||||||
|
'prozent' => $prozent,
|
||||||
|
'steuer' => 0,
|
||||||
|
'rabatt' => $value,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
foreach ($bruttoGesamtShippingForVoucher as $prozent => $value) {
|
||||||
|
$rabatteShipping[] = [
|
||||||
|
'brutto' => 0,
|
||||||
|
'netto' => 0,
|
||||||
|
'prozent' => $prozent,
|
||||||
|
'steuer' => 0,
|
||||||
|
'rabatt' => $value,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ($creditSystemPercent) {
|
||||||
|
$creditSystemValue = round(($usedBruttoVoucher / 100) * $creditSystemValue, 2);
|
||||||
|
}
|
||||||
|
foreach ($bruttoGesamtForVoucher as $prozent => $value) {
|
||||||
|
$rabatteProduct[] = [
|
||||||
|
'brutto' => $value - round(($creditSystemValue * $value) / $usedBruttoVoucher, 2),
|
||||||
|
'netto' => round(
|
||||||
|
($value - round(($creditSystemValue * $value) / $usedBruttoVoucher, 2)) /
|
||||||
|
(($prozent / 100) + 1),
|
||||||
|
2,
|
||||||
|
),
|
||||||
|
'prozent' => $prozent,
|
||||||
|
'steuer' => round(
|
||||||
|
(
|
||||||
|
($value - round(($creditSystemValue * $value) / $usedBruttoVoucher, 2)) /
|
||||||
|
(($prozent / 100) + 1)
|
||||||
|
) *
|
||||||
|
($prozent / 100),
|
||||||
|
2,
|
||||||
|
),
|
||||||
|
'rabatt' => round(($creditSystemValue * $value) / $usedBruttoVoucher, 2),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
foreach ($bruttoGesamtPaymentForVoucher as $prozent => $value) {
|
||||||
|
$rabattePayment[] = [
|
||||||
|
'brutto' => $value - round(($creditSystemValue * $value) / $usedBruttoVoucher, 2),
|
||||||
|
'netto' => round(
|
||||||
|
($value - round(($creditSystemValue * $value) / $usedBruttoVoucher, 2)) /
|
||||||
|
(($prozent / 100) + 1),
|
||||||
|
2,
|
||||||
|
),
|
||||||
|
'prozent' => $prozent,
|
||||||
|
'steuer' => round(
|
||||||
|
(
|
||||||
|
($value - round(($creditSystemValue * $value) / $usedBruttoVoucher, 2)) /
|
||||||
|
(($prozent / 100) + 1)
|
||||||
|
) *
|
||||||
|
($prozent / 100),
|
||||||
|
2,
|
||||||
|
),
|
||||||
|
'rabatt' => round(($creditSystemValue * $value) / $usedBruttoVoucher, 2),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
foreach ($bruttoGesamtShippingForVoucher as $prozent => $value) {
|
||||||
|
$rabatteShipping[] = [
|
||||||
|
'brutto' => $value - round(($creditSystemValue * $value) / $usedBruttoVoucher, 2),
|
||||||
|
'netto' => round(
|
||||||
|
($value - round(($creditSystemValue * $value) / $usedBruttoVoucher, 2)) /
|
||||||
|
(($prozent / 100) + 1),
|
||||||
|
2,
|
||||||
|
),
|
||||||
|
'prozent' => $prozent,
|
||||||
|
'steuer' => round(
|
||||||
|
(
|
||||||
|
($value - round(($creditSystemValue * $value) / $usedBruttoVoucher, 2)) /
|
||||||
|
(($prozent / 100) + 1)
|
||||||
|
) *
|
||||||
|
($prozent / 100),
|
||||||
|
2,
|
||||||
|
),
|
||||||
|
'rabatt' => round(($creditSystemValue * $value) / $usedBruttoVoucher, 2),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
$basket->setGutscheinAbzug($creditSystemValue);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->view->productbruttogutschein = 0;
|
$this->view->productbruttogutschein = 0;
|
||||||
@ -3340,6 +3397,9 @@ class BasketController extends TP_Controller_Action
|
|||||||
$this->view->versandbrutto,
|
$this->view->versandbrutto,
|
||||||
$mwertalle,
|
$mwertalle,
|
||||||
$voucherMwert,
|
$voucherMwert,
|
||||||
|
$rabatteProduct,
|
||||||
|
$rabatteShipping,
|
||||||
|
$rabattePayment,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4326,8 +4386,7 @@ class BasketController extends TP_Controller_Action
|
|||||||
(($versand / 100) * str_replace('%', '', $shippingtype['mwert']));
|
(($versand / 100) * str_replace('%', '', $shippingtype['mwert']));
|
||||||
|
|
||||||
$basket->setPreisBrutto(
|
$basket->setPreisBrutto(
|
||||||
($basket->getPreisNetto() + $versand + $mwert + $basket->getZahlkosten()) -
|
$basket->getPreisNetto() + $versand + $mwert + $basket->getZahlkosten(),
|
||||||
($basket->getGutscheinAbzug() * 1),
|
|
||||||
);
|
);
|
||||||
$basket->setVersandkosten($versand);
|
$basket->setVersandkosten($versand);
|
||||||
$basket->setPreisSteuer($mwert);
|
$basket->setPreisSteuer($mwert);
|
||||||
@ -4686,7 +4745,9 @@ class BasketController extends TP_Controller_Action
|
|||||||
$order->setWithTax($withTax);
|
$order->setWithTax($withTax);
|
||||||
$order->setGutscheinAbzugNetto($basket->getGutscheinAbzugNetto());
|
$order->setGutscheinAbzugNetto($basket->getGutscheinAbzugNetto());
|
||||||
$order->setGutscheinAbzugMwSt($basket->getGutscheinAbzugMwSt());
|
$order->setGutscheinAbzugMwSt($basket->getGutscheinAbzugMwSt());
|
||||||
|
$order->setVoucherProduct($basket->getVoucherProduct());
|
||||||
|
$order->setVoucherShipping($basket->getVoucherShipping());
|
||||||
|
$order->setVoucherPayment($basket->getVoucherPayment());
|
||||||
$order->saveMongo();
|
$order->saveMongo();
|
||||||
|
|
||||||
$basePath = APPLICATION_PATH . '/../market/basket/' . $order->id . '/';
|
$basePath = APPLICATION_PATH . '/../market/basket/' . $order->id . '/';
|
||||||
|
|||||||
@ -11,26 +11,23 @@ class SearchController extends TP_Controller_Action
|
|||||||
*/
|
*/
|
||||||
public function indexAction()
|
public function indexAction()
|
||||||
{
|
{
|
||||||
(new TP_Basket())->clearTempProduct();
|
new TP_Basket()->clearTempProduct();
|
||||||
$this->view->items = array();
|
$this->view->items = [];
|
||||||
$this->view->article = array();
|
$this->view->article = [];
|
||||||
$this->view->cms = array();
|
$this->view->cms = [];
|
||||||
$this->view->motive = array();
|
$this->view->motive = [];
|
||||||
|
|
||||||
$filters = array(
|
$filters = [
|
||||||
'q' => 'Alnum'
|
'q' => 'Alnum',
|
||||||
);
|
];
|
||||||
|
|
||||||
$validators = array(
|
$validators = [
|
||||||
'q' => 'Alnum'
|
'q' => 'Alnum',
|
||||||
);
|
];
|
||||||
|
|
||||||
$input = new Zend_Filter_Input($filters, $validators, $this->_getAllParams());
|
$input = new Zend_Filter_Input($filters, $validators, $this->_getAllParams());
|
||||||
|
|
||||||
if ($input->isValid('q')
|
if ($input->isValid('q') && $this->_getParam('q') != '') {
|
||||||
&& $this->_getParam('q') != ""
|
|
||||||
) {
|
|
||||||
|
|
||||||
$this->view->q = $this->_getParam('q');
|
$this->view->q = $this->_getParam('q');
|
||||||
|
|
||||||
$query = explode(' ', $this->_getParam('q'));
|
$query = explode(' ', $this->_getParam('q'));
|
||||||
@ -45,29 +42,46 @@ class SearchController extends TP_Controller_Action
|
|||||||
->where(
|
->where(
|
||||||
"c.shop_id = ?
|
"c.shop_id = ?
|
||||||
AND c.enable = 1 AND c.display_not_in_overview = 0
|
AND c.enable = 1 AND c.display_not_in_overview = 0
|
||||||
AND (c.meta_keywords LIKE '%" . $searchQuery . "%' OR c.sub_title LIKE '%" . $searchQuery . "%' OR c.title LIKE '%" . $searchQuery . "%' OR c.kostenstelle LIKE '%" . $searchQuery . "%' OR c.article_nr_intern LIKE '%" . $searchQuery . "%' OR c.info LIKE '%" . $searchQuery . "%' OR c.einleitung LIKE '%" . $searchQuery . "%')",
|
AND (c.meta_keywords LIKE '%" .
|
||||||
array($this->shop->id)
|
$searchQuery .
|
||||||
|
"%' OR c.sub_title LIKE '%" .
|
||||||
|
$searchQuery .
|
||||||
|
"%' OR c.title LIKE '%" .
|
||||||
|
$searchQuery .
|
||||||
|
"%' OR c.kostenstelle LIKE '%" .
|
||||||
|
$searchQuery .
|
||||||
|
"%' OR c.article_nr_intern LIKE '%" .
|
||||||
|
$searchQuery .
|
||||||
|
"%' OR c.info LIKE '%" .
|
||||||
|
$searchQuery .
|
||||||
|
"%' OR c.einleitung LIKE '%" .
|
||||||
|
$searchQuery .
|
||||||
|
"%')",
|
||||||
|
[$this->shop->id],
|
||||||
)
|
)
|
||||||
->orderBy('c.pos ASC')
|
->orderBy('c.pos ASC')
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
|
$temp = [];
|
||||||
$temp = array();
|
|
||||||
$temp[] = 0;
|
$temp[] = 0;
|
||||||
|
|
||||||
if (Zend_Auth::getInstance()->hasIdentity()) {
|
if (Zend_Auth::getInstance()->hasIdentity()) {
|
||||||
$identity = Zend_Auth::getInstance()->getIdentity();
|
$identity = Zend_Auth::getInstance()->getIdentity();
|
||||||
|
|
||||||
$articles_contact = Doctrine_Query::create()->from('ContactArticle c')->where('c.contact_id = ?', array($identity ['id']))->execute()->toArray();
|
$articles_contact = Doctrine_Query::create()
|
||||||
|
->from('ContactArticle c')
|
||||||
|
->where('c.contact_id = ?', [$identity['id']])
|
||||||
|
->execute()
|
||||||
|
->toArray();
|
||||||
|
|
||||||
foreach ($articles_contact as $art) {
|
foreach ($articles_contact as $art) {
|
||||||
$temp[] = $art['article_id'];
|
$temp[] = $art['article_id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$temp = $this->getAccountArticle($temp, $identity ['account_id']);
|
$temp = $this->getAccountArticle($temp, $identity['account_id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$article = array();
|
$article = [];
|
||||||
|
|
||||||
foreach ($articles as $art) {
|
foreach ($articles as $art) {
|
||||||
if (!$art->private || in_array($art->id, $temp)) {
|
if (!$art->private || in_array($art->id, $temp)) {
|
||||||
@ -76,35 +90,36 @@ class SearchController extends TP_Controller_Action
|
|||||||
}
|
}
|
||||||
$this->view->article = $article;
|
$this->view->article = $article;
|
||||||
|
|
||||||
|
|
||||||
/* CMS */
|
/* CMS */
|
||||||
|
|
||||||
|
|
||||||
$cms = Doctrine_Query::create()
|
$cms = Doctrine_Query::create()
|
||||||
->select()
|
->select()
|
||||||
->from('Cms c')
|
->from('Cms c')
|
||||||
->where(
|
->where(
|
||||||
"c.shop_id = ?
|
"c.shop_id = ? AND c.enable = 1
|
||||||
AND (c.title LIKE '%".$searchQuery."%' OR text1 LIKE '%".$searchQuery."%')",
|
AND (c.title LIKE '%" . $searchQuery . "%' OR text1 LIKE '%" . $searchQuery . "%')",
|
||||||
array($this->shop->id)
|
[$this->shop->id],
|
||||||
)
|
)
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
|
$temp = [];
|
||||||
$temp = array();
|
|
||||||
$temp[] = 0;
|
$temp[] = 0;
|
||||||
|
|
||||||
if (Zend_Auth::getInstance()->hasIdentity()) {
|
if (Zend_Auth::getInstance()->hasIdentity()) {
|
||||||
$identity = Zend_Auth::getInstance()->getIdentity();
|
$identity = Zend_Auth::getInstance()->getIdentity();
|
||||||
|
|
||||||
$articles_contact = Doctrine_Query::create()->from('ContactCms c')->where('c.contact_id = ?', array($identity ['id']))->execute()->toArray();
|
$articles_contact = Doctrine_Query::create()
|
||||||
|
->from('ContactCms c')
|
||||||
|
->where('c.contact_id = ?', [$identity['id']])
|
||||||
|
->execute()
|
||||||
|
->toArray();
|
||||||
|
|
||||||
foreach ($articles_contact as $art) {
|
foreach ($articles_contact as $art) {
|
||||||
$temp[] = $art['cms_id'];
|
$temp[] = $art['cms_id'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$tempCms = array();
|
$tempCms = [];
|
||||||
|
|
||||||
foreach ($cms as $art) {
|
foreach ($cms as $art) {
|
||||||
if (!$art->private || in_array($art->id, $temp)) {
|
if (!$art->private || in_array($art->id, $temp)) {
|
||||||
@ -113,7 +128,6 @@ class SearchController extends TP_Controller_Action
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->view->cms = $tempCms;
|
$this->view->cms = $tempCms;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,8 +136,15 @@ class SearchController extends TP_Controller_Action
|
|||||||
if ($deep == 4) {
|
if ($deep == 4) {
|
||||||
return $articles;
|
return $articles;
|
||||||
}
|
}
|
||||||
$account_article = Doctrine_Query::create()->from('AccountArticle c')->where('c.account_id = ?', array($account_id))->execute()->toArray();
|
$account_article = Doctrine_Query::create()
|
||||||
$account = Doctrine_Query::create()->from('Account a')->where('a.id = ?', array($account_id))->fetchOne();
|
->from('AccountArticle c')
|
||||||
|
->where('c.account_id = ?', [$account_id])
|
||||||
|
->execute()
|
||||||
|
->toArray();
|
||||||
|
$account = Doctrine_Query::create()
|
||||||
|
->from('Account a')
|
||||||
|
->where('a.id = ?', [$account_id])
|
||||||
|
->fetchOne();
|
||||||
|
|
||||||
foreach ($account_article as $art) {
|
foreach ($account_article as $art) {
|
||||||
if (!in_array($art['article_id'], $articles)) {
|
if (!in_array($art['article_id'], $articles)) {
|
||||||
@ -131,11 +152,10 @@ class SearchController extends TP_Controller_Action
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($account['filiale_id'] != "" && $account['filiale_id'] != 0) {
|
if ($account['filiale_id'] != '' && $account['filiale_id'] != 0) {
|
||||||
$articles = $this->getAccountArticle($articles, $account['filiale_id'], $deep + 1);
|
$articles = $this->getAccountArticle($articles, $account['filiale_id'], $deep + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $articles;
|
return $articles;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -270,10 +270,10 @@ class TP_Basket
|
|||||||
$WarenkorbPreis = 0;
|
$WarenkorbPreis = 0;
|
||||||
$ArtikelAnzahl = $this->_Warenkorb->ArtikelAnzahl;
|
$ArtikelAnzahl = $this->_Warenkorb->ArtikelAnzahl;
|
||||||
if ($ArtikelAnzahl < 1) {
|
if ($ArtikelAnzahl < 1) {
|
||||||
return array(
|
return [
|
||||||
'WarenkorbPreis' => $WarenkorbPreis,
|
'WarenkorbPreis' => $WarenkorbPreis,
|
||||||
'Artikelanzahl' => $ArtikelAnzahl,
|
'Artikelanzahl' => $ArtikelAnzahl,
|
||||||
);
|
];
|
||||||
} else {
|
} else {
|
||||||
foreach ($this->_Warenkorb->Artikel as $Artikel) {
|
foreach ($this->_Warenkorb->Artikel as $Artikel) {
|
||||||
// DB-Prefix & Adapter auslesen
|
// DB-Prefix & Adapter auslesen
|
||||||
@ -291,10 +291,10 @@ class TP_Basket
|
|||||||
$WarenkorbPreis += $result->shop_artikel_preis * $Artikel['Anzahl'];
|
$WarenkorbPreis += $result->shop_artikel_preis * $Artikel['Anzahl'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return array(
|
return [
|
||||||
'WarenkorbPreis' => $WarenkorbPreis,
|
'WarenkorbPreis' => $WarenkorbPreis,
|
||||||
'Artikelanzahl' => $ArtikelAnzahl,
|
'Artikelanzahl' => $ArtikelAnzahl,
|
||||||
);
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function checkIsLayouterIdInUse($id)
|
public function checkIsLayouterIdInUse($id)
|
||||||
@ -888,6 +888,9 @@ class TP_Basket
|
|||||||
$versandart,
|
$versandart,
|
||||||
$mwert,
|
$mwert,
|
||||||
$gutscheinMwert,
|
$gutscheinMwert,
|
||||||
|
$voucherProduct,
|
||||||
|
$voucherShipping,
|
||||||
|
$voucherPayment,
|
||||||
) {
|
) {
|
||||||
if ($this->_Warenkorb->isLocked()) {
|
if ($this->_Warenkorb->isLocked()) {
|
||||||
$this->_Warenkorb->unLock();
|
$this->_Warenkorb->unLock();
|
||||||
@ -898,6 +901,9 @@ class TP_Basket
|
|||||||
$this->_Warenkorb->VersandkostenBrutto = $versandart;
|
$this->_Warenkorb->VersandkostenBrutto = $versandart;
|
||||||
$this->_Warenkorb->mwert = $mwert;
|
$this->_Warenkorb->mwert = $mwert;
|
||||||
$this->_Warenkorb->vouchermwert = $vouchermwert;
|
$this->_Warenkorb->vouchermwert = $vouchermwert;
|
||||||
|
$this->_Warenkorb->voucherProduct = $voucherProduct;
|
||||||
|
$this->_Warenkorb->voucherShipping = $voucherShipping;
|
||||||
|
$this->_Warenkorb->voucherPayment = $voucherPayment;
|
||||||
//Namespace wieder sperren
|
//Namespace wieder sperren
|
||||||
$this->_Warenkorb->lock();
|
$this->_Warenkorb->lock();
|
||||||
}
|
}
|
||||||
@ -954,9 +960,9 @@ class TP_Basket
|
|||||||
$user = Doctrine_Query::create()
|
$user = Doctrine_Query::create()
|
||||||
->from('Contact c')
|
->from('Contact c')
|
||||||
->where('c.id = ?')
|
->where('c.id = ?')
|
||||||
->fetchOne(array(
|
->fetchOne([
|
||||||
$user['id'],
|
$user['id'],
|
||||||
));
|
]);
|
||||||
if (!$user['mwert']) {
|
if (!$user['mwert']) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1059,6 +1065,21 @@ class TP_Basket
|
|||||||
return $this->_Warenkorb->vouchermwert;
|
return $this->_Warenkorb->vouchermwert;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getVoucherProduct()
|
||||||
|
{
|
||||||
|
return $this->_Warenkorb->voucherProduct;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getVoucherShipping()
|
||||||
|
{
|
||||||
|
return $this->_Warenkorb->voucherShipping;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getVoucherPayment()
|
||||||
|
{
|
||||||
|
return $this->_Warenkorb->voucherPayment;
|
||||||
|
}
|
||||||
|
|
||||||
public function clearBasketItems()
|
public function clearBasketItems()
|
||||||
{
|
{
|
||||||
$this->_Warenkorb->unlock();
|
$this->_Warenkorb->unlock();
|
||||||
@ -1101,15 +1122,18 @@ class TP_Basket
|
|||||||
$this->_Warenkorb->productpreisnetto = 0;
|
$this->_Warenkorb->productpreisnetto = 0;
|
||||||
$this->_Warenkorb->ZahlkostenBrutto = 0;
|
$this->_Warenkorb->ZahlkostenBrutto = 0;
|
||||||
$this->_Warenkorb->VersandkostenBrutto = 0;
|
$this->_Warenkorb->VersandkostenBrutto = 0;
|
||||||
$this->_Warenkorb->mwert = array();
|
$this->_Warenkorb->mwert = [];
|
||||||
$this->_Warenkorb->vouchermwert = array();
|
$this->_Warenkorb->vouchermwert = [];
|
||||||
|
$this->_Warenkorb->voucherProduct = [];
|
||||||
|
$this->_Warenkorb->voucherShipping = [];
|
||||||
|
$this->_Warenkorb->voucherPayment = [];
|
||||||
|
|
||||||
$this->_Warenkorb->Zahlkosten = 0;
|
$this->_Warenkorb->Zahlkosten = 0;
|
||||||
$this->_Warenkorb->Versandkosten = 0;
|
$this->_Warenkorb->Versandkosten = 0;
|
||||||
$this->_Warenkorb->basketfield1 = '';
|
$this->_Warenkorb->basketfield1 = '';
|
||||||
$this->_Warenkorb->basketfield2 = '';
|
$this->_Warenkorb->basketfield2 = '';
|
||||||
$this->_Warenkorb->payment_zusatz = '';
|
$this->_Warenkorb->payment_zusatz = '';
|
||||||
$this->_Warenkorb->offerContact = array();
|
$this->_Warenkorb->offerContact = [];
|
||||||
$this->_Warenkorb->initialized = true;
|
$this->_Warenkorb->initialized = true;
|
||||||
$this->_Warenkorb->deliverysame = true;
|
$this->_Warenkorb->deliverysame = true;
|
||||||
$this->_Warenkorb->delivery = 0;
|
$this->_Warenkorb->delivery = 0;
|
||||||
@ -1126,10 +1150,10 @@ class TP_Basket
|
|||||||
$this->_Warenkorb->delivery_ustid = null;
|
$this->_Warenkorb->delivery_ustid = null;
|
||||||
|
|
||||||
$this->_Warenkorb->shippingtype_extra_label = '';
|
$this->_Warenkorb->shippingtype_extra_label = '';
|
||||||
$this->_Warenkorb->info = array();
|
$this->_Warenkorb->info = [];
|
||||||
$this->_Warenkorb->paymentRef = substr(md5(rand()), 0, 7);
|
$this->_Warenkorb->paymentRef = substr(md5(rand()), 0, 7);
|
||||||
$this->_Warenkorb->paymentGateway = '';
|
$this->_Warenkorb->paymentGateway = '';
|
||||||
$this->_Warenkorb->TempProduct = array();
|
$this->_Warenkorb->TempProduct = [];
|
||||||
$this->_Warenkorb->LastTempProductId = false;
|
$this->_Warenkorb->LastTempProductId = false;
|
||||||
$this->_Warenkorb->offerNumber = time();
|
$this->_Warenkorb->offerNumber = time();
|
||||||
$this->_Warenkorb->withTax = true;
|
$this->_Warenkorb->withTax = true;
|
||||||
@ -1157,7 +1181,7 @@ class TP_Basket
|
|||||||
$this->_Warenkorb->deliveryMode = self::DELIVERY_MODE_NORMAL;
|
$this->_Warenkorb->deliveryMode = self::DELIVERY_MODE_NORMAL;
|
||||||
$this->_Warenkorb->shippingtype_extra_label = '';
|
$this->_Warenkorb->shippingtype_extra_label = '';
|
||||||
$this->_Warenkorb->invoice = 0;
|
$this->_Warenkorb->invoice = 0;
|
||||||
$this->_Warenkorb->offerContact = array();
|
$this->_Warenkorb->offerContact = [];
|
||||||
$this->_Warenkorb->sendersame = true;
|
$this->_Warenkorb->sendersame = true;
|
||||||
$this->_Warenkorb->sender = 0;
|
$this->_Warenkorb->sender = 0;
|
||||||
$this->_Warenkorb->Paymenttype = 0;
|
$this->_Warenkorb->Paymenttype = 0;
|
||||||
@ -1174,13 +1198,16 @@ class TP_Basket
|
|||||||
$this->_Warenkorb->plz = false;
|
$this->_Warenkorb->plz = false;
|
||||||
$this->_Warenkorb->delivery_plz = false;
|
$this->_Warenkorb->delivery_plz = false;
|
||||||
$this->_Warenkorb->delivery_country = false;
|
$this->_Warenkorb->delivery_country = false;
|
||||||
$this->_Warenkorb->info = array();
|
$this->_Warenkorb->info = [];
|
||||||
$this->_Warenkorb->paymentRef = substr(md5(rand()), 0, 7);
|
$this->_Warenkorb->paymentRef = substr(md5(rand()), 0, 7);
|
||||||
$this->_Warenkorb->paymentGateway = '';
|
$this->_Warenkorb->paymentGateway = '';
|
||||||
$this->_Warenkorb->TempProduct = array();
|
$this->_Warenkorb->TempProduct = [];
|
||||||
$this->_Warenkorb->LastTempProductId = false;
|
$this->_Warenkorb->LastTempProductId = false;
|
||||||
$this->_Warenkorb->offerNumber = time();
|
$this->_Warenkorb->offerNumber = time();
|
||||||
$this->_Warenkorb->withTax = true;
|
$this->_Warenkorb->withTax = true;
|
||||||
$this->_Warenkorb->delivery_ustid = null;
|
$this->_Warenkorb->delivery_ustid = null;
|
||||||
|
$this->_Warenkorb->voucherProduct = [];
|
||||||
|
$this->_Warenkorb->voucherShipping = [];
|
||||||
|
$this->_Warenkorb->voucherPayment = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user