Link product quantity for certain products, how?

  • Posts: 116
  • Thank you received: 1
11 years 1 week ago #103063

in my webshop I use serials for all products.
How can make some products not to "Link product quantity" because i only buy some products when customer buys it....i want it NOT to display Stock: Sold out, this is due to unavailable serials in packs.

Kind regards
Dan

Last edit: 11 years 1 week ago by Jerome.

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

  • Posts: 26034
  • Thank you received: 4006
  • MODERATOR
11 years 1 week ago #103111

Hi,

In the first implementation of this feature, I didn't thought to set an override option per pack.
But the option which link the product quantity with quantity of serials does not have an effect only if the pack does not have a generator.
While a generator is set for a pack, HikaSerial considered that the stock is unlimited.
(A generator is called only when the stock of serial is empty)

So, there is a way to configure it but adding an option is a good idea.

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
11 years 1 week ago #103124

is there any quick fix for this, because i need it to show that the products are not sold out, even if i dont have them at the very moment in the packs?
i am loosing sales, that is why i am kind of desperate for dirty fix

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

  • Posts: 26034
  • Thank you received: 4006
  • MODERATOR
11 years 1 week ago #103127

Hi,

Yes we can make a little "dirty" fix but I do not understand your problem because, if there is no serial, they can't be assigned to a product.
I mean, it is not logical. With a generator, you can have an unlimited serial quantity because the generator will generate new one when a product is bought but, if you do not have any serial in your stock and you do not have a generator. When the product will be bought, no serial will be attached so for, HikaSerial, there is a problem.

Are you sure you want to sold product without serials even if a pack is linked to the product ?

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
11 years 1 week ago #103855

You: Are you sure you want to sold product without serials even if a pack is linked to the product ?
Me: Yes please, ...please read why:

so when customer orders and pays for it, i will insert new serial in the existing pack and then i will go to his order and click "Refresh associations"...that way serial will be automatically inserted in his order after pressing Refresh associations.....is that correct?

Last edit: 11 years 1 week ago by dado023.

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

  • Posts: 26034
  • Thank you received: 4006
  • MODERATOR
11 years 1 week ago #103866

Hi,

Right, it makes sense !
Thanks for the explanation, I didn't imagine this kind of solution.

In the file "administrator/components/com_hikaserial/views/pack/tmpl/form.php", please update the content

						<tr>
							<td class="key">
								<label for="data[pack_params][stock_level_notify]"><?php echo JText::_('SERIAL_STOCK_LEVEL_NOTIFY'); ?></label>
							</td>
							<td>
								<input type="text" name="data[pack_params][stock_level_notify]" value="<?php echo @$this->pack->pack_params->stock_level_notify;?>"/>
							</td>
						</tr>
<!-- Begin of new lines -->
						<tr>
							<td class="key">
								<label for="data[pack_params][unlimited_quantity]"><?php echo JText::_('SERIAL_UNLIMITED_QUANTITY'); ?></label>
							</td>
							<td><?php
								echo JHTML::_('hikaselect.booleanlist', 'data[pack_params][unlimited_quantity]', '',  @$this->pack->pack_params->unlimited_quantity);
							?></td>
						</tr>
<!-- End of new lines -->
					</table>

In the file "administrator/components/com_hikaserial/classes/product.php, in the function "refreshQuantity" please update:
- The first line of the query:
$query = 'SELECT p.product_id, pa.pack_id, floor(count(s.serial_id) / pp.quantity) as qty, pa.pack_generator, p.product_quantity ' .
By
$query = 'SELECT p.product_id, pa.pack_id, floor(count(s.serial_id) / pp.quantity) as qty, pa.pack_generator, pa.pack_params, p.product_quantity ' .

- The block:
			if(!empty($p->pack_generator)) {
				$p->qty = -1;
			}
// Begin of new lines
			if(!empty($p->pack_params)) {
				$p->pack_params = unserialize($p->pack_params);
				if(!empty($p->pack_params->unlimited_quantity))
					$p->qty = -1;
			}
// End of new lines
			$products[$p->product_id] =& $p;

And you can update some of your packs with the new option for "unlimited quantity".

Regards,

PS: these modification will be include in the next release.


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: 11 years 1 week ago by Jerome. Reason: adding "PS"

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

  • Posts: 116
  • Thank you received: 1
11 years 1 week ago #103992

ok , i have done all changes above, and now i see this in packs:


i.imgur.com/ZR5SYxH.png

But, in webshop on product page it is still stated "Soldout" and no ability to put it in cart and order a product.

Last edit: 11 years 1 week ago by dado023.

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

  • Posts: 26034
  • Thank you received: 4006
  • MODERATOR
11 years 6 days ago #104062

Hi,

You have to refresh the quantity in the database, there are several "triggers" so:
You can save a serial (without modifying anything) to call the refresh for all products.
You can save a product (without modifying anything) to call the refresh for this specific product.

Otherwise, HikaSerial can't know that it has to update the quantities.

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
11 years 6 days ago #104234

i have tried what you suggested but, still same situation....would you be willing to take a look for your self, i am sure it would take you on few minutes....

Last edit: 11 years 6 days ago by dado023.

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

  • Posts: 26034
  • Thank you received: 4006
  • MODERATOR
11 years 6 days ago #104238

Hi,

Sure.
You can send me an access by private message.
I will prepare a HikaSerial package with the patch and install it in your website.

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
11 years 6 days ago #104244

great, thank you so much...wil send it in a minute or two

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

  • Posts: 116
  • Thank you received: 1
11 years 6 days ago #104248

did you get my private message?

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

  • Posts: 26034
  • Thank you received: 4006
  • MODERATOR
11 years 5 days ago #104398

Hi,

Yes and I installed the HikaSerial package in your website.
As explain in my previous post, you have to re-save the products so HikaSerial will update the product quantity automatically.

I tested it for two products (1 and 8) and it worked good.

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
11 years 5 days ago #104415

i swear i followed your steps above, but i couldn't make it work, ...hm, i probably missed something

Thank you for your effort :)

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

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