google map showing location from property form - google-maps

I am trying to make a form for showing properties:
My form looks like this below, how can i get the google map to show the location of the property?
<legend><?php echo JText::_('COM_IPROPERTY_LOCATION'); ?></legend>
<div class="formelm"><?php echo $this->form->getLabel('hide_address'); ?>
<?php echo $this->form->getInput('hide_address'); ?></div>
<div class="formelm"><?php echo $this->form->getLabel('street_num'); ?>
<?php echo $this->form->getInput('street_num'); ?></div>
<div class="formelm"><?php echo $this->form->getLabel('street'); ?>
<?php echo $this->form->getInput('street'); ?></div>
<div class="formelm"><?php echo $this->form->getLabel('street2'); ?>
<?php echo $this->form->getInput('street2'); ?></div>
<div class="formelm"><?php echo $this->form->getLabel('apt'); ?>
<?php echo $this->form->getInput('apt'); ?></div>
<div class="formelm"><?php echo $this->form->getLabel('city'); ?>
<?php echo $this->form->getInput('city'); ?></div>
<div class="formelm"><?php echo $this->form->getLabel('postcode'); ?>
<?php echo $this->form->getInput('postcode'); ?></div>
<div class="formelm"><?php echo $this->form->getLabel('locstate'); ?>
<?php echo $this->form->getInput('locstate'); ?></div>
<div class="formelm"><?php echo $this->form->getLabel('province'); ?>
<?php echo $this->form->getInput('province'); ?></div>
<div class="formelm"><?php echo $this->form->getLabel('country'); ?>
<?php echo $this->form->getInput('country'); ?></div>
<div class="formelm"><?php echo $this->form->getLabel('region'); ?>
<?php echo $this->form->getInput('region'); ?></div>
<div class="formelm"><?php echo $this->form->getLabel('county'); ?>
<?php echo $this->form->getInput('county'); ?></div>
</fieldset>
<fieldset>
<legend><?php echo JText::_( 'COM_IPROPERTY_DRAG_AND_DROP' ); ?></legend>
<?php echo $this->form->getLabel('geocode_header'); ?>
<div class="formelm"><?php echo $this->form->getLabel('latitude'); ?>
<?php echo $this->form->getInput('latitude'); ?></div>
<div class="formelm"><?php echo $this->form->getLabel('longitude'); ?>
<?php echo $this->form->getInput('longitude'); ?></div>
<div><?php echo $this->form->getInput('google_map'); ?></div>
</fieldset>
</div>

Create a Google Map and add a marker on top of it. It seems you have already got the latitude and longitude, so creating the map should be quite simple like in this example. This should be a starting point for your further development of your map.
function initialize() {
var myLatlng = new google.maps.LatLng(<?php echo $this->form->getInput('latitude'); ?>,<?php echo $this->form->getInput('longitude'); ?>);
var mapOptions = {
zoom: 4,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);
var marker = new google.maps.Marker({
position: myLatlng,
map: map,
title: 'Hello World!'
});
}

Related

how to add lightbox2 on acf?

