Serials are not getting assigned to orders.

  • Posts: 165
  • Thank you received: 3
8 years 1 month ago #232537

Hi I have finally gotten back around to this again. i have tried setting the height and width of the barcode in the Size (W/H) area and the height is the only thing that changes. The width field has zero effect on making the barcode wider I am using a code39 format. I am using 1.10.2 and 2.6.1 of hikashop.

How can i get the width of the barcode to increase. I tried as you suggested and the only that changes is the height of the barcode.

I want the barcode to be about 600px wide by 150px high

Last edit: 8 years 1 month ago by jschroeder.

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
8 years 1 month ago #232539

Hi,

Sure.
If you take a look at my answer in the first page (post 223962).
www.hikashop.com/forum/14-hikaserial/880...?limitstart=0#223962

The size settings "width" and "height" allow to change the "line width" and "height" into the barcode generator library.

So you can modify the width parameter but it won't have any effect.
Like I wrote, you need to change the "size".

The reason is that there is no real width with a barcode ; but you can define the size of the lines.
Exactly like you can define the size of the squares in the QRCode mode.

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: 165
  • Thank you received: 3
8 years 1 month ago #232645

I am sorry but I have tried every parameter available in the back end under barcode including size, size(w&h) and the barcode width and height and nothing changes either the width of the barcode nor the width of the lines in the barcode that is why i posted this here. I promise you there is something wrong when using a code39 barcode.

The size parameter works when you use a code128 barcode, qr code, etc but when using a code39 barcode the size does not change when you use the size parameter. I even attached my settings for you. If you set the size parameter to 4 then with the code128 barcode then the lines get 4 times as wide, but when you set it to 4 for a code39 nothing changes at all. There has to be some sort of bug.

This is something I need fixed pretty urgently as I have to be done with the site this friday and I need to be working on this today. I cannot finish laying out my coupon without this so, this is holding me back from finishing it.
Also, how do I change the font size of the serial number below the barcode I see no option for this? It does not appear to change size even if the barcode gets bigger and it is currently way to small. It should get bigger as well when the barcode line width increases.

Attachments:
Last edit: 8 years 1 month ago by jschroeder.

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
8 years 1 month ago #232650

Hi,

My bad.
It looks like the library BarCode2 (from pear : pear.php.net/package/Image_Barcode2 ) does not support the setting "width" for some barcode formats.
You can find that lib in the folder "administrator/components/com_hikaserial/inc/barcode/Barcode2/".

In the file "Barcode2.php" we can find the code

if (!$obj instanceof Image_Barcode2_DualWidth) {
	$obj->setBarcodeWidth($width);
}
And the driver "Code39" is a "dual width" driver
class Image_Barcode2_Driver_Code39 extends Image_Barcode2_Common implements Image_Barcode2_Driver, Image_Barcode2_DualWidth
But not the driver Code128
class Image_Barcode2_Driver_Code128 extends Image_Barcode2_Common implements Image_Barcode2_Driver

So I think it would require some modifications directly in the lib in order to support that "dual width" and allow you to change it.
Like
if (!$obj instanceof Image_Barcode2_DualWidth) {
	$obj->setBarcodeWidth($width);
} elseif ($width > 1) {
	$thin = $obj->getBarcodeWidthThin() * $width;
	$obj->setBarcodeWidthThin($thin);

	$thick = $obj->getBarcodeWidthThick() * $width;
	$obj->setBarcodeWidthThick($thick);
}
Let me know if it helps.

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: 165
  • Thank you received: 3
8 years 1 month ago #232653

Thank you so much that fixed it. The question I have now is how to increase the size of the serial number below the barcode it is very small right now?

On second though how can I just hide the serial number below the barcode? I have a weird situation where the real barcode is like below. However, the company has a separate code that they call the "viewable barcode and it is the real barcode minus the first 2 letters of the real barcode in their stores like below:

Real Barcode:
$PQ9K6XTZ

Viewable Barcode:
Q9K6XTZ

Also, how do I call my serial extra data in my order sheet that is sent to the customer after they purchase an order? Currently it sends the serial number, but I need to be able to remove the serial number and replace it with the serial extra data in my order receipt that is sent to the customer.

Last edit: 8 years 1 month ago by jschroeder.

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
8 years 1 month ago #232674

Hi,

I see that the lib have "getFontSize / setFontSize" functions but there is no single call of the "set".
So I guess that you can see to replace

	$obj->setShowText($showText);
By
	$obj->setShowText($showText);

	if ($showText && $width > 1) {
		$fontSize = $obj->getFontSize() * $width;
		$obj->setFontSize($fontSize);
	}
In order to change the font size with the same factor than the width.

About the display of the serial ; you just need to change the configuration of your "attach serial" instance and just display the serial as a "barcode" and not as a raw text.
The Code39 barcode format perform a little modification of the content ; some formats (like EAN13) requires a content which follow the specifications but some other format will add some content to include the checksum (etc).

For your last question, it would require a custom plugin in order to change the serial display.
You have to use the trigger "onDisplaySerials" to do so :
www.hikashop.com/support/documentation/1...fct_ondisplayserials

Regards,

PS : Please try to avoid the multiple edition of your message in order to add new questions


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.

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