Barcode in email. Probably not a bug!

  • Posts: 13
  • Thank you received: 0
10 years 7 months ago #120500

-- HikaShop version -- : HikaShop Business: 2.2.0
-- Joomla version -- : 2.5.14
-- PHP version -- : 5.3.18


Hi there

Trying to set up a test so we can sell gift vouchers.
We are getting the code in the email when ordering but I can not get a image to be included. Attached my config slimmed it down to only use code and QRcode.



Also Is there a way to show product info when using the consume feature?
As we will use it for staff to "consume" the voucher and hand out the right products to the cusomer.

Let me know if you want admin login

Regards Svendsen

Attachments:

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
10 years 7 months ago #120521

Hi,

Attach Serial
I updated the "attach serial" documentation in order to use the sample coupon image we included in HikaSerial 1.7.4
www.hikashop.com/support.html?id=152:hik...ns-attachserial-form

Basically, if you don't see an image, the first common error is that the image you use is not present in your server.
We had to download the sample image and copy it in your "images" folder. Because several people forget to do that, we include a sample image (which is nicer than the previous one).

Please now use the image /media/com_hikaserial/images/coupon_01.png which is include with HikaSerial 1.7.4

Consuming
The view "serial | consumed_html" is displayed when a serial is right consumed. You can override this view in order to display the information you want.

<?php
if(!empty($this->serial)) {
?>
<div class="hikaserial_serial_consume_page">
	<fieldset class="input">
		<h2><?php echo JText::_('HIKASERIAL_ENTER_SERIAL'); ?></h2>
		<p><?php echo $this->serial->serial_data; ?></p>
		<?php echo JText::_('CONSUME_THANK_YOU'); ?>
	</fieldset>
</div>
<?php
} // The rest of the view is truncated in this sample..

In the default view we only display the "$this->serial->serial_data" which is the serial data.
But you can display all information link to the serial, about the user, the order or the product attached.
The order id is accessible though "$this->serial->serial_order_id"
The user id is accessible though "$this->serial->serial_user_id"
The order product id is accessible though "$this->serial->serial_order_product_id"

So if you want to display some data from the order product, you have to load it.
if(!empty($this->serial->serial_order_product_id)) {
  $orderproductClass = hikaserial::get('shop.class.order_product');
  $orderProduct = $orderproductClass->get( $this->serial->serial_order_product_id )
  echo $orderProduct->order_product_name;
}
If you want to display data from the product, you have to load it too.
if(!empty($orderProduct->product_id)) {
  $productClass = hikaserial::get('shop.class.product');
  $product = $productClass ->get( $orderProduct->product_id )
  echo $product->product_description;
}

Regards,


Jerome - Obsidev.com
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.
Last edit: 10 years 7 months ago by Jerome.
The following user(s) said Thank You: Svendsen

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

  • Posts: 13
  • Thank you received: 0
10 years 7 months ago #120542

Hi and thanks for the promt reply

I changed the image link and looked at the server and the image is there but still no image in the emails.

Also tried the code for the consumed, but not smart enough to get it to work.
the order id and the product id is ok but i dont know how to load the other 2.

Also there is a ' in the hikaserial::get('shop.class.order_product); that gives me syntax error in my code editor.

regards Svendsen

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
10 years 7 months ago #120550

Hi,

Sorry, missing quote. I fixed the code in my previous post.

Regards,


Jerome - Obsidev.com
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: Svendsen

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

  • Posts: 13
  • Thank you received: 0
10 years 7 months ago #120574

Thanks

New code works great :)

Now I shall start over and see if I can get the image to appear in the mail

Regards

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
10 years 7 months ago #120577

Hi,

To test the image without creating an order again and again I use the "attach as download" option.
You have to create a file for the product and use this filename:

#hikaserial:attachserial:1
Where the last number (1) is the ID of your attach serial configuration.

/administrator/index.php?option=com_hikaserial&ctrl=plugins&plugin_type=plugin&task=edit&name=attachserial&subtask=plugin_edit&plugin_id=1


After that, when you open an order (in the back-end or in the front-end), you can download the image which will be generated dynamically by HikaSerial.
You can edit your configuration and refresh the file.
It is easier in the back-end because there is no download limitation.

Regards,


Jerome - Obsidev.com
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: Svendsen

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

  • Posts: 13
  • Thank you received: 0
10 years 7 months ago #121089

Hi

I am still not getting it right with the image and when i try use "attach as download" i get File not found

Any thoughts?

Regards

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
10 years 7 months ago #121115

Hi,

Which version of HikaSerial are you using ?
Is there really the file "ticket.png" in the "images" folder ?
Did you try with "/images/ticket.png" ?

If you have HikaSerial 1.7.4, can you try with the new coupon image file that we include in the package ?

/media/com_hikaserial/images/coupon_01.png

www.hikashop.com/support.html?id=152:hik...ns-attachserial-form

Regards,


Jerome - Obsidev.com
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.

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

  • Posts: 13
  • Thank you received: 0
10 years 7 months ago #121230

Hi again We are using latest hika shop and latest hikaserial.
I have loaded image location in browser and it loads fine. but never attaches when buying,
I have tried /images/ticket.png and /media/com_hikaserial/images/coupon_01.png
they are there been there the whole time.

Any thoughts about other things that could mess it up for us?


We are running
PHP 5.3.18
Joomla! 2.5.14
HikaShop Business: 2.2.1
HikaSerial: 1.7.4

Regards S

Last edit: 10 years 7 months ago by Svendsen.

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
10 years 7 months ago #121266

Hi,

I just realized that in your "attach serial" configuration, you wrote the pack name and not the pack id (number).
It is something I have to improve in the interface, by pushing a pack selector instead of a generic input. It will be easier for everyone.

Regards,


Jerome - Obsidev.com
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: Svendsen

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

  • Posts: 13
  • Thank you received: 0
10 years 7 months ago #121337

Thanks Again!

Now it works like a charm!

Great Product whit Great Service!!!!!!

Keep up the good work :)

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

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