I just import the lightbox2 on my project but I dont know how to add lightbox2 on advanced custom fields?
$images = get_field('gallery');
if( $images ): ?>
<ul>
<?php foreach( $images as $image ): ?>
<li>
<a href="<?php echo esc_url($image['url']); ?>">
<img src="<?php echo esc_url($image['sizes']['thumbnail']); ?>" alt="<?php echo esc_attr($image['alt']); ?>" />
</a>
<p><?php echo esc_html($image['caption']); ?></p>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?> ```

Solving an Array error in codeigniter framework

I am trying to load my sign in page, but I get the error that:
Message: in_array() expects parameter 2 to be array, boolean given
Filename: views/sign_in.php
Line Number: 23(<?php if(in_array("ldap",$this->config->item("validation"))): ?>)
and in line 103 ..... where am I going wrong?
MY CODE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo lang('website_title')." : " .
lang('sign_in_page_name');
?></title>
<?php echo $this->load->view('meta'); ?>
<base href="<?php echo base_url(); ?>" />
<link type="text/css" rel="stylesheet"
href="resource/css/960gs/960gs.css"
/>
<link type="text/css" rel="stylesheet" href="resource/css/style.css" />
</head>
<body>
<?php echo $this->load->view('header'); ?>
<div id="content">
<div class="container_12">
<?php echo $this->load->view('logo'); ?>
<?php if(in_array("ldap",$this->config->item("validation"))): ?>
<div class="grid_12">
<h2><?php echo anchor(uri_string().($this->input-
>get('continue')?'/?continue='.urlencode($this->input-
>get('continue')):''), lang('sign_in_page_name')); ?></h2>
</div>
<div class="clear"></div>
<div id="ldap_validation" >
<?php echo form_open(uri_string()."/sign_in_ldap".($this->input-
>get('continue')?'/?continue='.urlencode($this->input-
>get('continue')):'')); ?>
<?php echo form_fieldset(); ?>
<h3><?php echo lang('windows_validation'); ?></h3>
<div class="grid_2 alpha">
<?php echo form_label(lang('sign_in_ldap_username'),
'sign_in_ldap_username'); ?>
</div>
<div class="grid_4 omega">
<?php echo form_input(array(
'name' => 'sign_in_ldap_username',
'id' => 'sign_in_ldap_username',
'value' => set_value('sign_in_ldap_username'),
'maxlength' => '255'
)); ?>
<?php echo form_error('sign_in_ldap_username'); ?>
<?php if (isset($sign_in_ldap_username_error)) : ?>
<span class="field_error"><?php echo
$sign_in_ldap_username_error; ?></span>
<?php endif; ?>
</div>
<div class="clear"></div>
<div class="grid_2 alpha">
<?php echo form_label(lang('sign_in_ldap_password'),
'sign_in_ldap_password'); ?>
</div>
<div class="grid_4 omega">
<?php echo form_password(array(
'name' => 'sign_in_ldap_password',
'id' => 'sign_in_ldap_password',
'value' => set_value('sign_in_ldap_password')
)); ?>
<?php echo form_error('sign_in_ldap_password'); ?>
</div>
<div class="clear"></div>
<?php if (isset($recaptcha)) : ?>
<div class="prefix_2 grid_4 alpha omega">
<?php echo $recaptcha; ?>
</div>
<?php if (isset($sign_in_recaptcha_error)) : ?>
<div class="prefix_2 grid_4 alpha omega">
<span class="field_error"><?php echo
$sign_in_recaptcha_error; ?></span>
</div>
<?php endif; ?>
<div class="clear"></div>
<?php endif; ?>
<div class="prefix_2 grid_4 alpha omega">
<span>
<?php echo form_button(array(
'type' => 'submit',
'class' => 'button',
'content' => lang('sign_in_ldap_sign_in')
)); ?>
</span>
<span>
<?php echo form_checkbox(array(
'name' => 'sign_in_ldap_remember',
'id' => 'sign_in_ldap_remember',
'value' => 'checked',
'checked' => $this-
>input>post('sign_in_ldap_remember'),
'class' => 'checkbox'
)); ?>
<?php echo form_label(lang('sign_in_ldap_remember_me'),
'sign_in_ldap_remember'); ?>
</span>
</div>
<div class="clear"></div>
<div class="prefix_2 grid_4 alpha omega">
<p><?php echo lang('sign_in_ldap_forgot_your_password'); ?>
<br />
<?php echo sprintf(lang('sign_in_ldap_dont_have_account'),
lang('sign_in_ldap_sign_up_now')); ?></p>
</div>
<div class="clear"></div>
<?php echo form_fieldset_close(); ?>
<?php echo form_close(); ?>
</div>
<?php endif; ?>
<?php if (in_array("simple",$this->config->item("validation"))): ?>
<div class="grid_12">
<?php if (in_array("ldap",$this->config-
>item("validation"))): ?>
<h2>Or</h2>
<?php else: ?>
<h2><?php echo anchor(uri_string().($this->input-
>get('continue')?'/?continue='.urlencode($this->input-
>get('continue')):''), lang('sign_in_page_name')); ?></h2>
<?php endif; ?>
</div>
<div class="clear"></div>
<div class="grid_6">
<?php echo form_open(uri_string().($this->input-
>get('continue')?'/?continue='.urlencode($this->input-
>get('continue')):'')); ?>
<?php echo form_fieldset(); ?>
<h3><?php echo lang('sign_in_heading'); ?></h3>
<?php if (isset($sign_in_error)) : ?>
<div class="grid_6 alpha omega">
<div class="form_error"><?php echo $sign_in_error; ?></div>
</div>
<div class="clear"></div>
<?php endif; ?>
<div class="grid_2 alpha">
<?php echo form_label(lang('sign_in_username_email'),
'sign_in_username_email'); ?>
</div>
<div class="grid_4 omega">
<?php echo form_input(array(
'name' => 'sign_in_username_email',
'id' => 'sign_in_username_email',
'value' => set_value('sign_in_username_email'),
'maxlength' => '24'
)); ?>
<?php echo form_error('sign_in_username_email'); ?>
<?php if (isset($sign_in_username_email_error)) : ?>
<span class="field_error"><?php echo
$sign_in_username_email_error; ?></span>
<?php endif; ?>
</div>
<div class="clear"></div>
<div class="grid_2 alpha">
<?php echo form_label(lang('sign_in_password'),
'sign_in_password'); ?>
</div>
<div class="grid_4 omega">
<?php echo form_password(array(
'name' => 'sign_in_password',
'id' => 'sign_in_password',
'value' => set_value('sign_in_password')
)); ?>
<?php echo form_error('sign_in_password'); ?>
</div>
<div class="clear"></div>
<?php if (isset($recaptcha)) : ?>
<div class="prefix_2 grid_4 alpha omega">
<?php echo $recaptcha; ?>
</div>
<?php if (isset($sign_in_recaptcha_error)) : ?>
<div class="prefix_2 grid_4 alpha omega">
<span class="field_error"><?php echo
$sign_in_recaptcha_error; ?></span>
</div>
<?php endif; ?>
<div class="clear"></div>
<?php endif; ?>
<div class="prefix_2 grid_4 alpha omega">
<span>
<?php echo form_button(array(
'type' => 'submit',
'class' => 'button',
'content' => lang('sign_in_sign_in')
)); ?>
</span>
<span>
<?php echo form_checkbox(array(
'name' => 'sign_in_remember',
'id' => 'sign_in_remember',
'value' => 'checked',
'checked' => $this->input-
>post('sign_in_remember'),
'class' => 'checkbox'
)); ?>
<?php echo form_label(lang('sign_in_remember_me'),
'sign_in_remember'); ?>
</span>
</div>
<div class="clear"></div>
<div class="prefix_2 grid_4 alpha omega">
<p><?php echo anchor('account/forgot_password',
lang('sign_in_forgot_your_password')); ?><br />
<?php echo sprintf(lang('sign_in_dont_have_account'),
anchor('account/sign_up', lang('sign_in_sign_up_now'))); ?></p>
</div>
<div class="clear"></div>
<?php echo form_fieldset_close(); ?>
<?php echo form_close(); ?>
</div>
<div class="grid_6">
<h3><?php echo sprintf(lang('sign_in_third_party_heading')); ?>
</h3>
<ul>
<?php foreach($this->config-
>item('third_party_auth_providers') as $provider) : ?>
<li class="third_party <?php echo $provider; ?>"><?php echo
anchor('account/connect_'.$provider, lang('connect_'.$provider),
array('title'=>sprintf(lang('sign_in_with'),
lang('connect_'.$provider)))); ?></li>
<?php endforeach; ?>
</ul>
<div class="clear"></div>
</div>
<div class="clear"></div>
</div>
<?php endif; ?>
</div>
<?php echo $this->load->view('footer'); ?>
</body>
</html>
The error message is:
Severity: Warning
Message: in_array() expects parameter 2 to be array, boolean given
Filename: views/sign_in.php
Line Number: 23
High chances that $this->config->item("validation") is a boolean, but you are trying to find strings 'simple' and 'ldap' inside it like in array.
This is, probably, your problem, but I can't really help solving it, because I don't quite understand what are you trying to achieve with this code.
<?php if (in_array("simple",$this->config->item("validation"))): ?>
<?php if(in_array("ldap",$this->config->item("validation"))): ?>

wrong size of bootstrap dropdown. not responsive how to fix?

I wonder how I can change the size of bootstrap select tag. It is not responsive as well. Please see attachment, in first picture there is small resolution in second one is bigger.
<div class="col-md-9">
<?php $this->load->view('FlashMessagesView'); ?>
<div class="col-md-12 form-group">
<?php if ($searchTerm)
{ ?>
<h3>Vysledky hladania:
<a href="<?php echo base_url('Product/index/') . $subCategoryId; ?>" style="cursor: pointer; color: red"
class="glyphicon glyphicon-remove" aria-hidden="true"></a>
</h3>
<?php } ?>
<div class="col-md-3" style="float: right">
<?php echo form_open('Product/index/' . $subCategoryId,
['id' => 'form_search', 'class' => 'form-horizontal', 'role' => 'form']); ?>
<div class="input-group">
<input type="hidden" name="subcategory_id"
value="<?php echo $subCategoryId ?>"/>
<input type="text" class="form-control" name="product_description"
placeholder="Hladat velkost RAM, CPU...">
<span class="input-group-btn"><button class="btn btn-default" type="submit"><span
class="glyphicon glyphicon-search"></span></button></span>
<?php echo form_close(); ?>
</div>
</div>
Cena: <span class="glyphicon glyphicon-arrow-down" style="cursor: pointer"
onclick="sortProductByLowestPrice()"></span><span class="glyphicon glyphicon-arrow-up"
style="cursor: pointer"
onclick="sortProductByHighestPrice()"></span><br>
Len skladom <input type="checkbox" id="stock_sort" name="stock_only" onclick="sortProductByStock()">
</div>
<?php
$con = mysqli_connect('localhost', 'root', '');
mysqli_select_db($con, 'test');
$sql = "SELECT * FROM products WHERE subcategory_id = " . $subCategoryId;
$result = mysqli_query($con, $sql);
$numberOfProducts = mysqli_num_rows($result);
$numberOfPages = ceil($numberOfProducts / $resultPerPage);
if ( ! isset($_GET['page']))
{
$page = 1;
} else
{
$page = $_GET['page'];
}
$pageFirstResult = ($page - 1) * $resultPerPage;
if ($searchTerm)
{
$like = implode(' OR ', $searchTerm);
$sql = "SELECT * FROM products WHERE subcategory_id = " . $subCategoryId . " AND " . $like . " LIMIT " . $pageFirstResult . ", " . $resultPerPage;
} else
{
$sql = "SELECT * FROM products WHERE subcategory_id = " . $subCategoryId . " LIMIT " . $pageFirstResult . ", " . $resultPerPage;
}
$result = mysqli_query($con, $sql);
if (mysqli_num_rows($result) != 0)
{
$productCount = 0;
?>
<div class="col-md-12" style="padding-left: 0">
<ul class="list-unstyled" id="products" data-role="list">
<?php
while ($product = mysqli_fetch_array($result))
{
?>
<li data-sort="<?php echo $product['product_price'] ?>" class="col-md-3">
<div class="thumbnail">
<a href="product_details.html"><img
src="<?php echo base_url('assets/img/') . $product['product_image']; ?>"/></a>
<div class="caption" style="height: 300px; overflow: hidden">
<h5><?php echo $product['product_name']; ?></h5>
<p><?php echo $product['product_description']; ?></p>
</div>
<div class="product_footer caption">
<?php if ($product['product_quantity'] == 0)
{ ?>
<p style="text-align: center"><span
style="color:orange"><b>Na objednavku.</b></span>
</p>
<?php } else
{ ?>
<p style="text-align: center">
<span style="color:green">
<b>Na sklade <?php echo $product['product_quantity'] ?> ks.</b>
</span>
</p>
<?php } ?>
<h3><a type="button" id="<?php echo $product['id'] ?>"
class="btn btn-success buy_button">Kupit</a>
<?php if ($this->encryption->decrypt($this->session->role) == 'Admin')
{ ?>
<button href="" type="button" id="<?php echo $product['id'] ?>"
class="btn btn-warning"
data-toggle="modal" data-target="#modal_<?php echo $productCount; ?>">
Upravit
</button>
<?php } ?>
<span class="pull-right"><?php echo $product['product_price']; ?> €</span></h3>
<div class="modal fade" id="modal_<?php echo $productCount ?>" data-backdrop="static"
data-keyboard="false">
<div class="modal-dialog">
<div class="modal-body"><?php $this->load->view('AdminProductUpdateView', array('product' => $product, 'productCount' => $productCount,
'id' => $product['id'])) ?>
</div>
</div>
</div>
<p style="text-align: center">Cena bez
DPH <?php echo $product['product_price'] - $product['product_price_dph']; ?> €</p>
</div>
</div>
</li>
<?php $productCount++; ?>
<?php
}
?>
</ul>
</div>
<div class="col-md-1">
<select class="form-control" style="min-width: 2cm" onchange="productPerPage(<?php echo $subCategoryId; ?>, this.value)">
<option selected="selected" hidden><?php echo $resultPerPage; ?></option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>10</option>
<option>20</option>
<option>50</option>
</select>
</div>
Produkty na stranku
<div class="products_pagination">
<a id="previous_page">&slarr;</a>
<?php
for ($i = 1; $i <= $numberOfPages; $i++)
{
?>
<a id="<?php echo $i; ?>"
href="<?php echo base_url('Product/index/') . $subCategoryId . '/' . $resultPerPage . '?page=' . $i; ?>"><?php echo $i . ' '; ?></a>
<?php
}
?>
<a id="next_page">→</a>
</div>
<?php } else
{ ?>
<h3 class="col-md-12">Nenasli sa ziadne produkty.</h3>
<?php } ?>
</div>
<script>
productsPaggination(<?php echo $numberOfPages; ?>);
getSubcategoryForAdminUpdate(<?php echo $isAdmin ? 1 : 0; ?>, <?php echo $numberOfProducts; ?>);
</script>
small resolution
bigger resolution
This works for me to reduce select tag's width;
<select id ="Select1" class="input-sm">
You can use any one of these classes;
class="input-sm"
class="input-md"
class="input-lg"
Since youre using col-md-1, you are giving it 1/12 of your containers space, which is very little.
I would suggest to simply give it more space, eg. col-sm-2
Try specifying the width:
select.form-control {
width:100%;
}
I am not sure if you also realise that the dropdown is in the col-md-1 container. It will appear small on small screens.

Moving Details box renders Add to Cart Button inoperable - Magento

My site offers products that have multiple options. Some with as many as 5-8 options. So, the "details box" ends up way beneath all of the options. Also, the details are to long to place into the "short description" box at the top. So, I moved the details box above the options box. When doing this it causes the "add to cart" button to no longer work. I have tried moving code all over the page & no matter which portion of code I move the "add to cart button" won't work. (I have tried moving the options code & the details box code) I am using a custom theme called BuyShop. Here is a link to one of the products so you can see what I am talking about & trying to do: http://www.dvineinspiration.com/featured-products/mime-basic-plus.html. I have also included the code from the product/view.phtml file below.
<!--PRODUCT BOX-->
<?php
$widthSmall=62;
$heightSmall=62;
$widthMedium=460;
$heightMedium=440;
$_video = $this->getProduct()->getVideobox();
$_customtab = $this->getProduct()->getCustomtab();
$_customtabtitle = $this->getProduct()->getCustomtabtitle();
$image_size=Mage::getStoreConfig('buyshoplayout/product_info/product_info_image_size');
$main_image_popup='';
$popup_video='';
if(Mage::helper('lightboxes')->isActive())
{
/*popups*/
$helper = Mage::helper('lightboxes');
$rel = $helper->getLightboxRel($helper->getConfig('lightbox_type'));
$class = $helper->getLightboxClass($helper->getConfig('lightbox_type'));
$main_image_popup='class="'.$class.'" rel="'.$rel.'"';
$popup_video='class="video '.$class.'" rel="'.$rel.'"';
}
switch($image_size)
{
case 'small':
if(Mage::helper('buyshopconfig')->getMediaCount($_product) or !empty($_video))
{
$span0=4;
$span1=1;
$span2=3;
$span3=8;
}
else
{
$span0=3;
$span1=1;
$span2=3;
$span3=9;
}
$height_thumbs=206;
break;
case 'medium':
if(Mage::helper('buyshopconfig')->getMediaCount($_product) or !empty($_video))
{
$span0=5;
$span1=1;
$span2=4;
$span3=7;
}
else
{
$span0=4;
$span1=1;
$span2=4;
$span3=8;
}
$height_thumbs=350;
break;
case 'big':
if(Mage::helper('buyshopconfig')->getMediaCount($_product) or !empty($_video))
{
$span0=6;
$span1=1;
$span2=5;
$span3=6;
}else
{
$span0=5;
$span1=1;
$span2=5;
$span3=7;
}
$height_thumbs=422;
break;
}
?>
<form action="<?php echo $this->getSubmitUrl($_product) ?>" method="post" id="product_addtocart_form"<?php if($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>
<div class="product-box">
<div class="no-display">
<input type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
<input type="hidden" name="related_product" id="related-products-field" value="" />
</div>
<div class="row">
<div class="span<?php echo $span0?>">
<div class="product-img-box">
<div class="row">
<?php if(Mage::helper('buyshopconfig')->getMediaCount($_product) or !empty($_video)):?>
<div class="span<?php echo $span1?>">
<div class="more-views flexslider">
<ul class="slides">
<?php echo $this->getChildHtml('media') ?>
<?php if(!empty($_video)):?>
<li><a class="video" href="<?php echo Mage::helper('catalog/output')->productAttribute($this->getProduct(), $_video, 'video') ?>"><i class=" icon-link"></i></a></li>
<?php endif;?>
</ul>
</div>
</div>
<?php endif;?>
<div class="span<?php echo $span2?>">
<div class="product-image">
<a <?php echo $main_image_popup;?> title="<?php echo $this->htmlEscape($_product->getImageLabel())?>" <?php if(!Mage::helper('lightboxes')->isActive()):?>class="cloud-zoom"<?php endif;?> href="<?php echo Mage::helper('catalog/image')->init($_product, 'image', $_product->getFile())?>" <?php if(!Mage::helper('lightboxes')->isActive()):?>id='zoom1' data-rel="position: 'right', adjustX: 10, adjustY: 0"<?php endif;?>>
<img class="product-retina" data-image2x="<?php echo Mage::helper('catalog/image')->init($_product, 'image', $_product->getFile())->resize($widthMedium*2, $heightMedium*2)?>" src="<?php echo Mage::helper('catalog/image')->init($_product, 'image', $_product->getFile())->resize($widthMedium, $heightMedium)?>" alt="" />
</a>
</div>
<div class="pull-right hidden"><i class="icon-zoom-in"></i></div>
</div>
</div>
</div>
</div>
<div class="span<?php echo $span3?>">
<div class="product-shop">
<?php echo $this->getChildHtml('custom_related_block') ?>
<div class="product_info_left">
<div class="product-name">
<h1><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>
</div>
<?php if(Mage::getStoreConfig('buyshoplayout/product_info/sku')):?>
<p><?php echo $this->__('SKU') ?>: <b><?php echo nl2br($_product->getSku()) ?></b></p>
<?php endif; ?>
<?php if(!Mage::getStoreConfig('buyshopconfig/options/catalog_mode')):?>
<div class="product_type_data_price"><?php echo $this->getChildHtml('product_type_data') ?></div>
<?php endif; ?>
<div class="share-buttons share-buttons-panel" data-style="medium" data-counter="true" data-oauth="true" data-hover="true" data-promo-callout="left" data-buttons="twitter,facebook,pinterest"></div></p>
<div class="add-to-links">
<ul>
<?php echo Mage::helper('buyshopconfig')->addWishCompLink($_product,$this,true); ?>
<?php if ($this->canEmailToFriend()): ?>
<li><i class="icon-at"></i><?php echo $this->__('Email to a friend') ?></li>
<?php endif; ?>
</ul>
</div>
<?php echo $this->getReviewsSummaryHtml($_product, false, true)?>
<?php if(!Mage::getStoreConfig('buyshopconfig/options/catalog_mode')):?>
<?php echo $this->getPriceHtml($_product) ?>
<?php endif; ?>
<div class="socialsplugins_wrapper">
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('buyshop_social_like_buttons')->toHtml() ?>
</div>
<?php if ($_product->getShortDescription()):?>
<div class="short-description"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
<?php endif;?>
<?php echo Mage::helper('buyshopconfig')->countdownSpecialPrice($_product,'defaultCountdown',$this);?>
<?php if(!Mage::getStoreConfig('buyshopconfig/options/catalog_mode')):?>
<?php echo $this->getChildHtml('alert_urls') ?>
<?php echo $this->getTierPriceHtml() ?>
<?php echo $this->getChildHtml('extrahint') ?>
<?php if (!$this->hasOptions()):?>
<?php if($_product->isSaleable()): ?>
<?php echo $this->getChildHtml('addtocart') ?>
<?php endif; ?>
<?php echo $this->getChildHtml('extra_buttons') ?>
<?php endif; ?>
<?php endif; ?>
<?php echo $this->getChildHtml('other');?>
<?php if(Mage::getStoreConfig('buyshoplayout/product_info/qr')):?>
<div class="clearfix hidden-phone" style="margin: 20px 0 0 0">
<img src="http://api.qrserver.com/v1/create-qr-code/?size=100x100&data=<?php echo Mage::helper("core/url")->getCurrentUrl() ?>" alt="QR: <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?>"/>
</div>
<?php endif;?>
</div>
</div>
</div>
<?php $modules_enable=Mage::getStoreConfig('advanced/modules_disable_output');?>
<div class="row">
<div class="span12">
<ul class="nav-tabs" id="myTab">
<li class="active"><?php echo $this->__('Description') ?></li>
<?php if(!$modules_enable['Mage_Review']):?><li><?php echo $this->__('Reviews') ?></li><?php endif;?>
<?php if(!$modules_enable['Mage_Tag']):?><li><?php echo $this->__('Tags') ?></li><?php endif;?>
<?php if ($_customtab && Mage::getStoreConfig('buyshoplayout/product_info/custom_tab')): ?>
<li><?php if(!empty($_customtabtitle)) echo html_entity_decode($this->helper('catalog/output')->productAttribute($this->getProduct(), $_customtabtitle, 'customtabtitle'));else echo 'Custom tab title' ?></li>
<?php endif;?>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab1">
<?php foreach ($this->getChildGroup('detailed_info', 'getChildHtml') as $alias => $html):?>
<div class="box-collateral <?php echo "box-{$alias}"?>">
<?php if ($title = $this->getChildData($alias, 'title')):?>
<h2><?php echo $this->escapeHtml($title); ?></h2>
<?php endif;?>
<?php echo $html; ?>
</div>
<?php endforeach;?>
</div>
<div class="tab-pane" id="tab2">
<?php echo $this->getChildHtml('reviews') ?>
</div>
<div class="tab-pane" id="tab3">
<?php echo $this->getChildHtml('product_additional_data') ?>
</div>
<?php if ($_customtab): ?>
<div class="tab-pane" id="tab4">
<?php echo $this->helper('catalog/output')->productAttribute($this->getProduct(), $_customtab, 'customtab') ?>
</div>
<?php endif; ?>
</div></div></div>
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
<?php echo $this->getChildChildHtml('container1', '', true, true) ?>
<?php endif;?>
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
<?php echo $this->getChildChildHtml('container2', '', true, true) ?>
<?php endif;?>
</div>
</div>
<!--PRODUCT BOX EOF-->
</form>
</div>
</div>
</div>
<?php echo $this->getChildHtml('upsell_products') ?>
<script type="text/javascript">
<?php
?>
jQuery(function(){
var PreviewSliderHeight = function() {
var big_image_height= <?php echo $height_thumbs?>;
var preview_image_height= jQuery('div.more-views ul.slides li:first-child').height();
var slider_height = Math.round (big_image_height/preview_image_height) * preview_image_height - 10;
jQuery(".flexslider.more-views .flex-viewport").css({
"min-height": slider_height + "px"
});
if((slider_height-(jQuery('div.more-views ul.slides li:first-child').height()*jQuery('div.more-views ul.slides li').length))>=-10)
{
jQuery('.more-views .flex-next').remove()
jQuery('.more-views .flex-prev').remove()
}
};
jQuery('.flexslider.more-views').flexslider({
animation: "slide",
autoplay: false,
minItems: 3,
animationLoop: false,
direction: "vertical",
controlNav: false,
slideshow: false,
prevText: "<i class='icon-down'></i>",
nextText: "<i class='icon-up'></i>",
start: PreviewSliderHeight
});
})
</script>
<script type="text/javascript">
//<![CDATA[
var productAddToCartForm = new VarienForm('product_addtocart_form');
<?php if(Mage::getStoreConfig('buyshopconfig/options/ajax_add_to_cart')){?>
productAddToCartForm.submit = function(button, url) {
if (this.validator.validate()) {
var form = this.form;
var oldUrl = form.action;
if (url) {
form.action = url;
}
var e = null;
// Start of our new ajax code
if (!url) {
url = jQuery('#product_addtocart_form').attr('action');
}
url = url.replace("checkout/cart","ajax/index"); // New Code
var data = jQuery('#product_addtocart_form').serialize();
data += '&isAjax=1';
jQuery('#preloader .loader').fadeIn(300);
try {
jQuery.ajax( {
url : url,
dataType : 'json',
type : 'post',
data &colon; data,
success : function(data) {
jQuery('#ajax_loader').hide();
if(data.status == 'ERROR'){
jQuery('#preloader .loader').hide();
jQuery('#preloader .inside').html(data.message);
jQuery('#preloader .message').fadeIn(300);
setTimeout(function(){
jQuery('#preloader .message').fadeOut();
},1500);
}else{
jQuery('#preloader .loader').hide();
if(jQuery('.ul_wrapper.toplinks')){
jQuery('.shoppingcart').replaceWith(data.sidebar);
}
jQuery(".shoppingcart .fadelink").bind({
mouseenter: function(e) {
jQuery(this).find(".shopping_cart_mini").stop(true, true).fadeIn(300, "linear");
},
mouseleave: function(e) {
jQuery(this).find(".shopping_cart_mini").stop(true, true).fadeOut(300, "linear");
}
});
if(jQuery('#topline .links')){
jQuery('#topline .links').replaceWith(data.toplink);
}
jQuery('#preloader .inside').html(data.message);
jQuery('#preloader .message').fadeIn(300);
setTimeout(function(){
jQuery('#preloader .message').fadeOut();
},1500)
}
}
});
} catch (e) {
}
// End of our new ajax code
this.form.action = oldUrl;
if (e) {
throw e;
}
}
}.bind(productAddToCartForm);
<?php }else { ?>
productAddToCartForm.submit = function(button, url) {
if (this.validator.validate()) {
var form = this.form;
var oldUrl = form.action;
if (url) {
form.action = url;
}
var e = null;
try {
this.form.submit();
} catch (e) {
}
this.form.action = oldUrl;
if (e) {
throw e;
}
if (button && button != 'undefined') {
button.disabled = true;
}
}
}.bind(productAddToCartForm);
<?php } ?>
productAddToCartForm.submitLight = function(button, url){
if(this.validator) {
var nv = Validation.methods;
delete Validation.methods['required-entry'];
delete Validation.methods['validate-one-required'];
delete Validation.methods['validate-one-required-by-name'];
// Remove custom datetime validators
for (var methodName in Validation.methods) {
if (methodName.match(/^validate-datetime-.*/i)) {
delete Validation.methods[methodName];
}
}
if (this.validator.validate()) {
if (url) {
this.form.action = url;
}
this.form.submit();
}
Object.extend(Validation.methods, nv);
}
}.bind(productAddToCartForm);
<?php if(!Mage::helper('lightboxes')->isActive()):?>
jQuery("a.video").click(function() {
jQuery.fancybox({
'padding' : 0,
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
'title' : this.title,
'width' : 680,
'height' : 495,
'href' : this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
'type' : 'swf',
'swf' : {
'wmode' : 'transparent',
'allowfullscreen' : 'true'
}
});
return false;
});
<?php endif;?>
//]]>
When you have products with multiple options the details box ends up way beneath them so that the customer many not even see them. So, just in case anyone else has this issue & wants/needs assistance doing this. In order to move the "Details/Description" box above the add to cart button & keep the add to cart button functioning......
1. Details/Description Box - move the following code to above the last two </div> right before <!--PRODUCT BOX EOF-->:
<?php $modules_enable=Mage::getStoreConfig('advanced/modules_disable_output');?>
<div class="row">
<div class="span12">
<ul class="nav-tabs" id="myTab">
<li class="active"><?php echo $this->__('Description') ?></li>
<?php if(!$modules_enable['Mage_Review']):?><li><?php echo $this->__('Reviews') ?></li><?php endif;?>
<?php if(!$modules_enable['Mage_Tag']):?><li><?php echo $this->__('Tags') ?></li><?php endif;?>
<?php if ($_customtab && Mage::getStoreConfig('buyshoplayout/product_info/custom_tab')): ?>
<li><?php if(!empty($_cu`enter code here`stomtabtitle)) echo html_entity_decode($this->helper('catalog/output')->productAttribute($this->getProduct(), $_customtabtitle, 'customtabtitle'));else echo 'Custom tab title' ?></li>
<?php endif;?>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab1">
<?php foreach ($this->getChildGroup('detailed_info', 'getChildHtml') as $alias => $html):?>
<div class="box-collateral <?php echo "box-{$alias}"?>">
<?php if ($title = $this->getChildData($alias, 'title')):?>
<h2><?php echo $this->escapeHtml($title); ?></h2>
<?php endif;?>
<?php echo $html; ?>
</div>
<?php endforeach;?>
</div>
<div class="tab-pane" id="tab2">
<?php echo $this->getChildHtml('reviews') ?>
</div>
<div class="tab-pane" id="tab3">
<?php echo $this->getChildHtml('product_additional_data') ?>
</div>
<?php if ($_customtab): ?>
<div class="tab-pane" id="tab4">
<?php echo $this->helper('catalog/output')->productAttribute($this->getProduct(), $_customtab, 'customtab') ?>
</div>
<?php endif; ?>
2. Add to cart button - move the following code beneath <!--PRODUCT BOX EOF--> (Each piece of code is located in a separate part of the product box so just look for them & put them together)
<form action="<?php echo $this->getSubmitUrl($_product) ?>" method="post" id="product_addtocart_form"<?php if($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>
And
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
<?php echo $this->getChildChildHtml('container1', '', true, true) ?>
<?php endif;?>
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
<?php echo $this->getChildChildHtml('container2', '', true, true) ?>
<?php endif;?>
And
</form>

I want to make the background image of joomla login be full width

I have custimized the css of my joomla login page, everything is perfect, but I would like the image that I have inserted in the background through css to scale to whole width. Right now it is of a certain width size, despite the fact that in my css I have added width:100%.
Here is the login code:
<?php
/**
* #package Joomla.Site
* #subpackage com_users
* #copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* #license GNU General Public License version 2 or later; see LICENSE.txt
* #since 1.5
*/
defined('_JEXEC') or die;
JHtml::_('behavior.keepalive');
?>
<div class="login<?php echo $this->pageclass_sfx?>">
<?php //if ($this->params->get('show_page_heading')) : ?>
<div class="page-header">
<h1 class="title">
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
</div>
<?php //endif; ?>
<?php if (($this->params->get('logindescription_show') == 1 && str_replace(' ', '', $this->params->get('login_description')) != '') || $this->params->get('login_image') != '') : ?>
<div class="login-description">
<?php endif ; ?>
<?php if (($this->params->get('login_image')!='')) :?>
<img src="<?php echo $this->escape($this->params->get('login_image')); ?>" class="login-image" alt="<?php echo JTEXT::_('COM_USER_LOGIN_IMAGE_ALT')?>"/>
<?php endif; ?>
<?php if($this->params->get('logindescription_show') == 1) : ?>
<?php echo $this->params->get('login_description'); ?>
<?php endif; ?>
<?php if (($this->params->get('logindescription_show') == 1 && str_replace(' ', '', $this->params->get('login_description')) != '') || $this->params->get('login_image') != '') : ?>
</div>
<?php endif ; ?>
<form class="form-horizontal" action="<?php echo JRoute::_('index.php?option=com_users&task=user.login'); ?>" method="post">
<fieldset class="well">
<?php foreach ($this->form->getFieldset('credentials') as $field): ?>
<?php if (!$field->hidden): ?>
<div class="control-group">
<div class="control-label">
<?php echo $field->label; ?>
</div>
<div class="controls">
<?php echo $field->input; ?>
</div>
</div>
<?php endif; ?>
<?php endforeach; ?>
<?php if (JPluginHelper::isEnabled('system', 'remember')) : ?>
<div class="control-group">
<label id="remember-lbl" class="control-label" for="remember"><?php echo JText::_('JGLOBAL_REMEMBER_ME') ?></label>
<input id="remember" type="checkbox" name="remember" class="inputbox" value="yes" alt="<?php echo JText::_('JGLOBAL_REMEMBER_ME') ?>" />
</div>
<?php endif; ?>
<div class="control-group">
<div class="controls">
<button type="submit" class="btn-send"><?php echo JText::_('JLOGIN'); ?></button>
<input type="hidden" name="return" value="<?php echo base64_encode($this->params->get('login_redirect_url', $this->form->getValue('return'))); ?>" />
<?php echo JHtml::_('form.token'); ?>
</div>
</div>
</fieldset>
</form>
</div>
<div class="other-link">
<ul class="yt-list type-square">
<li class="pull-left">
<a href="<?php echo JRoute::_('index.php?option=com_users&view=reset'); ?>">
<?php echo JText::_('COM_USERS_LOGIN_RESET'); ?></a>
</li>
<?php
$usersConfig = JComponentHelper::getParams('com_users');
if ($usersConfig->get('allowUserRegistration')) : ?>
<li class="pull-right">
<a href="<?php echo JRoute::_('index.php?option=com_users&view=registration'); ?>">
<?php echo JText::_('COM_USERS_LOGIN_REGISTER'); ?></a>
</li>
<?php endif; ?>
</ul>
</div>
Don't modify core Joomla files, learn about overrides (1, 2 & 3) and use them, that way when a security update is released you can apply it safely and not have to worry about your changes being overwritten.
Did you mean backgroud-size: 100% rather than width: 100%? That would make more sense for background images. In that case, I would recommend reading this primer on "Scaling background images"
To help further we will need to see your existing CSS that you've created and either a link showing the problem or a good screen shot of the issue.