Skip to main content

Additional information form

More
13 years 8 months ago #84861 by Bassam
I need to collect additional information from the customers after or during purchasing an alarm system like ( 3 contact names and phone numbers, Panic Password and more.
I see that I can customize the form, but I'm not sure what part of the form should I add these fields since I need them after purchasing.

again thank you for help..

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #84900 by Xavier
Replied by Xavier on topic Additional information form
You can create custom fields in the table "order", they will be displayed in the checkout workflow only.

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #85119 by Bassam
Replied by Bassam on topic Additional information form
Ok I made a custom field ITEM that show perfectly like I need it, but only show up under full disription not when in category or in any modules, what am I doing wrong here please see attached images

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #85242 by nicolas
Replied by nicolas on topic Additional information form
For the listings, you need to activate the custom fields display.
Go in the menus Display>Content menus/modules and edit each products listing menu/module and make sure that the "Display custom item fields" option is turned on. Then you will see the fields on the listings too.

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #87277 by Bassam
Replied by Bassam on topic Additional information form
The custom fields keep disappearing from both category and product pages on and off, I deleted and re indexed the items changed categories, no changes the same problem, this was working for couple of weeks and just started doing that again Links:
www.websurveillance.com/index.php/hikash...for-products-listing
www.websurveillance.com/index.php/hikash...r-window-transmitter

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #87385 by Xavier
Replied by Xavier on topic Additional information form
The custom field seems to be displayed in the listing.
For the product page are you sure that you haven't removed the code which display the custom field ? in the view "product / show_tabular"

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #87452 by Bassam
Replied by Bassam on topic Additional information form
Please see attached images, where always the first item has no (Custom Field)but all the other does, but when you click on any item the (Custom Field) disappear,
also please advice how to make the blue are in items wider. (see item.png)

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #87456 by Bassam
Replied by Bassam on topic Additional information form
Here is the script from show_tabular:
<?php
/**
* @package HikaShop for Joomla!
* @version 2.0.0
* @author hikashop.com
* @copyright (C) 2010-2012 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?><?php
hikashop_loadJslib('jquery');
$js = '';
$params = null;
$this->params->set('vote_type','product');
if(isset($this->element->main)){
$product_id = $this->element->main->product_id;
}else{
$product_id = $this->element->product_id;
}
$this->params->set('product_id',$product_id);
$this->params->set('productlayout','show_tabular');
$layout_vote_mini = hikashop_getLayout('vote', 'mini', $this->params, $js);
$layout_vote_listing = hikashop_getLayout('vote', 'listing', $this->params, $js);
$layout_vote_form = hikashop_getLayout('vote', 'form', $this->params, $js);

$hide_specs = 1;
if($this->element->product_weight != 0 || $this->element->product_width != 0 || $this->element->product_height != 0 || $this->element->product_length != 0)
$hide_specs = 0;
foreach ($this->fields as $fieldName => $oneExtraField) {
$value = '';
if(empty($this->element->$fieldName) && !empty($this->element->main->$fieldName))$this->element->$fieldName = $this->element->main->$fieldName;
if(isset($this->element->$fieldName))
$value = trim($this->element->$fieldName);
if(!empty($value))
$hide_specs = 0;
}
?>
<div id="hikashop_product_top_part" class="hikashop_product_top_part">
<?php if(!empty($this->element->extraData->topBegin)) { echo implode("\r\n",$this->element->extraData->topBegin); } ?>
<h1>
<span id="hikashop_product_name_main" class="hikashop_product_name_main">
<?php
if (hikashop_getCID('product_id')!=$this->element->product_id && isset ($this->element->main->product_name))
echo $this->element->main->product_name;
else
echo $this->element->product_name;
?>
</span>
<?php if ($this->config->get('show_code')) { ?>
<span id="hikashop_product_code_main" class="hikashop_product_code_main">
<?php
echo $this->element->product_code;
?>
</span>
<?php } ?>
</h1>
<?php if(!empty($this->element->extraData->topEnd)) { echo implode("\r\n",$this->element->extraData->topEnd); } ?>
<?php
$pluginsClass = hikashop_get('class.plugins');
$plugin = $pluginsClass->getByName('content', 'hikashopsocial');
if (@ $plugin->published || @ $plugin->enabled) {
echo '{hikashop_social}';
}
?>
</div>
<?php if(HIKASHOP_J30){ ?>
<div class="row-fluid">
<?php } ?>
<div id="hikashop_product_left_part" class="hikashop_product_left_part" style="width: 500px; ">
<?php
if(!empty($this->element->extraData->leftBegin)) { echo implode("\r\n",$this->element->extraData->leftBegin); }

$this->row = & $this->element;
$this->setLayout('show_block_img');
echo $this->loadTemplate();
?>
<div id="hikashop_product_description_main_mini" class="hikashop_product_description_main_mini">
<?php
$resume = substr(strip_tags(preg_replace('#<hr *id="system-readmore" */>#i','',$this->element->product_description)),0,300);
$resume .= "...<a href='#description'>See more</a>";
echo JHTML::_('content.prepare',$resume);
?>
</div>
<?php if(!empty($this->element->extraData->leftEnd)) { echo implode("\r\n",$this->element->extraData->leftEnd); } ?>
</div>
<div id="hikashop_product_right_part" class="hikashop_product_right_part">
<?php
if(!empty($this->element->extraData->rightBegin))
echo implode("\r\n",$this->element->extraData->rightBegin);
?>
<span id="hikashop_product_price_main" class="hikashop_product_price_main">
<?php
if ($this->params->get('show_price')) {
$this->row = & $this->element;
$this->setLayout('listing_price');
echo $this->loadTemplate();
}
?>
</span><br />
<div id="hikashop_product_vote_mini" class="hikashop_product_vote_mini">
<?php
if($this->params->get('show_vote_product') == '-1'){
$this->params->set('show_vote_product',$config->get('show_vote_product'));
}
if($this->params->get('show_vote_product')){
echo $layout_vote_mini;
}
?>
</div>
<?php
$this->setLayout('show_block_characteristic');
echo $this->loadTemplate();
?>
<br />
<?php
$form = ',0';
if (!$this->config->get('ajax_add_to_cart', 1)) {
$form = ',\'hikashop_product_form\'';
}
if (hikashop_level(1) && !empty ($this->element->options)) {
?>
<div id="hikashop_product_options" class="hikashop_product_options">
<?php
$this->setLayout('option');
echo $this->loadTemplate();
?>
</div>
<br />
<?php
$form = ',\'hikashop_product_form\'';
if ($this->config->get('redirect_url_after_add_cart', 'stay_if_cart') == 'ask_user') {
?>
<input type="hidden" name="popup" value="1"/>
<?php
}
}
if (!$this->params->get('catalogue') && ($this->config->get('display_add_to_cart_for_free_products') || !empty ($this->element->prices))) {
if (!empty ($this->itemFields)) {
$form = ',\'hikashop_product_form\'';
if ($this->config->get('redirect_url_after_add_cart', 'stay_if_cart') == 'ask_user') {
?>
<input type="hidden" name="popup" value="1"/>
<?php
}
$this->setLayout('show_block_custom_item');
echo $this->loadTemplate();
}
}
$this->formName = $form;
if($this->params->get('show_price')){ ?>
<span id="hikashop_product_price_with_options_main" class="hikashop_product_price_with_options_main">
</span>
<?php } ?>
<?php $contact = $this->config->get('product_contact',0); ?>
<div id="hikashop_product_contact_main" class="hikashop_product_contact_main">
<?php
if (hikashop_level(1) && ($contact == 2 || ($contact == 1 && !empty ($this->element->product_contact)))) {
$empty = '';
$params = new HikaParameter($empty);
echo $this->cart->displayButton(JText :: _('CONTACT_US_FOR_INFO'), 'contact_us', $params, hikashop_completeLink('product&task=contact&cid=' . $this->row->product_id), 'window.location=\'' . hikashop_completeLink('product&task=contact&cid=' . $this->row->product_id) . '\';return false;');
}
?>
</div>
<?php
if(!empty($this->element->extraData->rightMiddle))
echo implode("\r\n",$this->element->extraData->rightMiddle);
?>

<span id="hikashop_product_id_main" class="hikashop_product_id_main">
<input type="hidden" name="product_id" value="<?php echo $this->element->product_id; ?>" />
</span>
<br />
<div id="hikashop_product_quantity_main" class="hikashop_product_quantity_main">
<?php
$this->row = & $this->element;
$this->ajax = 'if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form\')){ return hikashopModifyQuantity(\'' . $this->row->product_id . '\',field,1' . $form . ',\'cart\'); } else { return false; }';
$this->setLayout('quantity');
echo $this->loadTemplate();
?>
</div>
<?php
$this->setLayout('show_block_product_files');
echo $this->loadTemplate();
?>
<?php
if(!empty($this->element->extraData->rightEnd))
echo implode("\r\n",$this->element->extraData->rightEnd);
?>
</div>
<?php if(HIKASHOP_J30){ ?>
</div>
<?php } ?>
<div id="hikashop_product_bottom_part" class="hikashop_product_bottom_part show_tabular">
<div id="hikashop_tabs">
<ul>
<li><a href="#description"><?php echo JText::_('PRODUCT_DESCRIPTION');?></a></li>
<?php if($hide_specs == 0){ ?>
<li><a href="#specification"><?php echo JText::_('SPECIFICATIONS');?></a></li>
<?php } ?>
<li><a href="#comment"><?php echo JText::_('PRODUCT_COMMENT');?></a></li>
<li><a href="#new_comment"><?php echo JText::_('PRODUCT_NEW_COMMENT');?></a></li>
</ul>
<?php
if(!empty($this->element->extraData->bottomBegin))
echo implode("\r\n",$this->element->extraData->bottomBegin);
?>
<div id="description">
<div id="hikashop_product_description_main" class="hikashop_product_description_main">
<?php
echo JHTML::_('content.prepare',preg_replace('#<hr *id="system-readmore" */>#i','',$this->element->product_description));
?>
</div>
<span id="hikashop_product_url_main" class="hikashop_product_url_main">
<?php
if (!empty ($this->element->product_url)) {
echo JText :: sprintf('MANUFACTURER_URL', '<a href="' . $this->element->product_url . '" target="_blank">' . $this->element->product_url . '</a>');
}
?>
</span>
</div>
<?php if($hide_specs == 0){ ?>
<div id="specification">
<?php
$this->setLayout('show_block_dimensions');
echo $this->loadTemplate();
if(!empty($this->fields)){
$this->setLayout('show_block_custom_main');
echo $this->loadTemplate();
}
?>
</div>
<?php } ?>
<input type="hidden" name="cart_type" id="type" value="cart"/>
<input type="hidden" name="add" value="1"/>
<input type="hidden" name="ctrl" value="product"/>
<input type="hidden" name="task" value="updatecart"/>
<input type="hidden" name="return_url" value="<?php echo urlencode(base64_encode(urldecode($this->redirect_url)));?>"/>
</form>
<form action="<?php echo hikashop_currentURL() ?>" method="post" name="hikashop_comment_form">
<?php
if(!empty($this->element->extraData->bottomMiddle))
echo implode("\r\n",$this->element->extraData->bottomMiddle);
?>
<div id="comment">
<div id="hikashop_product_vote_listing" class="hikashop_product_vote_listing">
<?php
echo $layout_vote_listing;
?>
</div>
</div>
<div id="new_comment">
<div id="hikashop_product_vote_form" class="hikashop_product_vote_form">
<?php
echo $layout_vote_form;
?>
</div>
</div>
</form>
<?php
if(!empty($this->element->extraData->bottomEnd))
echo implode("\r\n",$this->element->extraData->bottomEnd);
?>
</div>
</div>
<script>
(function($) {
jQuery( "#hikashop_tabs" ).tabs();
})(jQuery);
</script>

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #87481 by Xavier
Replied by Xavier on topic Additional information form
Could you give us a screenshot of your custom field configuration ?

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #87542 by Bassam
Replied by Bassam on topic Additional information form
see attached image

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #87596 by Xavier
Replied by Xavier on topic Additional information form
Try to remove the limit ("Display limited to" option).

You restrict it to a category, that's maybe why the first product of the listing don't have the custom field. Is the product in the category "Honeywell Accessories" ?

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #87609 by Bassam
Replied by Bassam on topic Additional information form
I changed the category to main category instead subcategory, now it shows in related products but not when you open item

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #87627 by Xavier
Replied by Xavier on topic Additional information form
Do you have removed the value for the "Display limited to" option ?

If you set a default value (temporary) is it displayed on the product page ? Try to add "echo $this->element->addzone;" in the view "product / show_tabular" and see if there is a value.

Please Log in or Create an account to join the conversation.

Time to create page: 0.289 seconds
Powered by Kunena Forum