HEX
Server: Apache
System: Linux v38079.2is.nl 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: democfellows (10015)
PHP: 8.1.34
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/creativefellows.nl/okaycolor.creativefellows.nl/views/cart.php
<?php
	
	
	/*
 	 * Header
	 */
	require_once __DIR__ . '/inc/header.inc.php';

	
	echo  '<div class="grid-container product-information" id="shopping-cart">';
	echo  '<div class="grid-x grid-padding-x">';
	
	
	/*
 	 * Cart
	 */
	echo  '<div class="cell small-12 medium-8 shopping-cart">';
				
		echo '<h1>Winkelwagen</h1>';
				
		echo '<div class="grid-x group-header">';
			echo '<div class="cell small-6"><h4>Producten</h4></div>';
			echo '<div class="cell small-2 text-center"><span>Aantal</span></div>';	
			echo '<div class="cell small-2 text-center"><span>Bedrag</span></div>';	
			echo '<div class="cell small-2 text-right"><span>Bestand</span></div>';	
		echo '</div>';

		//d($cart->all());
		
		foreach($cart->all() as $i => $item)
		{
			
			echo '<div class="grid-x grid-margin-x cart-item wrapper" data-toggler=".open" id="'. $item->uid() .'">';
			
				echo '<div class="cell small-12 product-header">'; // data-tooltip title="Fancy word for a beetle." data-position="right" data-alignment="center"
					echo '<div class="grid-x grid-padding-x">';
						
						echo '<div class="cell small-6"><a data-toggle="'. $item->uid()  .'"><i class="fal fa-angle-right"></i> <strong>'. $item->name() .'</strong></a></div>';
						echo '<div class="cell small-2 text-center">'. $item->count() .'</div>';	
						echo '<div class="cell small-2 text-center">'. $item->priceHuman(true) .'</div>';	

						echo '<div class="cell small-2 text-right">';
							echo '<a class="file-uploader" 
										data-hasupload="'. $item->hasUpload() .'"
										data-productname="'. $item->name() .'" 
										data-productsize="'. $item->size() .'"
									 	data-width="'. $item->width("mm") .'"
										data-height="'. $item->height("mm") .'"
										data-preview="'. $item->preview() .'"
										data-url="'. $router->pathFor("cart.set.upload",["uid" => $item->uid() ]).'"><i class="fal fa-cloud-upload"></i></a>';
						echo '</div>';	
								
					echo '</div>';	
				echo '</div>';
				
			
				echo '<div class="cell small-12 product-details">';
					echo '<div class="grid-x grid-padding-x align-bottom item">';
					
						echo '<div class="cell small-11">';
							echo $item->properties();
						echo '</div>';
						echo '<div class="cell small-1 text-center">';
							echo '<a data-id="'. $item->uid() .'" data-action="'. $router->pathFor("cart.delete.item",["uid" => $item->uid()]) .'"><i class="fal fa-trash-alt"></i></a>';
						echo '</div>';
						
					echo '</div>';
				echo '</div>';
		
			echo '</div>';
			
		}
		
	
		/*
		 * Receiver
		 */		
		echo '<div class="grid-x group-header">';
		echo '<div class="cell small-6"><h4>Ontvanger</h4></div>';
		echo '<div class="cell small-6 text-right"><a data-toggle="form-post-address">Nieuw adres <i class="fal fa-plus"></i></a></div>';
		echo '</div>';
			
			
		
		echo '<div class="grid-x grid-margin-x cart-item open addressbook">';
		
			echo '<div class="cell small-12 product-header ">';
				echo '<div class="grid-x grid-padding-x">';
					
					echo '<div class="cell small-12">';
					echo '<a data-toggle="selected-order-address">';
						echo '<i class="fal fa-address-book"></i>';
						echo '<span>';
							if($user["default_address"]) echo $user["default_address"]->companyWithPerson();
							else echo "Adresboek";
						echo '</span>';
					echo '</a>';
					echo '</div>';
							
							
						
				echo '</div>';	
			echo '</div>';
			
			
			echo '<div class="cell small-12 product-details search-results">';
				
				echo '<div class="input-group">';
					echo '<input class="input-group-field search-input" name="q" type="text" placeholder="Zoek adres" autocomplete="off">';
					echo '<div class="input-group-button">';
						echo '<button type="button" class="button"><i class="fal fa-search"></i></button>';
					echo '</div>';
				echo '</div>';
			
				
				echo '<ul class="adrress-list no-bullet hide">';
	/*				echo '<li><a><i class="fal fa-angle-right"></i><strong>AEM Luxembourg S.A., J.M. Huberty</strong>
						AEM Luxembourg S.A., J.M. Huberty, Allée J.W. Léonard, 12, 7526 Mersch, Luxemburg</a></li>';

					echo '<li><a><i class="fal fa-angle-right"></i><strong>Ceva Logistics, Rob Janssen</strong>
						Edisonstraat, 2, 5807GG Oostrum, Nederland</a></li>';

					echo '<li><a><i class="fal fa-angle-right"></i><strong>Creative Fellows BV Creative Fellows BV</strong>
						Raadhuisstraat, 247, 2406AD Alphen aan den rijn, Nederland</a></li>';

					echo '<li><a><i class="fal fa-angle-right"></i><strong>Creative Fellows BV, Patrick Kalksma</strong>
						Raadhuisstraat, 247, 2406AD Alphen aan den rijn, Nederland</a></li>';*/
				echo '</ul>';
				
				
				echo '<div class="new-address" data-toggler=".open" id="form-post-address">';
					echo '<h3>Nieuw afleveradres</h3>';
					echo '<form action="'. $router->pathFor("customer.post.address") .'" enctype="multipart/form-data" data-abide novalidate>';
							echo '<div class="grid-x grid-padding-x">';
				
								foreach($fields_address as $field )
								{
									echo $field->element();
								}
					
							echo '</div>';
						echo '</form>';
				echo '</div>';
				
			echo '</div>';
			
		
		echo '</div>';
				
		/*
		echo '<div class="grid-x grid-margin-x cart-item open" data-toggler=".open" id="choose-address">';
			echo '<div class="cell small-12 product-header">';
				echo '<a data-option data-toggle="choose-address"><i class="fal fa-address-book"></i> Adresboek</a>';
			echo '</div>';
			
			echo '<div class="cell small-12 product-details search-results">';
				
				echo '<div class="input-group">';
					echo '<input class="input-group-field" type="text" placeholder="Zoek adres">';
					echo '<div class="input-group-button">';
						echo '<button type="button" class="button"><i class="fal fa-search"></i></button>';
					echo '</div>';
				echo '</div>';
			
				
				echo '<ul class="no-bullet">';
					echo '<li><i class="fal fa-angle-right"></i><strong>AEM Luxembourg S.A., J.M. Huberty</strong>
						AEM Luxembourg S.A., J.M. Huberty, Allée J.W. Léonard, 12, 7526 Mersch, Luxemburg</li>';

					echo '<li><i class="fal fa-angle-right"></i><strong>Ceva Logistics, Rob Janssen</strong>
						Edisonstraat, 2, 5807GG Oostrum, Nederland</li>';

					echo '<li><i class="fal fa-angle-right"></i><strong>Creative Fellows BV Creative Fellows BV</strong>
						Raadhuisstraat, 247, 2406AD Alphen aan den rijn, Nederland</li>';

					echo '<li><i class="fal fa-angle-right"></i><strong>Creative Fellows BV, Patrick Kalksma</strong>
						Raadhuisstraat, 247, 2406AD Alphen aan den rijn, Nederland </li>';
				echo '</ul>';
				
			echo '</div>';
		echo '</div>';
		*/
		
		
		/*
		 * Delivery types
		 */
		echo '<h4>Levering</h4>';
		echo '<div class="grid-x grid-padding-x cart-item inactive select-option">';	
			
			foreach($delivery as $i => $delivery_option)
			{
				echo $delivery_option->html();
			}
			
		echo '</div>';
		
		
	
		/*
		 * Date to deliver on
		 */
		echo '<h4>Afleverdatum <span data-tooltip tabindex="1" title="Onderstaande data zijn de overeenkomende leverdagen van de losse producten uit de bestelling. Plaats voor een snellere levering een losse bestelling voor het betreffende product."><i class="fas fa-info-circle"></i></span></h4>';

		echo '<div class="grid-x grid-padding-x cart-item inactive select-option">';

			
			$a = strtotime( date('Y-m-d H:i:s') );
			$b = strtotime( date('Y-m-d 14:00') );
			$date_correction = ($a - $b) > 0 ? 1 : 0;
			
	
			
			foreach($premium as $i => $premium_option)
			{
				// set to next day if max time has past
				$premium_option->setDateCorrection($date_correction);
								 
				echo '<div class="cell small-12 medium-6 product-option">';
			
					echo '<a class="form-setter'. ( $premium_option == end($premium) ? " selected" : "" ) .'" data-option 
						data-names="delivery-date||delivery-premium-price"
						data-input-target="#delivery_date"
						data-input-value="'. $premium_option->timeStamp() .'"  
						data-delivery-date="'. $premium_option->timeStamp() .'" 
						data-delivery-label="'. $premium_option->dateLabel() .'" 
						data-delivery-premium-price="'. ( $premium_option->premiumFactor() * $cart->getTotal() ) .'" 
						data-amount="data-delivery-premium-price"
						data-target="#cart-delivery-premium">';
					
						echo '<span class="name">';
							echo '<strong>'. $premium_option->dateLabel() .'</strong>';
						echo '</span>';
						
						echo '<span class="price'. ($premium_option->premiumFactor() === 0 ? " null" : "") .'">';
							echo $config->formatPrice($premium_option->premiumFactor() * $cart->getTotal() );
						echo '</span>';

					echo '</a>';
			
				echo '</div>';

		
			}
			
		
			// Date Picker
			echo '<div class="cell small-12 medium-6 product-option">';
				echo '<a class="datepicker" data-option data-names="delivery-date||delivery-premium-price">';
					echo '<strong><i class="fal fa-calendar-alt"></i> <span class="date">Andere datum</span><span class="price null">€ 0,00</span></strong>';
				echo '</a>';
				
				// set date from last production date as mindate in calendar
				echo '<input type="text" class="datepicker" id="datepicker" data-mindate="'. end($premium)->timeStamp(1) .'">';
			echo '</div>';
			
				
		echo '</div>';
		echo '<p></p>';
		
		
		echo '<br /><br />';
	echo '</div>';
	
	
	/*
 	 * Sidebar
	 */
	echo '<div class="cell small-12 medium-4 product-sidebar">';
		require_once __DIR__ . '/inc/cart/cart.sidebar.php';
	echo '</div>';
	
	
		
	echo '</div>';
	echo '</div>';	
	
	/*
 	 * Footer
	 */
	require_once __DIR__ . '/inc/footer.inc.php';
	
?>