[Skip to main content](#vessel-content)

#   AttachSerial Plugin - Pack ID disappears on Save

##

- **[fythien](/forum/user/34885-fythien "View fythien's Profile")**
- [![fythien's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34885-fythien "View fythien's Profile") Topic Author
- [ Offline](/forum/user/34885-fythien)

Less More

- Posts: 2
- Thank you received: 0
-
-

11 years 11 months ago [\#178715](#178715) by [fythien](/forum/user/34885-fythien "View fythien's Profile")  *[AttachSerial Plugin - Pack ID disappears on Save](/forum/17-serial-how-to/872864-attachserial-plugin-pack-id-disappears-on-save#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 &quot;Save&quot; or &quot;Save &amp; Close&quot; 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&#95;params field in the hikaserial&#95;plugin record from the DB for the attachserial record shows:  I am sure I have missed something - probably glaringly obvious.... can you help?")* was created by *[fythien](/forum/user/34885-fythien "View fythien's Profile")*

-- 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 &amp; 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: Code:

O:8:"stdClass":14:{s:12:"attach_email";s:1:"1";s:15:"attach_download";s:1:"0";s:10:"image_path";s:25:"/shop/image/1_hour_gc.png";s:12:"default_font";s:20:"opensans-regular.ttf";s:18:"serial_text_format";s:5:"date.";s:21:"serial_text_format_ex";s:9:"%d/%m/%yy";s:13:"serial_text_x";s:3:"350";s:13:"serial_text_y";s:3:"220";s:13:"serial_text_w";s:0:"";s:13:"serial_text_h";s:0:"";s:16:"serial_text_size";s:2:"12";s:17:"serial_text_color";s:6:"000000";s:16:"serial_text_font";s:0:"";s:5:"texts";a:1:{i:0;a:11:{s:4:"type";s:18:"serial.serial_data";s:7:"type_ex";s:0:"";s:6:"format";s:3:"raw";s:9:"format_ex";s:0:"";s:1:"x";s:3:"350";s:1:"y";s:3:"255";s:1:"w";s:0:"";s:1:"h";s:0:"";s:4:"size";s:2:"12";s:5:"color";s:0:"";s:4:"font";s:0:"";}}}

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

- [ ![coupon&#95;template.png](/forum/attachment/20571) ](/forum/attachment/20571 "...n&#95;template.png") [ ](/forum/attachment/20571?download=1 "...n&#95;template.png")
- [ ![coupon&#95;generator.png](/forum/attachment/20572) ](/forum/attachment/20572 "...&#95;generator.png") [ ](/forum/attachment/20572?download=1 "...&#95;generator.png")
- [ ![pack.png](/forum/attachment/20573) ](/forum/attachment/20573 "pack.png") [ ](/forum/attachment/20573?download=1 "pack.png")
- [ ![attachserial.png](/forum/attachment/20574) ](/forum/attachment/20574 "attachserial.png") [ ](/forum/attachment/20574?download=1 "attachserial.png")
- [ ![hikaserial&#95;config.png](/forum/attachment/20575) ](/forum/attachment/20575 "...ial&#95;config.png") [ ](/forum/attachment/20575?download=1 "...ial&#95;config.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE3LXNlcmlhbC1ob3ctdG8vODcyODY0LWF0dGFjaHNlcmlhbC1wbHVnaW4tcGFjay1pZC1kaXNhcHBlYXJzLW9uLXNhdmU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

11 years 11 months ago [\#178716](#178716) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[AttachSerial Plugin - Pack ID disappears on Save](/forum/17-serial-how-to/872864-attachserial-plugin-pack-id-disappears-on-save#178716 "-- 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 &quot;Save&quot; or &quot;Save &amp; Close&quot; 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&#95;params field in the hikaserial&#95;plugin record from the DB for the attachserial record shows:  I am sure I have missed something - probably glaringly obvious.... can you help?")*

Hi,

Right.
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 Code:

public function displayMultiple($map, $values) { if(empty($this-&gt;values)){ $this-&gt;load(true); } if(empty($values)) { $values = array(); } else { if(is_string($values)) $values = explode(',', $values); } $shopConfig = hikaserial::config(false); hikaserial::loadJslib('otree'); if(substr($map,-2) == '[]') $map = substr($map,0,-2); $id = str_replace(array('[',']'),array('_',''),$map); $ret = '&lt;div class="nameboxes" id="'.$id.'" onclick="window.oNameboxes[\''.$id.'\'].focus(\''.$id.'_text\');"&gt;'; if(!empty($values)) { foreach($values as $key) { if(isset($this-&gt;values[$key])) $name = $this-&gt;values[$key]-&gt;text; else $name = JText::sprintf('UNKNOWN_PACK_X', $key); $ret .= '&lt;div class="namebox" id="'.$id.'_'.$key.'"&gt;'. '&lt;input type="hidden" name="'.$map.'[]" value="'.$key.'"/&gt;'.$name. ' &lt;a class="closebutton" href="#" onclick="window.oNameboxes[\''.$id.'\'].unset(this,\''.$key.'\');window.oNamebox.cancelEvent();return false;"&gt;&lt;span&gt;X&lt;/span&gt;&lt;/a&gt;'. '&lt;/div&gt;'; } } $ret .= '&lt;div class="namebox" style="display:none;" id="'.$id.'tpl"&gt;'. '&lt;input type="hidden" name="{map}" value="{key}"/&gt;{name}'. ' &lt;a class="closebutton" href="#" onclick="window.oNameboxes[\''.$id.'\'].unset(this,\'{key}\');window.oNamebox.cancelEvent();return false;"&gt;&lt;span&gt;X&lt;/span&gt;&lt;/a&gt;'. '&lt;/div&gt;'; $ret .= '&lt;div class="nametext"&gt;'. '&lt;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);"/&gt;'. '&lt;span style="position:absolute;top:0px;left:-2000px;visibility:hidden" id="'.$id.'_span"&gt;span&lt;/span&gt;'. '&lt;/div&gt;'; $data = array(); foreach($this-&gt;values as $key =&gt; $value) { if(empty($key)) continue; $data[$key] = $value-&gt;text; } $namebox_options = array( 'mode' =&gt; 'list', 'img_dir' =&gt; HIKASHOP_IMAGES, 'map' =&gt; $map, 'min' =&gt; $shopConfig-&gt;get('namebox_search_min_length', 3), 'multiple' =&gt; true ); $ret .= '&lt;div style="clear:both;float:none;"&gt;&lt;/div&gt;&lt;/div&gt; &lt;div class="namebox-popup"&gt; &lt;div id="'.$id.'_olist" style="display:none;" class="oList namebox-popup-content"&gt;&lt;/div&gt; &lt;/div&gt; &lt;script type="text/javascript"&gt; new window.oNamebox( \''.$id.'\', '.json_encode($data).', '.json_encode($namebox_options).' );'; if(!empty($values)) { $ret .= ' try{ window.oNameboxes[\''.$id.'\'].content.block('.json_encode($values).'); }catch(e){}'; } $ret .= ' &lt;/script&gt;'; return $ret; }

It will fix the issue.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [fythien](/forum/user/34885-fythien "View fythien's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE3LXNlcmlhbC1ob3ctdG8vODcyODY0LWF0dGFjaHNlcmlhbC1wbHVnaW4tcGFjay1pZC1kaXNhcHBlYXJzLW9uLXNhdmU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[fythien](/forum/user/34885-fythien "View fythien's Profile")**
- [![fythien's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34885-fythien "View fythien's Profile") Topic Author
- [ Offline](/forum/user/34885-fythien)

Less More

- Posts: 2
- Thank you received: 0
-
-

11 years 11 months ago [\#178718](#178718) by [fythien](/forum/user/34885-fythien "View fythien's Profile")  Replied by *[fythien](/forum/user/34885-fythien "View fythien's Profile")* on topic *[AttachSerial Plugin - Pack ID disappears on Save](/forum/17-serial-how-to/872864-attachserial-plugin-pack-id-disappears-on-save#178718 "-- 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 &quot;Save&quot; or &quot;Save &amp; Close&quot; 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&#95;params field in the hikaserial&#95;plugin record from the DB for the attachserial record shows:  I am sure I have missed something - probably glaringly obvious.... can you help?")*

Jerome - you are a star! It works perfectly now ![B)](/media/kunena/emoticons/1.png "B)")
Thank you

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE3LXNlcmlhbC1ob3ctdG8vODcyODY0LWF0dGFjaHNlcmlhbC1wbHVnaW4tcGFjay1pZC1kaXNhcHBlYXJzLW9uLXNhdmU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.161 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
