Do you like AbanteCart? Please rate AbanteCart or share your experience with other eCommerce entrepreneurs. Go to Softaculous rating page to add your rating or write a review

Please need help with guest checkout page

Started by Fady Salman, April 26, 2017, 07:35:48 AM

Previous topic - Next topic

Fady Salman

Hi all
i added 2 fields ( Date Fields ) on the embed guest checkout page  all the details shown up in order summary ( CHECKOUT CONFIRMATION ) except the fields added by me.

please how can i fix it

Basara

Hello.

How you add them? Maybe you miss something?

Fady Salman

i edit the file /home/manshourps/public_html/abante_new/storefront/view/default/template/embed/checkout/guest_step_1.tpl

and it works ok on the same page but when trying to continue checkout it dosnt appear in summery.
 

Fady Salman

<?php echo $head; ?>
<h1 class="heading1">
  <span class="maintext"><?php echo $heading_title; ?></span>
  <span class="subtext"></span>
</h1>

<?php if ($success) { ?>
<div class="alert alert-success">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<?php echo $success; ?>
</div>
<?php } ?>

<?php if ($error_warning) { ?>
<div class="alert alert-error alert-danger">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<?php echo $error_warning; ?>
</div>
<?php } ?>

<div class="contentpanel">
   <?php echo $form['form_open']; ?>

   <h4 class="heading4"><?php echo $text_your_details; ?></h4>
   <div class="registerbox form-horizontal">
      <fieldset>
      <?php
      foreach ($form['fields']['general'] as $field_name=>$field) { ?>
         <div class="form-group <?php if (${'error_'.$field_name}) echo 'has-error'; ?>">
            <label class="control-label col-sm-4 col-md-4"><?php echo ${'entry_'.$field_name}; ?></label>
            <div class="input-group col-sm-4 col-md-4">
                <?php echo $field; ?>
            </div>
            <span class="help-block"><?php echo ${'error_'.$field_name}; ?></span>
         </div>      

      <?php
         }
      echo $this->getHookVar('guest_details_attributes'); ?>
<h4 class="heading4">Shooting Dates</h4>
         <div class="registerbox form-horizontal">
   
               <div class="form-group ">
            <label class="control-label col-sm-4 col-md-4">From Date:</label>
            <div class="input-group col-sm-4 col-md-4">
                <input type="date" name="date" id="guestFrm_firstname" value="" placeholder="" class="form-control ">
<span class="input-group-addon"><span class="required">*</span></span>
            </div>
            <span class="help-block"></span>
         </div>      
      <div class="form-group ">
            <label class="control-label col-sm-4 col-md-4">To Date:</label>
            <div class="input-group col-sm-4 col-md-4">
                <input type="date" name="date" id="guestFrm_firstname" value="" placeholder="" class="form-control ">
<span class="input-group-addon"><span class="required">*</span></span>
            </div>
            <span class="help-block"></span>
         </div>      
      
      </fieldset>
   </div>   


      </fieldset>
   </div>
         
         
         
         
         
         
   <h4 class="heading4"><?php echo $text_your_address; ?></h4>
   <div class="registerbox form-horizontal">
      <fieldset>
      <?php
         $field_list = array('company' => 'company',
                        'address_1' => 'address_1',
                        'address_2' => 'to_date',
                        'city' => 'city',
                        'zone' => 'zone_id',
                        'postcode' => 'postcode',
                        'country' => 'country_id',
                        );
         
         foreach ($form['fields']['address'] as $field_name=>$field) {?>
         <div class="form-group <?php if (${'error_'.$field_name}) echo 'has-error'; ?>">
            <label class="control-label col-sm-4 col-md-4"><?php echo ${'entry_'.$field_name}; ?></label>
            <div class="input-group col-sm-4 col-md-4">
                <?php echo $field; ?>
            </div>
            <span class="help-block"><?php echo ${'error_'.$field_name}; ?></span>
         </div>      
      <?php
         }
         echo $this->getHookVar('address_entry_section'); ?>

         <div class="form-group">
            <label class="control-label col-sm-4 col-md-4"></label>
            <div class="input-group col-sm-4 col-md-4">
                <?php echo $form['shipping_indicator']; ?>
            </div>
         </div>   

      </fieldset>
   </div>
         
   <!-- start shipping address -->
   <div id="shipping_details" style="<?php echo ($shipping_addr) ? 'display:block;' : 'display:none;' ?>">
   <h4 class="heading4"><?php echo $text_shipping_address; ?></h4>
      <div class="registerbox form-horizontal">
      <fieldset>
      <?php
         foreach ($form['fields']['shipping'] as $field_name=>$field) {
            $entry_text = str_replace('shipping_','', $field_name);
            ?>
         <div class="form-group <?php if (${'error_'.$field_name}) echo 'has-error'; ?>">
            <label class="control-label col-sm-4 col-md-4"><?php echo ${'entry_'.$entry_text}; ?></label>
            <div class="input-group col-sm-4 col-md-4">
               <?php
                     echo $field;
                  ?>
            </div>
            <span class="help-block"><?php echo ${'error_'.$field_name}; ?></span>
         </div>      
      <?php
         }
      ?>   
      </fieldset>
      </div>     
   </div>
   <!-- end shipping address -->     
     
   <div class="form-group">
       <div class="col-md-12 mt20">
          <button class="btn btn-orange pull-right lock-on-click" title="<?php echo $form['continue']->name ?>" type="submit">
              <i class="fa fa-arrow-right"></i>
              <?php echo $form['continue']->name ?>
          </button>
          <a href="<?php echo $back; ?>" class="btn btn-default mr10" title="<?php echo $form['back']->text ?>">
              <i class="fa fa-arrow-left"></i>
              <?php echo $form['back']->text ?>
          </a>
       </div>
   </div>
   </form>
</div>

<script type="text/javascript">

$('#guestFrm_shipping_indicator').change( function(){
   (this.checked) ? $('#shipping_details').show() : $('#shipping_details').hide();
});
<?php $cz_url = $this->html->getURL('common/zone', '&zone_id='. $zone_id); ?>
$('#guestFrm_country_id').change(function() {
    $('select[name=\'zone_id\']').load('<?php echo $cz_url;?>&country_id=' + $(this).val());
});
$('select[name=\'zone_id\']').load('<?php echo $cz_url;?>&country_id='+$('#guestFrm_country_id').val());

<?php $cz_url = $this->html->getURL('common/zone', '&zone_id='. $shipping_zone_id); ?>
$('#guestFrm_shipping_country_id').change(function() {
   $('select[name=\'shipping_zone_id\']').load('<?php echo $cz_url;?>&country_id=' + $(this).val());
});
$('select[name=\'shipping_zone_id\']').load('<?php echo $cz_url;?>&country_id='+$('#guestFrm_shipping_country_id').val());

</script>
<?php echo $footer; ?>


Basara

Hi. Adding field to one page will not automatically show it on others checkout page and will not save to database because there is no table for this.
You should add it everywhere.

Forum Rules Code of conduct
AbanteCart.com 2010 -