<div class="col-md-12"> <?php echo Form::open(['method'=>'patch', 'route'=>['front.cart.add', $product->id], 'id'=>'cart-form']); ?> <?php if(is_array($variants) && count($variants)): ?> <?php $__currentLoopData = $variants; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $variant): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $i = 0 ?> <div class="spec-type"> <span class="label"><?php echo e(ucfirst($variant['n'])); ?></span> : <?php $class = $opening = $closing = '';  ?> <?php if(isset($variant['c']) && $variant['c'] == 1): ?> <?php
                        $class      = 'color_variant_css';
                        $opening    = "<ul class='color-variation-list'>";
                        $closing    = "</ul>";
                    ?> <?php endif; ?> <?php echo $opening; ?> <?php $__currentLoopData = $variant['v']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $variant_key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php
                        $style = '';
                    ?> <?php if(!empty($class)): ?> <?php
                            $style = 'background-color : '. $value['n'].';';
                        ?> <?php endif; ?> <?php if(isset($variant['c']) && $variant['c'] == 1): ?> <li class="<?php echo e($i == 0 ? 'active' : ''); ?>"> <span class="box" data-color="<?php echo e($value['n']); ?>" style="<?php echo e($style); ?>"></span> <input data-product="<?php echo e($product->id); ?>" data-variant="<?php echo e($key); ?>" class="variant_input" <?php echo e($i == 0 ? 'checked' : ''); ?> required id="variants-<?php echo e($key); ?>-<?php echo e($variant_key); ?>" name="variants[<?php echo e($key); ?>]" value="<?php echo e($variant_key); ?>" type="radio" style="opacity: 0;position: absolute"> </li> <?php else: ?> <span class="spec-radio"> <input data-product="<?php echo e($product->id); ?>" data-variant="<?php echo e($key); ?>" class="variant_input" <?php echo e($i == 0 ? 'checked' : ''); ?> required id="variants-<?php echo e($key); ?>-<?php echo e($variant_key); ?>" name="variants[<?php echo e($key); ?>]" value="<?php echo e($variant_key); ?>" type="radio"> <label for="variants-<?php echo e($key); ?>-<?php echo e($variant_key); ?>" class="spec-radio-label <?php echo e($class); ?> " style="<?php echo e($style); ?>"><?php echo e($value['n']); ?></label> </span> <?php endif; ?> <?php $i++; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php echo $closing; ?> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?> <?php if($product->virtual && $product->downloadable && $product->file): ?> <?php echo Form::hidden('quantity', 1, ['class'=>'form-control','step'=>'1', 'min'=>'1', 'max'=>$product->qty_per_order]); ?> <?php $class = 'pl-0 mt-10';  ?> <?php else: ?> <?php $class = '';  ?> <div> <span class="label"><?php echo app('translator')->getFromJson('Quantity'); ?> :</span> </div> <div class="col-sm-4"> <div class="cart-quantity"> <div class="quant-input"> <?php echo Form::number('quantity', 1, ['class'=>'form-control', 'step'=>'1', 'min'=>'1', 'max'=>$product->qty_per_order]); ?> </div> </div> </div> <?php endif; ?> <?php
        if(session('shipping_availability') && config('settings.enable_zip_code')):
            echo '<div class="col-sm-6 add_cart_div '.$class.'"><button class="btn btn-success" id="add_cart" name="submit_button" type="submit"><i class="fa fa-shopping-cart mr-5"></i>'. __('ADD TO CART').'</button></div>';
        elseif(!session('shipping_availability') && config('settings.enable_zip_code')):
            echo '<div class="col-sm-6 add_cart_div '.$class.'"><button class="btn btn-danger" id="add_cart" name="submit_button" disabled><i class="fa fa-shopping-cart mr-5"></i>'. __('ADD TO CART').'</button></div>';
        else:
            echo '<div class="col-sm-6 add_cart_div '.$class.'"><button class="btn btn-success" id="add_cart" name="submit_button" type="submit"><i class="fa fa-shopping-cart mr-5"></i>'. __('ADD TO CART').'</button></div>';
        endif;
    ?> <?php echo Form::close(); ?> </div>