Example #1
0
$_field['default'] = app_setting($_field['key'], 'shop');
echo form_field_boolean($_field, 'The page shown when the range URL is used, but no slug is specified. Renders all the active ranges and their SEO data.');
// --------------------------------------------------------------------------
//	Sale Listing
$_field = array();
$_field['key'] = 'page_sale_listing';
$_field['label'] = 'Sale Listing Page';
$_field['default'] = app_setting($_field['key'], 'shop');
echo form_field_boolean($_field, 'The page shown when the sale URL is used, but no slug is specified. Renders all the active sales and their SEO data.');
// --------------------------------------------------------------------------
//	Tag Listing
$_field = array();
$_field['key'] = 'page_tag_listing';
$_field['label'] = 'Tag Listing Page';
$_field['default'] = app_setting($_field['key'], 'shop');
echo form_field_boolean($_field, 'The page shown when the tag URL is used, but no slug is specified. Renders all the populated tags and their SEO data.');
?>
				</fieldset>
				<p style="margin-top:1em;margin-bottom:0;">
					<?php 
echo form_submit('submit', lang('action_save_changes'), 'style="margin-bottom:0;"');
?>
				</p>
				<?php 
echo form_close();
?>
			</div>

			<?php 
$_display = $this->input->post('update') == 'skin' ? 'active' : '';
?>
Example #2
0
    echo form_field_boolean($_field);
}
// --------------------------------------------------------------------------
$_field = array();
$_field['key'] = 'sidebar_popular_posts';
$_field['label'] = 'Popular Posts';
$_field['default'] = app_setting($_field['key'], 'blog') ? TRUE : FALSE;
echo form_field_boolean($_field);
$_associations = $this->config->item('blog_post_associations');
if (is_array($_associations)) {
    foreach ($_associations as $assoc) {
        $_field = array();
        $_field['key'] = 'sidebar_association_' . $assoc->slug;
        $_field['label'] = $assoc->sidebar_title;
        $_field['default'] = app_setting($_field['key'], 'blog') ? TRUE : FALSE;
        echo form_field_boolean($_field);
    }
}
?>
				</fieldset>
				<p style="margin-top:1em;margin-bottom:0;">
					<?php 
echo form_submit('submit', lang('action_save_changes'), 'style="margin-bottom:0;"');
?>
				</p>
				<?php 
echo form_close();
?>
			</div>

		</section>
// --------------------------------------------------------------------------
$_field = array();
$_field['key'] = 'variation[' . $_counter . '][shipping][weight]';
$_field['label'] = 'Boxed Weight';
$_field['placeholder'] = 'The weight of the item';
$_field['class'] = 'weight';
$_field['required'] = TRUE;
$_field['default'] = isset($variation->shipping->weight) ? $variation->shipping->weight : '';
echo form_field($_field, 'c**k and balls');
// --------------------------------------------------------------------------
$_field = array();
$_field['key'] = 'variation[' . $_counter . '][shipping][collection_only]';
$_field['label'] = 'Collection Only';
$_field['readonly'] = !app_setting('warehouse_collection_enabled', 'shop');
$_field['info'] = !app_setting('warehouse_collection_enabled', 'shop') ? '<strong>Warehouse Collection is disabled</strong>' : '';
$_field['info'] .= !app_setting('warehouse_collection_enabled', 'shop') && user_has_permission('admin[settings]') ? '<br />If you wish to allow customers to collect from your warehouse you must enable it in ' . anchor('admin/settings/shop', 'settings', 'class="confirm" data-title="Stop Editing?" data-body="Any unsaved changes will be lost."') . '.' : '';
$_field['class'] = 'collection-only';
$_field['default'] = isset($variation->shipping->collection_only) ? (bool) $variation->shipping->collection_only : FALSE;
$_tip = 'Items marked as collection only will be handled differently in checkout and reporting. They also dont contribute to the overall dimensions and weight of the order when calculating shipping costs.';
echo form_field_boolean($_field, $_tip);
// --------------------------------------------------------------------------
if ($is_first) {
    $_display = empty($num_variants) || $num_variants == 1 ? 'none' : 'block';
    echo '<p id="variation-sync-shipping" style="margin-top:1em;display:' . $_display . '">';
    echo '<a href="#" class="awesome small orange">Sync Shipping Details</a>';
    echo '</p>';
}
?>
		</div>
	</section>
</div>