<a href="https://console.cloud.google.com/apis/credentials">Get Your Api Credentials Here</a> <a href="https://calendar.google.com/calendar">Get your Calender ID</a> <?php include_once("wp-load.php"); function get_calender_events() { $params = array(); /*Get current date*/ $current_date = date('Y-m-d H:i:s'); /*Convert it to google calendar's rfc_format */ $rfc_format = date("c", strtotime($current_date)); $params[] = 'orderBy=startTime'; $params[] ='maxResults=100'; $params[] = 'timeMin='.urlencode($rfc_format); $url_param = ''; foreach($params as $param) { $url_param.= '&'.$param; } $calender_id = "calender_id"; $client_key = "client_key"; $url = "https://www.googleapis.com/calendar/v3/calendars/".$calender_id."/events?key=".$client_key."&singleEvents=true".$url_param; $list_events = wp_remote_post($url, ...
How to change Group product grid view to drop down view as like configurable product in magento.
step 1: add jquery file in head.phtml
ex: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
step 2: got to \app\design\frontend\default\default\template\catalog\product\view\type\grouped.phtml
in grouped.phtml replace below code
<script type="text/javascript">
jQuery(function(){
jQuery("#selectthemeid").change(function(e){
var param = jQuery(this).val();
// alert(param); //this is giving me my selectbox value but i want the selectbox ID i.e (listKey="id")
jQuery('#carnage').attr('name', 'super_group['+param+']');
});
});
</script>
<?php $this->setPreconfiguredValue(); ?>
<?php $_product = $this->getProduct(); ?>
<?php $_associatedProducts = $this->getAssociatedProducts(); ?>
<?php $_hasAssociatedProducts = count($_associatedProducts) > 0; ?>
<?php if ($this->displayProductStockStatus()): ?>
<?php if ($_product->isAvailable() && $_hasAssociatedProducts): ?>
<p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p>
<?php else: ?>
<p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Out of stock') ?></span></p>
<?php endif; ?>
<?php endif; ?>
<?php echo $this->getChildHtml('product_type_data_extra') ?>
<?php if ($_hasAssociatedProducts): ?>
<select id="selectthemeid">
<?php foreach ($_associatedProducts as $_item): ?>
<option value="<?php echo $_item->getId() ?>">
<?php $_finalPriceInclTax = $this->helper('tax')->getPrice($_item, $_item->getFinalPrice(), true) ?>
<?php echo $this->escapeHtml($_item->getName()) ?> -
<?php if ($this->getCanShowProductPrice($_product)): ?>
<?php if ($this->getCanShowProductPrice($_item)): ?>
<?php echo $this->getPriceHtml($_item, true) ?>
<?php echo $this->getTierPriceHtml($_item) ?>
<?php endif; ?>
<?php endif; ?>
</option>
<?php endforeach; ?>
</select>
<input type="text" name="super_group[]" maxlength="12" id="carnage" value="<?php echo $_item->getQty()*1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
<?php else: ?>
<tr>
<td colspan="<?php if ($_product->isSaleable()): ?>4<?php else : ?>3<?php endif; ?>"><?php echo $this->__('No options of this product are available.') ?></td>
</tr>
<?php endif; ?>
<script type="text/javascript">decorateTable('super-product-table')</script>
Comments
Post a Comment