Skip to content

Commit

Permalink
cleanup unecessary stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
mariolorenz committed Jan 7, 2025
1 parent f2a82f4 commit d65e87f
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 164 deletions.
61 changes: 0 additions & 61 deletions src/Controller/ProxyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,67 +93,6 @@ public function createOrder()
$this->outputJson($response);
}

public function getGooglepayBasket()
{
$basket = Registry::getSession()->getBasket();
$lang = Registry::getLang();
$actShopCurrency = Registry::getConfig()->getActShopCurrencyObject();
$blIsAdd = false;

if ($basket->getItemsCount() === 0) {
$this->addToBasket();

$basket = Registry::getSession()->getBasket();
$blIsAdd = true;
}
$deliveryCost = $basket->getDeliveryCost();
$deliveryBruttoPrice = $deliveryCost->getBruttoPrice();
$this->setPayPalPaymentMethod();

$sVat = 0;
foreach ($basket->getProductVats(false) as $key => $VATitem) {
$sVat += $VATitem;
}

$aItems = [
"displayItems" => [
[
"label" => $lang->translateString("TOTAL_NET"),
"type" => "SUBTOTAL",
"price" => number_format((double) $basket->getNettoSum(), 2, '.', ''),
],
[
"label" => $lang->translateString("VAT"),
"type" => "TAX",
"price" => number_format((double) $sVat, 2, '.', ''),
],
[
"label" => $lang->translateString("SHIPPING"),
"type" => "LINE_ITEM",
"price" => number_format((double) $deliveryBruttoPrice, 2, '.', ''),
"status" => "FINAL"
]
],
"countryCode" => strtoupper($lang->getLanguageAbbr()),
"currencyCode" => strtoupper($actShopCurrency->name),
"totalPriceStatus" => "ESTIMATED",
"totalPrice" => number_format((double) $basket->getPrice()->getBruttoPrice(), 2, '.', ''),
"totalPriceLabel" => $lang->translateString("TOTAL"),
];
if ($blIsAdd) {
if ($aid = (string)Registry::getRequest()->getRequestEscapedParameter('aid')) {
try {
$basket->addToBasket($aid, 0);
$basket->calculateBasket(false);
} catch (NoArticleException $exception) {
}
}
}

$utils = Registry::getUtils();
$utils->showMessageAndExit(json_encode($aItems));
}

/**
* @throws JsonException
*/
Expand Down
27 changes: 0 additions & 27 deletions src/Model/HateoasLink.php

This file was deleted.

47 changes: 0 additions & 47 deletions src/Model/HateoasLinks.php

This file was deleted.

29 changes: 0 additions & 29 deletions src/Service/HateoasLinkService.php

This file was deleted.

0 comments on commit d65e87f

Please sign in to comment.