how to change status more than one serial at once?

  • Posts: 116
  • Thank you received: 1
12 years 2 months ago #66101

I have imported few dozen serials, and they all have status Free to use, but i need them all to have status Unassigned.
How do i change status of all those keys at one go?

regards
Dan

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
12 years 2 months ago #66140

Hi Dan,

For the moment, the SQL request is the fastest way to update several serial at the same time.
I will include in the next release of HikaSerial a button which would allow you to modify several serials at the same time.
Is the status the only element that you wanted to update ?

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: 12 years 2 months ago by Jerome.

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

  • Posts: 116
  • Thank you received: 1
12 years 2 months ago #66142

Hi Jerome,

thanks for the response.
Now when you are mentioning updates, i have few other requests.
In my case i use URLs in serials, those urls are link to pictures on dropbox. It would be great if those urls would be clickable in frontend customer view, so customer could click on it, instead of doing copy/paste to another browser window, or even better it would be best if just window popus up in a form of lightbox.

Do you have skype?

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

  • Posts: 116
  • Thank you received: 1
12 years 2 months ago #66143

forgot to mention, i am not sure how SQL request looks like, nor how to use it in this case.
Please provide me instructions how to do that, because i have a lot of serials to import.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
12 years 2 months ago #66144

Hi,

HikaSerial allow to override his views so you can override the way that your serial would be displayed in the front end.
You can modify the view for the "orderserial | show_order_front_show" or you can override the function "onDisplaySerials" (which is not quite documented yet).
The feature is already implemented. Using view override you can create the html you want, using the lightbox system that you need.

About the SQL request, you something like:

UPDATE #__hikaserial_serial SET serial_status = "unassigned" WHERE serial_status = "free" AND serial_id >= 50 AND serial_id <= 100;
You can use PhpMyAdmin or the special SQL task in the backend of HikaSerial ( index.php?option=com_hikaserial&ctrl=config&task=sql | SuperAdmin account required )

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: 12 years 2 months ago by Jerome.

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

  • Posts: 116
  • Thank you received: 1
12 years 2 months ago #66146

this is what i have in show_order_front_show :

<?php
/**
 * @package    HikaSerial for Joomla!
 * @version    1.4.0
 * @author     Obsidev S.A.R.L.
 * @copyright  (C) 2011-2012 OBSIDEV. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><fieldset>
  <legend><?php echo JText::_('HIKA_SERIALS')?></legend>
<?php 
if(!empty($this->data)) {
?>
  <table style="width:100%;cell-spacing:1px;">
    <thead>
      <tr>
        <th><?php echo JText::_('PACK_NAME');?></th>
        <th><?php echo JText::_('SERIAL_DATA');?></th>
        <th><?php echo JText::_('ASSIGN_DATE');?></th>
        <th><?php echo JText::_('ATTACHED_TO_PRODUCT');?></th>
      </tr>
    </thead>
    <tbody>
<?php
  foreach($this->data as $data) {
?>
    <tr>
      <td><?php echo $data->pack_name;?></td>
      <td><?php echo $data->serial_data; ?></td>
      <td><?php echo hikaserial::getDate($data->serial_assign_date);?>
      <td><?php echo $data->order_product_name; ?></td>
    </tr>
<?php
  }
?>
    </tbody>
  </table>
<?php
}
?>
</fieldset>

So where should i insert
<a </a>
?

Last edit: 12 years 2 months ago by dado023.

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

  • Posts: 116
  • Thank you received: 1
12 years 2 months ago #66149

ok, i think i have figured it out:

<td><a href="<?php echo $data->serial_data; ?>/"rel="width:480,height:240" class="ANYclassTHATgivesLightBOX"><img border="0" src="<?php echo $data->serial_data; ?>" alt="<?php echo $data->serial_data; ?>" width="256" height="128" /></a></td>
....it pops out in nice lightbox
Is it possible to make dimensions adjust to image size in light box, or it need to be fixed like in example above

Now my main question is, WILL THIS BE OVERWRITEN when next update of hikaserial is done?

Last edit: 12 years 2 months ago by dado023.

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

  • Posts: 116
  • Thank you received: 1
12 years 2 months ago #66150

now i have a problem.
When it happens that i in Serial Data use plain ordinary text like 32fkm8s7z4, then it tries to display it in the front end as a picture/image.
Is it possible to somehow overcome this?

Thank you in advance
Dan

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
12 years 2 months ago #66165

Hi,

You can base your display of your serial on the pack name, the pack id or the pack generator.

<td><?php
// The id of your pack with image links.
if($data->pack_id == 6) {
?>
  <a href="<?php echo $data->serial_data; ?>/"rel="width:480,height:240" class="ANYclassTHATgivesLightBOX"><img border="0" src="<?php echo $data->serial_data; ?>" alt="<?php echo $data->serial_data; ?>" width="256" height="128" /></a>
<?php
} else {
  echo $data->serial_data;
}
?></td>

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: 116
  • Thank you received: 1
12 years 2 months ago #66269

but can it be done "universal" not just for certain pack, beacuse often in packs will be mixed serials, sometimes urls(img) and sometimes plain text/numbers ?

regards
Dan

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
12 years 2 months ago #66272

Hi,

You can check the content of the serial.

<td><?php
if(strpos($data->serial_data, 'http://') !== false) {
?>

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: 116
  • Thank you received: 1
12 years 2 months ago #66278

i have no clue or knowledge what so ever about coding, but this seems to be better solution for me.
Would you be so kind and give me complete code, that checks for .bmp .png .jpg. .jpeg and .gif content of serial, so if it doesnt find any of these, it should just display it as is text/numbers.

I hope i am not troubling you to much :blush:

thank you in advance

Last edit: 12 years 2 months ago by dado023.

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

  • Posts: 116
  • Thank you received: 1
12 years 2 months ago #66371

please let me know if this is doable, since i use mixed types of serials.

Thank you in advance
Dan

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
12 years 2 months ago #66377

Hi,

This code will test if there is an extension (last characters of the serial data)

<td><?php
$ext = '';
if(strpos($data->serial_data, '.') !== false) {
  $ext = substr($data->serial_data, strrpos($data->serial_data));
  $ext = strtolower($ext);
}
if(!empty($ext) && in_array($ext, array('.bmp', '.jpg', '.jpeg', '.png', '.gif')) {
?>
  <a href="<?php echo $data->serial_data; ?>/"rel="width:480,height:240" class="ANYclassTHATgivesLightBOX"><img border="0" src="<?php echo $data->serial_data; ?>" alt="<?php echo $data->serial_data; ?>" width="256" height="128" /></a>
<?php
} else {
  echo $data->serial_data;
}
?></td>

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: 116
  • Thank you received: 1
12 years 1 month ago #67048

i have tried that last code, but then order page doesnt display correctly......
would you be so kind and receck if you have missed somwhere with faulty code...pleaseee

tnx
Dan

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
12 years 1 month ago #67076

Hi,

Maybe the missing space in the "<a>" tag, between the href and the rel.

<a href="<?php echo $data->serial_data; ?>" rel="width:480,height:240"

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.

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