AttachSerial Plugin - Pack ID disappears on Save

  • Posts: 2
  • Thank you received: 0
9 years 7 months ago #178715

-- HikaShop version -- : Ess 2.3.4
-- HikaSerial version -- : 1.8.3
-- Joomla version -- : 3.2.1
-- PHP version -- : 5.4.34
-- Browser(s) name and version -- : Firefox 33.0.3

I have been through the tutorials and all of the posts I can find on here, and can find no mention of the issue I am encountering.
What I am trying to do: Set up a Gift Certificate that can be purchased and the related image is attached to the email confirmation sent out.
What I have done:
1. Set up a Coupon Template
2. Set up Coupon Generator
3. Set up a pack and added the serial to the Gift Certificate Product (tested both before and after generating serials)
4. Set up AttachSerial (You will notice in the screen shot that the pack ID - which should be 3 - is missing. I add this and when I click "Save" or "Save & Close" this value is removed).
5. Tested
What happens:
When I test purchase the Gift Certificate, it does send out a new serial each time in the confirmation email; however, it does not include the image as I wish.

The pluing_params field in the hikaserial_plugin record from the DB for the attachserial record shows:


I am sure I have missed something - probably glaringly obvious.... can you help?

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

  • Posts: 26046
  • Thank you received: 4007
9 years 7 months ago #178716


In HikaShop 2.3.4 there is the new "namebox" system and HikaSerial 1.8.3 is using the old one.
I will see to make a new release as soon as possible.

Before that, you can edit the file "administrator/components/com_hikaserial/types/pack.php" and replace the function "displayMultiple" by this content

	public function displayMultiple($map, $values) {

		if(empty($values)) {
			$values = array();
		} else {
				$values = explode(',', $values);

		$shopConfig = hikaserial::config(false);

		if(substr($map,-2) == '[]')
			$map = substr($map,0,-2);
		$id = str_replace(array('[',']'),array('_',''),$map);
		$ret = '<div class="nameboxes" id="'.$id.'" onclick="window.oNameboxes[\''.$id.'\'].focus(\''.$id.'_text\');">';
		if(!empty($values)) {
			foreach($values as $key) {
					$name = $this->values[$key]->text;
					$name = JText::sprintf('UNKNOWN_PACK_X', $key);

				$ret .= '<div class="namebox" id="'.$id.'_'.$key.'">'.
					'<input type="hidden" name="'.$map.'[]" value="'.$key.'"/>'.$name.
					' <a class="closebutton" href="#" onclick="window.oNameboxes[\''.$id.'\'].unset(this,\''.$key.'\');window.oNamebox.cancelEvent();return false;"><span>X</span></a>'.

		$ret .= '<div class="namebox" style="display:none;" id="'.$id.'tpl">'.
				'<input type="hidden" name="{map}" value="{key}"/>{name}'.
				' <a class="closebutton" href="#" onclick="window.oNameboxes[\''.$id.'\'].unset(this,\'{key}\');window.oNamebox.cancelEvent();return false;"><span>X</span></a>'.

		$ret .= '<div class="nametext">'.
			'<input id="'.$id.'_text" type="text" style="width:50px;min-width:60px" onfocus="window.oNameboxes[\''.$id.'\'].focus(this);" onkeyup="window.oNameboxes[\''.$id.'\'].search(this);" onchange="window.oNameboxes[\''.$id.'\'].search(this);"/>'.
			'<span style="position:absolute;top:0px;left:-2000px;visibility:hidden" id="'.$id.'_span">span</span>'.

		$data = array();
		foreach($this->values as $key => $value) {
			$data[$key] = $value->text;

		$namebox_options = array(
			'mode' => 'list',
			'img_dir' => HIKASHOP_IMAGES,
			'map' => $map,
			'min' => $shopConfig->get('namebox_search_min_length', 3),
			'multiple' => true

		$ret .= '<div style="clear:both;float:none;"></div></div>
<div class="namebox-popup">
	<div id="'.$id.'_olist" style="display:none;" class="oList namebox-popup-content"></div>
<script type="text/javascript">
new window.oNamebox(
			if(!empty($values)) {
				$ret .= '

			$ret .= '
		return $ret;
It will fix the issue.


Jerome -
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: fythien

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

  • Posts: 2
  • Thank you received: 0
9 years 7 months ago #178718

Jerome - you are a star! It works perfectly now B)
Thank you

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

Moderators: Obsidev
Time to create page: 0.053 seconds
Powered by Kunena Forum