<?php function __autoload($name) { include_once "../../models/Classes/{$name}.class.php"; } $ip = $_SERVER["REMOTE_ADDR"]; $eshop = new Eshop($ip); $basket = $eshop->getBasket($ip); $items = explode("_;_", $basket['item']); $count = explode("_;_", $basket['count']); $num = 0; for ($number = 0; $number < count($items); $number++) { if ($items[$number] == $_GET['id']) { } else { $countNew[$num] = $count[$number]; $itemsNew[$num] = $items[$number]; $num++; } } $items = implode("_;_", $itemsNew); $count = implode("_;_", $countNew); $eshop->addToBasket($count, $items, $ip); $item = $eshop->getItem($_GET['id']); echo "{$item['cz']} - úspěšně odstraněno z košíku";
<?php /** * Created by PhpStorm. * User: ununik * Date: 05.10.2015 * Time: 15:50 */ $ip = $_SERVER["REMOTE_ADDR"]; $eshop = new Eshop($ip); $basketItem = $eshop->getBasket($ip); if (isset($_SESSION['horp']['language']) && $_SESSION['horp']['language'] == 'en') { $kosik = 'Basket'; $mujKosik = 'My basket'; $nazev = 'name'; $cenaPrice = 'price'; $celkem = 'Total'; $dopravaAPlatba = 'Shipping and payment'; $celkovaHmotnostTranslation = 'Total weight'; $fakturacniUdaje = 'Billing information'; $jmenoTranslation = 'Firstname'; $prijmeniTranslation = 'Lastname'; $adresaTranslation = 'Adress'; $mestoTranslation = 'City'; $PSCTranslation = 'ZIP code'; $statTranslation = 'Country'; $dodaciAdresa = 'Delivery address (if different from billing information)'; $upravit = 'change'; $odstranit = 'delete'; $menaSlovo = 'Currency'; $rekapituace = 'Next';