Created
November 1, 2013 20:21
-
-
Save hottraffic/7271381 to your computer and use it in GitHub Desktop.
Tryign to find out how to create Unique Form Codes for each car similar to what is on this page. I want to however pregenerate them and include them on their respective car pages. Do you have any idea to how i could do that?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
defined('_JEXEC') or die('Restricted access'); | |
JHTML::_('behavior.tooltip'); | |
$reserve = $this->reserve; | |
//dd($reserve); | |
?> | |
<div id="djrenacar"> | |
<div id="djrac_steps"> | |
<div class="step"> | |
<div class="step-in"> | |
<div class="step_title"><span>1</span>Your Intinerary</div> | |
<a class="edit_link" href="<?php echo JRoute::_(DJRentacarHelperRoute::getLink('form')) ?>">Change Itinerary</a> | |
<div class="pickup_return"> | |
<strong class="step_subtitle red">PICK UP</strong><br/> | |
<?php echo $reserve['pickup_location'] ?><br/> | |
<strong>Date:</strong> <?php echo $reserve['pickup_date'] ?><br/> | |
<strong>Time:</strong> <span class="step_time"><?php echo $reserve['pickup_time'] ?></span> | |
</div> | |
<div class="pickup_return"> | |
<strong class="step_subtitle red">RETURN</strong><br/> | |
<?php echo $reserve['return_location'] ?><br/> | |
<strong>Date:</strong> <?php echo $reserve['return_date'] ?><br/> | |
<strong>Time:</strong> <span class="step_time"><?php echo $reserve['return_time'] ?></span> | |
</div> | |
<div style="clear:both;"></div> | |
</div> | |
</div> | |
<div class="step current_step"> | |
<?php if(isset($reserve['car'])) { ?> | |
<div class="step-in" style="background-image: url(<?php echo JURI::root(true).'/images/stories/'.str_ireplace('.jpg','.png', $reserve['car']->image);?>); background-repeat: no-repeat; background-position: 100% 60px; background-size: 210px;"> | |
<div class="step_title"><span>2</span>Select Your Vehicle/Add-ons</div> | |
<div class="step_subtitle" style="margin-top: -4px;"><strong class="red">Vehicle:</strong> <?php echo $reserve['car']->model ?></div> | |
<div class="step_subtitle" style="margin-top: -6px;"><strong class="red">Rate:</strong> $<?php echo (isset($reserve['car']->discount) ? number_format((1-$reserve['car']->discount)*$reserve['car']->rate,2) : $reserve['car']->rate) .'/'. ucfirst(strtolower($reserve['car']->plan)) ?></div> | |
</div> | |
<?php } else { ?> | |
<div class="step-in"> | |
<div class="step_title"><span>2</span>Select Your Vehicle/Add-ons</div> | |
</div> | |
<?php } ?> | |
</div> | |
<div class="step"> | |
<div class="step-in"> | |
<div class="step_title"><span>3</span>Reserve Your Vehicle</div> | |
</div> | |
</div> | |
<div style="clear:both;"></div> | |
</div> | |
<?php if($reserve['rn']) { ?> | |
<h1 class="djtitle">You are currently modifying reservation # <?php echo $reserve['rn'] ?></h1> | |
<?php } ?> | |
<div class="cars"> | |
<div class="top"> | |
<div class="discounts_form"> | |
<form name="discounts" action="<?php echo JRoute::_(DJRentacarHelperRoute::getLink('show')); ?>" method="post" autocomplete="off"> | |
<?php if(isset($reserve['discount_code'])) { ?> | |
<label for="discount" style="margin: 0 15px 0 5px;">Discount Code: <?php echo $reserve['discount_code'] ?></label> | |
<input type="hidden" id="discount" name="remove" value="discount" class="inputbox" autocomplete="off" /> | |
<input type="submit" class="button_small" value="Remove" /> | |
<?php } else if(isset($reserve['corporate_name'])) { ?> | |
<label for="corporate" style="margin: 0 15px 0 5px;">Corporate Code: <?php echo $reserve['corporate_code'] . ' (' . $reserve['corporate_name'] . ')' ?></label> | |
<input type="hidden" id="corporate" name="remove" value="corporate" class="inputbox" autocomplete="off" /> | |
<input type="submit" class="button_small" value="Remove" /> | |
<?php } else { ?> | |
<label for="corporate">Corporate Code</label> | |
<input type="text" id="corporate" name="corporate" value="<?php echo $reserve['corporate_code'] ?>" class="inputbox" autocomplete="off" /> | |
<input type="submit" class="button_small" value="Submit" /> | |
<span class="discounts_sep"></span> | |
<label for="discount">Discount Code</label> | |
<input type="text" id="discount" name="discount" value="<?php echo $reserve['discount_code'] ?>" class="inputbox" autocomplete="off" /> | |
<input type="submit" class="button_small" value="Submit" /> | |
<?php } ?> | |
</form> | |
</div> | |
<h2 class="djtitle">All Vehicles</h2> | |
</div> | |
<?php | |
foreach($this->items as $i){ | |
if($reserve['age']==1 && $i->age>24){ | |
continue; | |
} | |
if($reserve['type']){ | |
if(!strstr($i->notes,$reserve['type'])){ | |
continue; | |
} | |
} | |
if(!$i->id){ | |
continue; | |
} ?> | |
<div class="vehicle_row"> | |
<div class="vehicle_row_in gbox"> | |
<div class="vehicle_row_in2 clearfix"> | |
<div class="model"><?php echo $i->model; ?> | |
<img src="<?php echo JURI::root(true).'/images/stories/'.str_ireplace('.jpg','.png', $i->image) ?>" alt="<?php echo $i->model ?>" /> | |
</div> | |
<div class="features"> | |
<div class="subtitle">Vehicle Features</div> | |
<div class="ficons"> | |
<span class="psg hasTip" title="Passengers"><?php echo (isset($i->Passengers) ? $i->Passengers : '-') ?></span> | |
<span class="bag hasTip" title="Luggage capacity"><?php echo (isset($i->Luggage) ? $i->Luggage : '-') ?></span> | |
<span class="mpg hasTip" title="Miles per gallon::City/Highway"><?php echo (isset($i->MPGCity) ? $i->MPGCity : '-') ?>/<?php echo (isset($i->MPGHighway) ? $i->MPGHighway : '-') ?></span> | |
</div> | |
<?php | |
if(isset($i->notes)) { | |
$features = explode('|', $i->notes); ?> | |
<ul> | |
<?php foreach($features as $feature) { ?> | |
<li><?php echo $feature; ?></li> | |
<?php } ?> | |
</ul> | |
<?php } else { echo $i->desc; } ?> | |
</div> | |
<div class="rate_quote"> | |
<div class="subtitle">California rate quote</div> | |
INCLUDES | |
<ul> | |
<li>Miles Per Day: <?php echo $i->ExtraDayFreeMiles ?></li> | |
<li>Extra Mileage Rate: $<?php echo $i->PerMileAmount ?></li> | |
<?php if(isset($i->discount)) { ?><li>Discount: <?php echo 100 * $i->discount ?>%</li><?php } ?> | |
</ul> | |
</div> | |
<div class="rates"> | |
<div class="subtitle">Rates</div> | |
<strong style="font-size: 14px;">Book Now Rate:</strong> | |
<div class="price">$<?php echo (isset($i->discount) ? number_format((1-$i->discount)*$i->rate,2) : $i->rate) .'/'. ucfirst(strtolower($i->plan)) ?></div> | |
<form action="<?php echo JRoute::_(DJRentacarHelperRoute::getLink('details')); ?>" method="post"> | |
<input name="car" type="hidden" value="<?php echo $i->code ?>" /> | |
<input type="submit" class="button" value="Select car" /> | |
</form> | |
</div> | |
<div style="clear:both"></div> | |
</div> | |
</div> | |
</div> | |
<?php } | |
?> | |
<div style="clear:both"></div> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment