VirtueMart Forum

VirtueMart 2 + 3 => Product creation => Topic started by: OpenGlobal on May 24, 2012, 14:36:59 pm

Title: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on May 24, 2012, 14:36:59 pm
Can we come to a consensus about the most important bugs in this plugin that need to be fixed. I'm going to put a bit of time into getting some of the bugs fixed and putting these bug fixes to the admins because development on this plugin has stopped.

What should get fixed first?

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: mowgs on May 24, 2012, 15:23:13 pm
Will come up with  a list of things that would help current clients - I'll be honest I'd given up on the Stockable Variants and have been concentrating on getting Generic Child Variants to work as there didnt seem to be any movement towards getting them sorted. 

If you do get it working you'll be a hero!

Mowgs
Title: Re: What bugs do you know of in stockable variants plugin
Post by: vanekmichal on May 24, 2012, 16:01:39 pm
Hello,

I have big problem with duplication of items list.
problem is described here:

"I have problem with "custom stockable variant".
Some positions are double >>>> http://gh589200.agy.hostime.cz/index.php/letaky (http://gh589200.agy.hostime.cz/index.php/letaky)

Picture:
 1 - 2. plugin setting
 3 - 4. parent + parent detail
 5. my problem

http://gh589200.agy.hostime.cz/images/virtuemart/1.jpg (http://gh589200.agy.hostime.cz/images/virtuemart/1.jpg)
http://gh589200.agy.hostime.cz/images/virtuemart/2.jpg (http://gh589200.agy.hostime.cz/images/virtuemart/2.jpg)
http://gh589200.agy.hostime.cz/images/virtuemart/3.jpg (http://gh589200.agy.hostime.cz/images/virtuemart/3.jpg)
http://gh589200.agy.hostime.cz/images/virtuemart/4.jpg (http://gh589200.agy.hostime.cz/images/virtuemart/4.jpg)
http://gh589200.agy.hostime.cz/images/virtuemart/5.jpg (http://gh589200.agy.hostime.cz/images/virtuemart/5.jpg)

I think the problem is only in generating the menu.
But I can not find it.

Thanks for the advice"

I think the problem with sorting is also important.

Thank you

Title: Re: What bugs do you know of in stockable variants plugin
Post by: mowgs on May 24, 2012, 16:10:41 pm
First off -

Trying to set up a simple pair of knickers.

1 Stockable Variants Plugin, 2 fields (Size and Colour)

14 Children (7 Sizes, 2 colours)

When setting up the variants, there doesn't seem to be any way of re-ordering the sizes/colours, i.e. size list reads 14,16,12,10,20,8,18.  These were actually added in order, but decided to re-order themselves on saving!

Also have set one size as out of stock.  This Size is still orderable.

When adding to Basket, all products show the SKU and Product Name as ...White Size 20, no matter what size or colour is selected.

Im sure there'll be more!


Using VM 2.0.6 on Joomla 2.5.4
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on May 24, 2012, 19:51:21 pm
vanekmichal,

I can see what's causing the problem you're seeing here. The javascript is useless :-)

When you select something from the 2nd dropdown (90/135), it populates the 3rd dropdown. It does this by going through all of the data looking for child products which match the 2nd dropdown. It doesn't do the essential check that the it also matches the 1st dropdown. So the 3rd dropdown gets populated with the data for A4 AND A5.

I shall add this to my bug list.

Thanks

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: dsrpmedia on May 25, 2012, 02:40:50 am
does not work at all on sites hosted on Godaddy, and several other hosts
Title: Re: What bugs do you know of in stockable variants plugin
Post by: mowgs on May 25, 2012, 20:59:19 pm
Also, when a selection is made, the parent details are still shown -

i.e. in my scenario, if the parent has the image for a white item, and its black variant has images to show it is black, then these should be shown if a customer chooses black in the drop down list.

(this is one of the parts of the generic child variant that works properly :)  )

Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on May 26, 2012, 00:25:28 am
I think that might be beyond the scope of this plugin, where the child products are just placeholders and none of the information is used (except name and SKU).

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: mowgs on May 29, 2012, 13:28:38 pm
Aaah, OK, will have to rethink that :)
Title: Re: What bugs do you know of in stockable variants plugin
Post by: dsrpmedia on May 29, 2012, 18:16:08 pm
Quote
i.e. in my scenario, if the parent has the image for a white item, and its black variant has images to show it is black, then these should be shown if a customer chooses black in the drop down list.

now I`m confused - I thought that was the point of the custom variant plugin - to show the variations between parent & child?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on May 30, 2012, 12:47:23 pm
From my understanding, it's just the stock control for variations.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: dsrpmedia on May 30, 2012, 19:05:36 pm
what if you don `t need the stock control, but need the variations? (eg images for color, size. etc to load when dropdown is selected )
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on May 30, 2012, 19:07:28 pm
Then I guess you'd use another type of custom field.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Milbo on May 30, 2012, 22:28:37 pm
Just be aware,

the both customs "dynamic child variants" and the the plugin "stockable variants" are very similar.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: dsrpmedia on May 30, 2012, 22:42:44 pm
 
Just be aware,

the both customs "dynamic child variants" and the the plugin "stockable variants" are very similar.

ok so perhaps it is the "dynamic child variants" I am looking to use
Title: Re: What bugs do you know of in stockable variants plugin
Post by: dsrpmedia on May 30, 2012, 22:51:21 pm
I find this new VM just mind-bogglingly difficult to comprehend (I`ve built over 50 vm 1.1 sites will little or no problems - even when having to heavily customize them)

how do I find this "dynamic child variants" option? - it`s not listed as a plugin, & is not listed on the 'Custom Field Type' dropdown
Title: Re: What bugs do you know of in stockable variants plugin
Post by: opsin on May 31, 2012, 04:04:50 am
I second the "it doesn't work at all in GoDaddy"
Title: Re: What bugs do you know of in stockable variants plugin
Post by: dsrpmedia on May 31, 2012, 05:21:32 am
not just godaddy - I`ve tried to load it on greengeeks too - doesn `t work there either, though it did work (sort of - lots of weird bugs) locally.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Panayiotis Fafakos on May 31, 2012, 10:21:34 am
I think that might be beyond the scope of this plugin, where the child products are just placeholders and none of the information is used (except name and SKU).

OpenGlobal

This should be in the scope of this plugin.

The reason is that if a customer is going to buy a variation of a product  i.e. a ring with different materials, then the customer must see the new picture of the product. The desing is the same only the colours will be different.

So we think this is a must for this plugin.

From what we have seen we only have to tamber with the recalculation function inside stockable.php.
We should extend the funtion recalculate(Opt) in /plugins/vmcustom/stockable/stockable.php
so as to change the picture according to the selected variants.

This way we can do the following:
For example:
1. Create a parent which has  the variations of the product.
2. The parent itself is not published. Moreover, only one of its children is published and belongs to a product category. This way on the frontend only one variation is displayed.
We have attached the images that show the configuration for the above
(backend-CustomField-StockableVariants.jpg, backend-parent-product-custom-fields.jpg, backend-parent-product-information.jpg, backend-product-list.jpg)
and some images of the frontend.
(frontend-bracelets-category.jpg, frontend-product-details.jpg)

The problems of the VM-Custom, Stockable Variants field are below:
1. When we enter to view product details, the DropDownList boxes are not synchronized with the product chosen.
2. The image does not correspond to the image of the selected child product.
3. The SKU is not synchronized also.
4. In case we have different names for the child products, the name is also wrong.

All the above could be changed with a modification of the recalculation function inside stockable.php.

We are using Joomla 2.5 &  VM2.0.7d. Would anyone be willing to help us do such a modification?
Since we have a running project, we would welcome anybody who would help us...

Kind regards to all,

Panos.



[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on May 31, 2012, 10:40:24 am
how do I find this "dynamic child variants" option? - it`s not listed as a plugin, & is not listed on the 'Custom Field Type' dropdown

It's just called Child Variants IIRC

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on May 31, 2012, 11:33:51 am
This should be in the scope of this plugin.

Maybe, but that's a debate for another thread. Let's get the bugs fixed before adding new features.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: KarlRanseier on June 03, 2012, 17:01:28 pm
I have a product with different sizes (with price differences) and colors.
So i added a custom stackable plugin for the sizes. Worked ok except the price calculations for add to card, i had to hack the stackable.php plugin file.
Then the different sizes are available with different colors, so i tried to add a custom stackable color plugin to the child. not working at all.

Adding a custom stackable plugin to a product works very weird:
what do i have to do? add->save? add->fill out->press new and then save?
sometimes clicking the new button, adds two or more childs.

Adding a different stockable plugin (like colors) to a child of size variants doesn't work at all. It always returns the size plugin and not the color plugin.

The additional charges are without taxes and are added automatically. very difficult to calculate your products.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 03, 2012, 17:17:12 pm
Worked ok except the price calculations for add to card, i had to hack the stackable.php plugin file.

What was the actual problem?

Then the different sizes are available with different colors, so i tried to add a custom stackable color plugin to the child. not working at all.

You can only have one variation configuration per product. You need to set up ONE custom field for both size and colour.

Adding a custom stackable plugin to a product works very weird:
what do i have to do? add->save? add->fill out->press new and then save?
sometimes clicking the new button, adds two or more childs.

You should be able to just select the custom field and start adding the variations to the custom field.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: KarlRanseier on June 03, 2012, 17:37:44 pm
VM 2.0.6 with joomla 2.5.4


Worked ok except the price calculations for add to card, i had to hack the stackable.php plugin file.

What was the actual problem?

It doubled the addition charge. see stockable.php line 508

Then the different sizes are available with different colors, so i tried to add a custom stackable color plugin to the child. not working at all.

You can only have one variation configuration per product. You need to set up ONE custom field for both size and colour.
ah ok, not very comfortable. so have to add a long list of variations. like:
size: s, color: blue
size: s, color: red
size: s, color: green
...
size: m, color: blue
size: m, color: red
size: m, color: green
....
am i right? if yes, that would me generate just one dropdown in the detail view. not one for size and one for color.

Adding a custom stackable plugin to a product works very weird:
what do i have to do? add->save? add->fill out->press new and then save?
sometimes clicking the new button, adds two or more childs.

You should be able to just select the custom field and start adding the variations to the custom field.

My workflow:
In a Product i go to custom fields
1. choose size variants
2. fill out the ski, title, price, stock, etc
3. I press the new button right next it -> nothing happens
4. Press Save

First i have to choose size variants, then press save and then i am able to start with step 2. and step 3. works

After Step 4. some informations are available but not the Additional charge.
5. activate the added size
6. choose the size from the drop down list
7. re-enter the additional charge


Why is there an extra input field with default 0 and a star at the bottom of the custom field form?

Also i am missing ordering for the added fields.

karl

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 03, 2012, 18:12:49 pm
It doubled the addition charge. see stockable.php line 508

That has already been fixed.

ah ok, not very comfortable. so have to add a long list of variations. like:
size: s, color: blue
size: s, color: red
size: s, color: green
...
size: m, color: blue
size: m, color: red
size: m, color: green
....
am i right?

Correct

if yes, that would me generate just one dropdown in the detail view. not one for size and one for color.

Incorrect.


My workflow:
In a Product i go to custom fields
1. choose size variants
2. fill out the ski, title, price, stock, etc
3. I press the new button right next it -> nothing happens
4. Press Save

First i have to choose size variants, then press save and then i am able to start with step 2. and step 3. works

After Step 4. some informations are available but not the Additional charge.
5. activate the added size
6. choose the size from the drop down list
7. re-enter the additional charge

That looks like a bug (or bugs), could you provide some screenshots?

Why is there an extra input field with default 0 and a star at the bottom of the custom field form?

No idea. I've just been ignoring it for now.

Also i am missing ordering for the added fields.

Yes, this has been mentioned before so I'll look into this too.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: KarlRanseier on June 03, 2012, 18:49:09 pm

if yes, that would me generate just one dropdown in the detail view. not one for size and one for color.

Incorrect.

OpenGlobal

ah yes sorry, there are more option fields, not just one. my fault.
ok, but then the price calculation doesn't work correct.
When i choose a color (color prices are always the same) and the size changes automatically because of availabilty, the price is not calculated correctly.

can i send you a pm with a link?


[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 04, 2012, 01:22:56 am
I've attached my first bug fixes. Simply extract the stockable.php file and overwrite your copy at plugins/vmcustom/stockable/stockable.php. This fixes the following:

Duplicated options when more than 2 dropdown lists used (vanekmichal).
Dropdown list ordering is now as specified in the backend product config.

I've also included my previous fixes so it is now no longer necessary to populate the option values in the custom field config. You can just give the option names and then type in the option values for the individual products.

If I've added any new issues, please let me know.

OpenGlobal

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 04, 2012, 11:56:55 am
KarlRanseier,

The version I've attached to this one improves the New button functionality. Now, when you click on New, it creates the child variant and adds it to the list, then clears the "new" fields to create another one.

What do you think?

OpenGlobal

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: KarlRanseier on June 04, 2012, 12:17:43 pm
Yes, very nice, works very well, thanks for the good job.

One little tiny mistake happens in the frontend, when you load the page the price isn't calculated right on the default selected dropdowns. When you use the dropdowns, the prices are fine.

Ordering in the Backend would be really nice. gets kind of messy when you have lots of color and size combinations.

Thanks a lot again, nice peace of work. i will have a look at your code later.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: KarlRanseier on June 04, 2012, 16:35:39 pm
Found another BUG

Adding a product more than once to the cart. it is displayed as an own product and not counted to the existing one.


[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 04, 2012, 17:19:20 pm
One little tiny mistake happens in the frontend, when you load the page the price isn't calculated right on the default selected dropdowns. When you use the dropdowns, the prices are fine.

I've managed to replicate this problem once, and now I can't get it to do it again. I think it's do to with the execution order of the asynchronous code the modifies the price itself. The Virtuemart.setproducttype() function (the bit which modifies the price) is called once from the stockable variant plugin, and once from the external JS file that defines the function itself. If the asynchronous bit then executes in reverse order, the price gets set BACK to the original unmodified price.

I'm not sure what to do about this without modifying the core VM code.
[/quote]

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 04, 2012, 17:20:33 pm
Found another BUG

Adding a product more than once to the cart. it is displayed as an own product and not counted to the existing one.

Hmmmm.... Yes you're right. That's one's been there from the start and I hadn't noticed it at all.

Thanks

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 04, 2012, 19:09:16 pm
Looking at administrator/..../helpers/cart.php, that last one is going to require a significant change in the way the cart works. It seems that all custom plugins will generate duplicates when added to the cart multiple times. The plugin itself has no way of controlling this and merging them into single lines.

I'll try to raise this with some other devs who may be able to look into it.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: KarlRanseier on June 05, 2012, 20:35:23 pm
Found another BUG

maybe its not cause of the plugin but if you add a translation to a product, all variants are unlinked, they are still there but not connected.  :-\
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Willc on June 06, 2012, 00:57:38 am
Please man.
I dont know if this is a bug, or miss of feature.

Running VM 2.0.6 on Joomla 2.5.4.

Using Stockable Variants to choose between sizes of product.

I Seted 'Action when a Product is Out of Stock' to 'Displays Notify Me' instead of 'Add To Cart button'

If the parent product has stock, the select box used to choose size, just dont show the sizes that are out of stock.

If the parent product is out of stock, show the notify me, and still not showing the sizes out of stock in select box. And show the notify me, even the sizes that has stock are selected.

NOTE: The parent product will never get purchased, so the parent product stock must to be irrelevant.

The select box to choose the options, must show all options, then when user select a out of stock size, show the notify me instead add to cart.

Awaiting.

Thanks
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Panayiotis Fafakos on June 06, 2012, 09:12:30 am
We also have a bug in VM 2.0.7d with Joomla 2.5.4 and PHP 5.3

When we order a stockable item product we have the following error:
Fatal error: Cannot use string offset as an array in /plugins/vmcustom/stockable/stockable.php on line 438

In order for the stockable items to be able to be purchased we have skipped the error by commenting out the lines that call the
plgVmGetProductStockToUpdateByCustom function which is defined in /plugins/vmcustom/stockable/stockable.php.

This modification is done in the /administrator/components/com_virtuemart/models/orders.php file.
We commented out lines 757 and 758 which now read
                               // $dispatcher = JDispatcher::getInstance();
                                //$dispatcher->trigger('plgVmGetProductStockToUpdateByCustom',array(&$product,$param, $productCustom));
Now, orders seem to be processed correctly.

Is there any solution to this problem yet, or not?

Could we all run the same VM version so as to specify bugs only for the head version?

What corrections should we apply in VM 2.0.7d?

Thank you for your support,

Panos.

Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 06, 2012, 11:54:31 am
Willc,

Yes this is a known bug which requires some changes to core code:

http://forum.virtuemart.net/index.php?topic=90833.msg335419#msg335419

I've chased this up with a developer to try to get this fixed. It's probably the single most important bug for this plugin because without it, the plugin isn't "stockable".


KarlRanseier,

I can replicate the translation bug. That's another one for the list.

Also, are you still seeing the problem where the initial/default child product price isn't being shown? I just can't replicate it any more. Do you have a link to somewhere that it's happening consistently?


Panos,

At what point are you given the error? I'll look into this further.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: KarlRanseier on June 06, 2012, 12:14:19 pm

KarlRanseier,

I can replicate the translation bug. That's another one for the list.

Also, are you still seeing the problem where the initial/default child product price isn't being shown? I just can't replicate it any more. Do you have a link to somewhere that it's happening consistently?

The translation bug comes from the plugin or from a different place?

the problem with the initial/default child product price appears sometimes when you reload the page. When you visit the page through a normal link, the price is shown correctly.
Use the link i pm'd you, switch color by dropdown to the second one and change the size and then reload the page.

Karl
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 06, 2012, 13:00:32 pm
Karl,

I think the attached version may fix the problem with the initial prices on reload/refresh.

OpenGlobal

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: gkolomvos on June 06, 2012, 14:36:38 pm
I think the attached version may fix the problem with the initial prices on reload/refresh.

I am not sure that i have the same "initial prices on reload/refresh" problem, because my stockable custom field has only one option field in it.
But i have a similar problem which might have the same cause:

If the child products are accessed (in the front-end) by choosing the custom field options, then the prices are always shown correctly (try: http://dimitriadis.wisdomsoftware.gr/e-shop/earrings/bianka2012-06-06-12-06-32_-detail    product: Bianka green gold, Sales price:20€)
If the child products are accessed directly through their url then, when the product page is loaded, it is always shown the prices of the first child (try: http://dimitriadis.wisdomsoftware.gr/e-shop/earrings/bianka-blue-silver-detail    product: Bianka Blue Silver,  Sales price:25€, Note that when the page loads the product price is correct but in a little while it changes to the price of the first product in the options list of the custom field)

I have installed your last version of stockable.php file
I use Joomla 2.5.4 and VM 2.0.7d
Title: Re: What bugs do you know of in stockable variants plugin
Post by: KarlRanseier on June 06, 2012, 14:45:28 pm
I think the attached version may fix the problem with the initial prices on reload/refresh.

I am not sure that i have the same "initial prices on reload/refresh" problem, because my stockable custom field has only one option field in it.
But i have a similar problem which might have the same cause:

If the child products are accessed (in the front-end) by choosing the custom field options, then the prices are always shown correctly (try: http://dimitriadis.wisdomsoftware.gr/e-shop/earrings/bianka2012-06-06-12-06-32_-detail    product: Bianka green gold )
If the child products are accessed directly through their url then, when the product page is loaded, it is always shown the prices of the first child (try: http://dimitriadis.wisdomsoftware.gr/e-shop/earrings/bianka-blue-silver-detail    product: Bianka Blue Silver)

I have installed your last version of stockable.php file
I use Joomla 2.5.4 and VM 2.0.7d

your first link is broken.
the second works, and there is the same problem. you choose the "Blue Silver" version and the price get recalculated right, but if do a reload the price stays the same and the dropdown switches to "Green Gold" and shows the price of "blue Silver".
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 06, 2012, 14:51:26 pm
If the child products are accessed directly through their url then,

If you want to access the child products directly, then you'll need something else. This is the "stockable cart variants" plugin, not "stockable child products". It merely uses child products as placeholders "in the background" and they are never meant to be seen or used by the visitors.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Willc on June 06, 2012, 15:16:12 pm
Quote from: OpenGlobal
Willc,

Yes this is a known bug which requires some changes to core code:

http://forum.virtuemart.net/index.php?topic=90833.msg335419#msg335419

Hello, I get the attached php file and replaced my one. This now increase parent product stock with the total amount of the childs stock levels. That's really nice, but.
Still dont showing the options that are out of stock.

Let me know,  thats is no possible show all variants, and  then show notify me if user select a out of stock option?

Thanks again
Title: Re: What bugs do you know of in stockable variants plugin
Post by: gkolomvos on June 06, 2012, 15:17:49 pm
It merely uses child products as placeholders "in the background" and they are never meant to be seen or used by the visitors.

You are right , it 's OK to hide  the child products but how can you hide them from modules like "Latest" or "Best sell products"?

Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 06, 2012, 15:21:18 pm
Let me know,  thats is no possible show all variants, and  then show notify me if user select a out of stock option?

Without the changes to the core files, it's not possible. I'm trying to get these changes added by the developers into the next release. Without it, this plugin is almost useless.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Willc on June 06, 2012, 15:38:15 pm

I think the file attached by u in another topic has this changes.

Can u provide a file with this changes?
The lines in ur explanation appear different by my. My ftp seem to add blank lines between each line
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 06, 2012, 16:07:30 pm
Sorry, I misunderstood you.

At the moment, no. It doesn't remove the out of stock variants. That's another one for my list.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 06, 2012, 16:10:14 pm
You are right , it 's OK to hide  the child products but how can you hide them from modules like "Latest" or "Best sell products"?

Hmmm....I shall have to investigate that. It will probably be another one for my bug list.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Willc on June 06, 2012, 16:12:21 pm
Sorry, I misunderstood you.

At the moment, no. It doesn't remove the out of stock variants. That's another one for my list.

OpenGlobal

OK, sorry for my bad english. I will waiting trying.
If I have some progress I will be glad to post here.

Thanks
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 06, 2012, 17:15:19 pm
Willc,

Your English is fine, my reading is bad :-)

Try the attached file. I haven't extensively tested it, but it seems to work for me.

OpenGlobal

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 06, 2012, 17:36:45 pm
You are right , it 's OK to hide  the child products but how can you hide them from modules like "Latest" or "Best sell products"?

Ah, these are third party modules so I don't think there's anything that can be done about them here. As the stockable cart variants plugin comes with VM itself, I guess this is technically a bug in those modules displaying the child products.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 06, 2012, 18:04:37 pm
maybe its not cause of the plugin but if you add a translation to a product, all variants are unlinked, they are still there but not connected.  :-\

I've looked into this and it looks like it's a core bug. All child products are removed from the parent when saving product translations regardless of how they're set up.

I'll raise this with the Dev team.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Willc on June 06, 2012, 18:10:46 pm
Willc,

Your English is fine, my reading is bad :-)

Try the attached file. I haven't extensively tested it, but it seems to work for me.

OpenGlobal

You got this!!

Work perfectly, combined with another replacement, product.php, that u attached in another topic.
This is the solution.

Will post  the complete solution  with credits for you in the other topic that i was opened, for the further users that came for the same problem.

Thanks

Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 06, 2012, 18:11:54 pm
Can anyone provide a link to a GoDaddy demo where this is not working at all?

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Willc on June 06, 2012, 18:22:21 pm

For the further users that search by the same that I, you can show this topic. This 2 steps provided by OpenGlobal work perfectly.

http://forum.virtuemart.net/index.php?topic=103561.0
Title: Re: What bugs do you know of in stockable variants plugin
Post by: dsrpmedia on June 06, 2012, 21:44:12 pm
Can anyone provide a link to a GoDaddy demo where this is not working at all?

OpenGlobal

I`ve got a dev site on godaddy with 2.5.4 & vm 2.0.6

I had pretty much given up on the stockable variant, so it is no longer set up for that - bnut if you wanted a test godaddy site to play with I could pm you an admin login
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 06, 2012, 22:18:58 pm
That'd be great, thanks.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: mowgs on June 07, 2012, 11:11:12 am
Thanks OpenGlobal!

Will upload the files from WillC's post and have another go with Stockable Variants, sounds like you've made some great progress - just hope the VM team appreciate it as much as the community!

Title: Re: What bugs do you know of in stockable variants plugin
Post by: ivowolfen on June 07, 2012, 13:08:16 pm
Some interesting bug in my case. I tried to create multilanguage support to my VM using overrides. Create one custom field with stockable variants plugin with two options named: COM_VIRTUEMART_EXECUTION="Execution" with values EXECUTION_WALL="Wall mounted"
EXECUTION_FREE="Free" Standing"
and second option COM_VIRTUEMART_ACTIVATION="Activation" with values:
PHOTO_ACTIVATION="Photocell"
KNEE_ACTIVATION="Knee valve"
with corresponding translation in second language. The problem come with second option dropdown , show translation string just for second, and then replace it with  PHOTO_ACTIVATION or KNEE_ACTIVATION (pic01 attached), so in the cart options are shown with constants (pic02).
 This happens also when I create custom field with "Cart variant" type, dropdown is not correct, but cart is fine in this case - show correct overrides.
Everything with overrides is fine only when i choose "string" type of custom filed - but i preffer to track correct child product number as in stockable variants plugin.

And i have additional question, may custom field can be shown if there is no price set to the item, with "Call for price" variant.
Excuse me for my bad english, and thank you for attention.

Joomla 2.5.4, VM 2.0.6

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: mowgs on June 07, 2012, 15:54:40 pm
Hi, just working with the plugin today - come across one thing re: stock numbers

When entering the products all seems fine - if you enter no stock for a child then it displays notify me instead of being orderable.

One thing - the children that are in stock are showing as having the total stock for the parent?

i.e.  1 Parent with 20 Children.

18 of the children have 10 items in stock
2 children have no stock

so 180 items in stock of various sizes.

When doing a test order, I was able to order 12 of one size!

Customer front end showed no problems, and confirmed the order

It then showed -2 in the inventory in the backend for the particular size I had ordered?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 07, 2012, 15:57:43 pm
Damn! I thought things were looking too good.

I'll get onto it.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 07, 2012, 16:00:28 pm
The problem come with second option dropdown , show translation string just for second, and then replace it with  PHOTO_ACTIVATION or KNEE_ACTIVATION (pic01 attached), so in the cart options are shown with constants (pic02).
 This happens also when I create custom field with "Cart variant" type, dropdown is not correct, but cart is fine in this case - show correct overrides.

Thanks for this. It looks like the AJAX code isn't being translated. This will probably require a core change. I'll look into it and notify the devs.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 07, 2012, 23:26:30 pm
One thing - the children that are in stock are showing as having the total stock for the parent?

I think I've got this sorted now. Although I may have missed somewhere.

I've attached two files, the stockable.php for the plugin and the latest version of my administrator/components/com_virtuemart/models/product.php file. This is for 2.0.6.

If there are no new problems with this, I'll merge my changes with the 2.0.7 code as well.

OpenGlobal

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: uschmi on June 07, 2012, 23:57:40 pm
I tried this solution of OpenGlobal.
Now, I´m not able any more to update/put in the stock into the childs!
The stock field is blank (even if there was stock in before) and it becomes blank again as soon as I save...
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 08, 2012, 10:11:40 am
Hi uschmi, Thanks for this feedback. I'm not able to replicate the problem. How and where are you updating the stock?

I've attached my latest product.php again in case I accidentally uploaded the wrong one last time.

OpenGlobal

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: mowgs on June 08, 2012, 10:16:07 am
One thing - the children that are in stock are showing as having the total stock for the parent?

I think I've got this sorted now. Although I may have missed somewhere.

I've attached two files, the stockable.php for the plugin and the latest version of my administrator/components/com_virtuemart/models/product.php file. This is for 2.0.6.

If there are no new problems with this, I'll merge my changes with the 2.0.7 code as well.

OpenGlobal

Excellent - thanks for that, yep seems to be working much better, just tried a couple of orders, and got the 'maximum quantity reached' messages, and it dropped the number down to the amount actually in stock, so all good!

(VM 2.0.6)

I did have similar things going on as uschmi with the other errors (blank fields etc), so hopefully that new file should fix those?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: ppetrid on June 08, 2012, 12:40:41 pm
Hello!

Thanks to OpenGlobal for working on this! Really good job  :D

The latest product.php brakes product ordering by product_sku (e.g in vm admin -> products -> products). To fix this, go to line 336, just before the 'default' statement and insert the following code:

Code: [Select]
case 'product_sku':
  $orderBy = ' ORDER BY p.`product_sku` ';
  break;

When this becomes stable, a good idea might also be to replace inline css styling with class names.

Thanks again OpenGlobal, I will probably come back with more on this!
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 08, 2012, 13:28:29 pm
Hmmm. Well spotted.

I can see that similar issues to this may arise in future due to the new join on the product tables. It would be nice to come up with a more generic solution, but for the time-being this is fine. I've attached a new 2.0.6 version of the file.

OpenGlobal

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: gkolomvos on June 08, 2012, 14:55:29 pm
Just be aware,
the both customs "dynamic child variants" and the the plugin "stockable variants" are very similar.
Milbo, could you please give us any hints about child products manipulation.
Stockable Variants Plugin is very good as an idea but it has so many bugs and problems.
Generic Child Variants do not have bugs but the shopper has to choose child products only by their name which is not always the way we want to set things.

Is it possible to have someone from the developers team to deal seriously with this so important matter?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: gkolomvos on June 08, 2012, 18:45:13 pm
...it 's OK to hide  the child products but how can you hide them from modules like "Latest" or "Best sell products"?
Hmmm....I shall have to investigate that. It will probably be another one for my bug list.

I have found a workaround to completely hide all the child products from the category and search view and also from mod_virtuemart_product (modules: latest products, featured products and Best sell products).
I opened a new topic for "How to hide child products": http://forum.virtuemart.net/index.php?topic=103702
I hope it will help 
Title: Re: What bugs do you know of in stockable variants plugin
Post by: dsrpmedia on June 12, 2012, 19:00:18 pm
I`m not sure if this is a bug, or just another bit of VM 1.1 functionality which has been removed, but it used to be that when you chose a child option in the parent page dropdown the image of the child would load, as well as it`s price, description etc.

This does not seem to be happening with the stockable variants products plugin - is it supposed to?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 12, 2012, 19:16:46 pm
No, for that functionality, you'll need the Generic Child Variants.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: dsrpmedia on June 12, 2012, 19:20:36 pm
so you have to choose between displaying your products` images / descriptions & keeping track of stock?

Man I miss vm 1.1

every time I try to work on vm 2.0 I end up almost wanting to cry.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 12, 2012, 20:36:21 pm
so you have to choose between displaying your products` images / descriptions & keeping track of stock?

The Generic Child Variant can handle stock too, but if you like the way the stockable variants plugin is meant to work, you'll hate the Generic Child Variants even more. Hopefully, the next release (or maybe the following one) will have this issue finally resolved.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: dsrpmedia on June 12, 2012, 20:42:03 pm
I really do appreciate all your assistance in this
Title: Re: What bugs do you know of in stockable variants plugin
Post by: KarlRanseier on June 13, 2012, 00:46:40 am
HI,
i get this Error in my category views and my vm frontage.

Quote
Warning: Invalid argument supplied for foreach() in /is/htdocs/zzz/www/xxx/plugins/vmcustom/stockable/stockable.php on line 213

line 213
Code: [Select]
foreach($field->child as $child_id => &$attribut) {
any hints on this?

thx karl
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 13, 2012, 10:24:24 am
Err, that's a bizarre one. Do you have a product with a stockable variant custom field but no variants configured for it?

If you're able to identify the product causing this error, could you send me a screenshot of the config for it.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: mowgs on June 13, 2012, 12:35:54 pm
No, for that functionality, you'll need the Generic Child Variants.

OpenGlobal

Is the image/description etc a complete no-go then?  The thing with generic child variants is that without hacking it to bits you can only really have one variation. 

If once the bugs etc were sorted that was something that could be worked on I'd be willing to pay for it? :)

Thanks for everything you've done so far though - it seems you've turned an unusable awkward plugin into something that does actually work!
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 13, 2012, 15:46:17 pm
Is the image/description etc a complete no-go then?

At the moment, yes. The stockable cart variants are just meant to be an extension of any normal cart variant, it just uses the child products to manage the stock.

The end goal is to get the Generic Cart Variants to the point where the stockable cart variants plugin can be dropped altogether. However, I realise that the Generic Cart Variants also needs a lot of work before this can be done (if it can be done at all).

If once the bugs etc were sorted that was something that could be worked on I'd be willing to pay for it? :)

I could certainly adapt this to a bespoke plugin if you need it. PM me.

Thanks for everything you've done so far though - it seems you've turned an unusable awkward plugin into something that does actually work!

I think it's now at a stage I could honestly start to call "beta". It's working well enough for the sites I've already created.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: mowgs on June 13, 2012, 16:18:21 pm
PM sent ;)
Title: Re: What bugs do you know of in stockable variants plugin
Post by: KarlRanseier on June 13, 2012, 18:24:27 pm
Err, that's a bizarre one. Do you have a product with a stockable variant custom field but no variants configured for it?

If you're able to identify the product causing this error, could you send me a screenshot of the config for it.

OpenGlobal

Hi thanks for your help.
Yes the error was caused by a product which had stockable variant custom field but no variants configured.
Deleting the plugin or configuring the variant solved the issue.

thanks, karl

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 13, 2012, 19:06:46 pm
WOW! What a great guess.

This could probably do with a better error/warning somewhere.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: emel on June 13, 2012, 23:32:56 pm
hi there,

i use the eshop template (gavick) in combination with VM.

custom fields are one big mess so far.

i can add a field (multiple choice options), but as soon as i add the field to a product, i CAN"T delete the field. on the front page, the following errors are visible:

Warning: Invalid argument supplied for foreach() in /home/users/galasftp/galaspemildt.nl/templates/gk_esport/html/com_virtuemart/productdetails/default.php on line 299

not all sizes are available in each color, and not all sizes are in stock. And this is really something i have to control for my client.....

this must be do-able within the custom fields, once unbugged? or is there a workaround to achieve this ?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 13, 2012, 23:40:38 pm
That doesn't look like a stockable variants bug. You should probably start a new thread for this issue.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Brigante88 on June 14, 2012, 23:55:10 pm
Hello, I'm learning to use virtuemart for building ecommerce and I must say that it is very comprehensive and fairly easy to use ... but I encountered problems with the plug-in custom fields "Stockable variants", I explain the problem

The website is about shoes and I need to put, for each size, the number of pairs available, so far no problem
(see img1)

After setting the plugin, I created child products through the plugin inside the main product
(see img2)

all okkey far ...

But when I go to make a purchase, and select the size of the shoe (see img3) in the cart, the item NAME (where the product name and the variant selected, ie the size) appears quite accurate, however, the code Article SKU is another cut :(
(see img4)


I hope you understand my problem ... know how to solve this problem?

Thank you for any solution

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 15, 2012, 09:53:16 am
Are you using the latest version of stockable.php from this thread?

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Brigante88 on June 15, 2012, 10:35:05 am
Hello, I tried to install your stockable.php (in / plugins / vmcustom / stockable) and product.php, but remains always the same problem.
The files I've got this your post:

I think I've got this sorted now. Although I may have missed somewhere.

I've attached two files, the stockable.php for the plugin and the latest version of my administrator/components/com_virtuemart/models/product.php file. This is for 2.0.6.

If there are no new problems with this, I'll merge my changes with the 2.0.7 code as well.

OpenGlobal

How can I fix?
Thanks to the support
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 15, 2012, 12:19:26 pm
Can you give me a link to the site. The config looks fine, I wonder if the javascript is doing something weird.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Brigante88 on June 15, 2012, 12:28:35 pm
Can you give me a link to the site. The config looks fine, I wonder if the javascript is doing something weird.

OpenGlobal
You have a PM with user and password.
Thank you for support :D
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 15, 2012, 13:35:08 pm
There is a line in the javascript which cannot find the required element:

Code: [Select]
formProduct = Opt.parents(".productdetails-view").find(".product");

There is no element with a class of "productdetails-view". I guess default.php has been modified too much :-)

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Brigante88 on June 15, 2012, 13:58:22 pm
Are you calling me a really big hand to solve this problem, thanks!

but the file default.php you say, where is it?
So I try to see if there is any change in the wrong code.

Thank OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 15, 2012, 14:49:15 pm
/components/com_virtuemart/views/productdetails/tmpl/default.php

But if you're changing views, you should really copy them to your template otherwise an upgrade will overwrite them:

/templates/<YourTemplate>/html/com_virtuemart/productdetails/default.php

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Brigante88 on June 15, 2012, 16:51:10 pm
I tried to replace the original file, files ii (even tweak folders) changed ... but the result is always the same: (

I replaced:
/ components / com_virtuemart / views / Productdetails / (the whole folder)
/ public_html / templates / yoo_subway / html / com_virtuemart / Productdetails (the whole folder)

Not that it's a bug in the plugin?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: jochem8 on June 15, 2012, 19:35:47 pm
Hi OpenGlobal, I really appreciate your work here! Great job. Just wondering: I have my shop almost ready and up until now it works fine. When I replace the default file with your file, will I need to re-enter any products? Sorry for being a newbie.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 15, 2012, 20:28:09 pm
I replaced:
/ components / com_virtuemart / views / Productdetails / (the whole folder)
/ public_html / templates / yoo_subway / html / com_virtuemart / Productdetails (the whole folder)

It will need to be replaced with the original VirtueMart files. The theme that you are using is broken because the div class "productdetails-view" has been removed. If you know how to, you could modify default.php yourself.

Looking at your source code, I think one of the following needs the class put back in:

Code: [Select]
<div class="yagVmFlyRight">
<div class="yagVmFlyRightInner">
<div class="yagVmFlyTitle">

If you can't do it yourself, you'll need to contact whoever created the theme and ask them to fix it.

Unfortunately, this plugin relies on javascript, and the javascript assumes that a basic set of HTML classes are assigned.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 15, 2012, 20:29:17 pm
When I replace the default file with your file, will I need to re-enter any products?

No.

I hope :-)

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: aandcmedia on June 16, 2012, 17:46:09 pm
Hey guys not to hijack but is this a common known problem:

I am getting an error with "Notify Me" and stockable variants see images below:

http://i.imgur.com/OifMJ.png

http://i.imgur.com/0BRvl.png

See how it shows notify me on the products that still have units left to sell but does not show the notify me for units that are out of stock. It's like it reversed itself.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 16, 2012, 18:07:53 pm
How strange. Is this with the latest version of the stockable.php from this thread?

If so, can you send me a link to the site and I'll check it out.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: aandcmedia on June 16, 2012, 20:02:48 pm
Info sent.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 16, 2012, 21:55:17 pm
Is this with the latest version of the stockable.php from this thread?

Can you try upgrading to the latest version of stockable.php please.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: aandcmedia on June 16, 2012, 22:35:42 pm
ahh that seemed to do the trick! Is this going to be added into the final release?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: aandcmedia on June 16, 2012, 22:47:37 pm
Actually one issue remains its new when I click on the product on the backend it is now a blank screen (using both your product.php/stockable.php)...
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 16, 2012, 23:03:58 pm
Can you send me any relevant lines from your apache error_log.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: aandcmedia on June 16, 2012, 23:12:23 pm
Getting this php error:

Notice: Undefined variable: new_fields in /var/www/vhosts/dropva.com/httpdocs/upgrade/plugins/vmcustom/stockable/stockable.php on line 168 Fatal error: Call to undefined method VirtueMartModelProduct::getProductShoppersByStatus() in /var/www/vhosts/dropva.com/httpdocs/upgrade/administrator/components/com_virtuemart/views/product/view.html.php on line 181
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 16, 2012, 23:23:38 pm
Try this version.

OpenGlobal

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: aandcmedia on June 16, 2012, 23:32:22 pm
Now getting this:
Fatal error: Call to undefined method VirtueMartModelProduct::getProductShoppersByStatus() in /var/www/vhosts/dropva.com/httpdocs/upgrade/administrator/components/com_virtuemart/views/product/view.html.php on line 181
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 16, 2012, 23:40:23 pm
Ah, I've just realised you're using 2.0.7f. The files on here are for 2.0.6. I think you should be able to put your old product.php back if you're not using the "Don't show out of stock products" config setting.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: aandcmedia on June 17, 2012, 00:54:54 am
No doesn't seem to work with the old one in it won't show the notify my correctly now. It shows notify me twice on products that should be instock and notify me once on out of stock products.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 17, 2012, 10:54:09 am
I guess this just doesn't work with 2.0.7f then. The attachments on this thread are designed for 2.0.6, so unless you need then changes from 2.0.7f, you could regress your installation to 2.0.6.

Or just wait for 2.0.8.

Of course, you'd never go live with 2.0.7f anyway :-)

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: emel on June 23, 2012, 14:04:46 pm
hi there

J2.5.5
VM 2.0.6.
tempalte: esport (gavick)

finally got the stockable variant working. Needs big caution to insert every variabel, remains buggy, but for now, it works.

But....

my setting is to display a "notify me" when the product is out of stock. This doesn't happen at all.

i need real help as my deadline approaches fast (1st of july) :( :(

regards
emel


[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 23, 2012, 14:54:27 pm
Can you send me a link to the site. The "Notify Me" message should be fixed in the latest stockable.php

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: dsrpmedia on June 23, 2012, 20:02:30 pm
hi openglobal, I have found one strange behaviour with the plugin.

it works great on parent items (i have 2 instances running 1 for canada, 1 for usa)

i have the 'quantity over' set to 1 & the fee set to 5

on parent items it works perfectly, but on generic child items (see http://vm20b.fyica.com/virtuemart/gardentools/child1-detail ) the shipping is not being added unless a parent level product is also added to the cart.

eg I can add 5 of 'child1' - no shipping is added, if I add a parent level product - eg http://vm20b.fyica.com/virtuemart/powertools/indoortools/drill-detail - then the shipping is added for the newly added product - plus the shipping for the child1 (all 5) is then added as well

Title: Re: What bugs do you know of in stockable variants plugin
Post by: emel on June 23, 2012, 20:36:55 pm
the out of stock works here, you just have to add a number to the main item (not the sub items). a bit strange because now, there is absolutely no admin warning when your main item has "0"  stock, and the sub-items/variants do have a stock... (!!)

when i have zero stock on the main item, the message is being displayed in my language, however there's a little code error here, see image.


[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: twitty1437 on June 26, 2012, 07:08:52 am
Hi OpenGlobal, I'm using Joomla! 2.5.6 and VM2.0.6 on Xampp on Ubuntu.
I have replaced my files with the latest product.php and stockable.php you have provided.
some problems i observe:

Question: the parent stock quantity doesn't matter any more since it won't be purchased, only the child products will be purchased. Am i right to say this?

Thanks for helping to make VM better.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 26, 2012, 15:44:18 pm
In the child product, when i set the min and max product quantity, they won't work in the front end

Ooh, I haven't even tested that. I shall investigate this.

When i add the same product to the cart at 2 different times, the same product appears as 2 separate items in the cart. And even though the total quantity is more than the available stock, I still can checkout

There's nothing that can be done about the product appearing twice, this is down to core functionality and is basically because the core doesn't know how to behave with the plugins. The plugin might treat them as separate product, it might not, so it has to treat them as separate products.
I'll look into whether the plugin can sum the products already added to the cart so that the total quantity can't go over the stock level.

Question: the parent stock quantity doesn't matter any more since it won't be purchased, only the child products will be purchased. Am i right to say this?

Yes that's right. you can't buy the parent product so the stock level for this should be zero.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: dsrpmedia on June 26, 2012, 18:28:12 pm
Quote
Yes that's right. you can't buy the parent product so the stock level for this should be zero.

this is something I`ve been fighting with - if you can `t purchase the parent, surely there must be some way of not showing the parent price if it has children?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 26, 2012, 18:56:16 pm
The displayed price is the parent price plus any "additional charge" from the plugin. The children aren't used. They're just placeholders for the stock control.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: dsrpmedia on June 26, 2012, 19:09:46 pm
right
sorry I still get this confused - it is actually the generic child variant which allows to set a specific price independant of the parent.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: twitty1437 on June 27, 2012, 05:39:58 am
right
sorry I still get this confused - it is actually the generic child variant which allows to set a specific price independant of the parent.
The parent price is the "generic" price, say $10, the child products, let's say are different sizes, M size + $2, so total price is $10+$2=$12
Title: Re: What bugs do you know of in stockable variants plugin
Post by: twitty1437 on June 27, 2012, 05:43:47 am
Hi OpenGlobal,
One more to the list:
the product availability of the child products are not showing up when the child product is selected from the drop down list.
I think it currently only shows the parent's product availability.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 27, 2012, 09:55:52 am
That has been fixed. Have you added the new product.php from this thread too?

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: twitty1437 on June 27, 2012, 16:21:14 pm
Hi OpenGlobal,
I have tried the product.php in reply #62, #64 and #67, the product availability is not showing when all these 3 files are used separately.
product availability (not number of available stock) means the 3d.gif, 3-5d.gif etc, because each child will have a different availability.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 27, 2012, 23:28:40 pm
Oh I see. Product availability has always been broken (for everything, not just stockable cart variants). But I have fixed it in the core for the next release.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on June 30, 2012, 23:21:37 pm
Version 2.0.8 has now been released which means that the stockable cart variant is now at least usable.

Please be aware that the configuration for stock control now has an extra option. The option entitled "Do not Display Product, if child products also out of stock" behaves the way that 99% of people (and every other e-commerce system that I'm aware of) would expect "Do not Display Product" to behave.

If you want the the display of products to be dependent on the child products rather than the redundant parent product, use this new option instead.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Florentp on July 05, 2012, 15:01:58 pm
Version 2.0.8 has now been released which means that the stockable cart variant is now at least usable.

Hi! What do you mean? Is there another way to do exactly the same thing than with the variants plugin?

By the way, about this plugin, I have a BUG issue. I posted on the dev section :
http://forum.virtuemart.net/index.php?topic=104857.msg348967#msg348967

When i put a child product into the shopping cart, the SKU is not the good one.
Met this problem on my test website, but also on a fresh install.

Don't get it.

Thanks !

Florent
Title: Re: What bugs do you know of in stockable variants plugin
Post by: KarlRanseier on July 06, 2012, 13:13:48 pm

KarlRanseier,

I can replicate the translation bug. That's another one for the list.

Also, are you still seeing the problem where the initial/default child product price isn't being shown? I just can't replicate it any more. Do you have a link to somewhere that it's happening consistently?

The translation bug comes from the plugin or from a different place?

the problem with the initial/default child product price appears sometimes when you reload the page. When you visit the page through a normal link, the price is shown correctly.
Use the link i pm'd you, switch color by dropdown to the second one and change the size and then reload the page.

Karl

Hi, are there any updates for the translation bug?

Karl
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on July 06, 2012, 13:15:34 pm
This has now (hopefully) been fixed in 2.0.8.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: knirving on July 09, 2012, 17:52:56 pm
After one click upgrading from 2.0.6 to 2.0.8c I started to receive the error:

Fatal error: Cannot use string offset as an array in /public_html/plugins/vmcustom/stockable/stockable.php on line 436

The error occurs at the last order confirmation. As the child products worked before the update and after reverting to 2.0.6. There is either a bug in 2.0.8c or there is a bug in the update process.

Reverting back to 2.0.6 the problem went away.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on July 09, 2012, 19:12:21 pm
That looks like an error we saw during testing. It looks like the VM core has been updated but not the plugins. If both the plugins and core are updated, that error should not appear.

Unless it's a completely different error.

Did you update the AIO bit as well as the core? You could try deleting stockable.php and then re-updating to make sure that the latest stockable.php gets installed.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: emel on July 14, 2012, 20:27:50 pm
Would like to know where to find the latest stockable variant plugin. reading this topic, i lost counts in the many updates, bug-free, etc, etc.

so please... a link to the version that works fine in combination with the latest 2.08c...

THANX!!
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on July 14, 2012, 22:23:55 pm
The latest version is the one in 2.0.8c

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: KarlRanseier on July 15, 2012, 19:14:09 pm
HI,
i have some problems with the availability images.
Do i have to define the image for each stackable variant now?

What happens if the product is out of stock? I think then it schould show the image/text which is defined in "configuration/shopfront", but it doesn't.
Can you please give me some hints how to handle this availability images.

Also i changed some lines in the stackable.php
line 372-376
Code: [Select]
$(".availability img").remove();

if ("risetime" == stockhandle && stockable[found_id].product_availability) {
  $(".availability").append(stockable[found_id].product_availability);
}

thanks
karl
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on July 15, 2012, 21:25:14 pm
Do i have to define the image for each stackable variant now?

What happens if the product is out of stock? I think then it schould show the image/text which is defined in "configuration/shopfront", but it doesn't.

If you have defined the config to show the availability for out of stock items then it should show the variant's availability. If it doesn't have one, it should show the global availability field.

Also i changed some lines in the stackable.php
line 372-376
Code: [Select]
$(".availability img").remove();

if ("risetime" == stockhandle && stockable[found_id].product_availability) {
  $(".availability").append(stockable[found_id].product_availability);
}

Why? What purpose does this serve?

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: KarlRanseier on July 15, 2012, 22:08:04 pm
Do i have to define the image for each stackable variant now?

What happens if the product is out of stock? I think then it schould show the image/text which is defined in "configuration/shopfront", but it doesn't.

If you have defined the config to show the availability for out of stock items then it should show the variant's availability. If it doesn't have one, it should show the global availability field.

hm sorry i don't get it. I have 3 options to define the availability.
The global one in Configuration/Shopfront
The one in the main product
The one in the variants

The variants have all the same availability (2-3 days), so i can define it just in the main product. am i right?
And if one variant is sold out it should show the image (3-4 weeks) i defined in the global config in Configuration/Shopfront?


Also i changed some lines in the stackable.php
line 372-376
Code: [Select]
$(".availability img").remove();

if ("risetime" == stockhandle && stockable[found_id].product_availability) {
  $(".availability").append(stockable[found_id].product_availability);
}

Why? What purpose does this serve?
I did this because i have more information such as a multilanguage description inside this .availability div.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on July 16, 2012, 00:17:39 am
The global one in Configuration/Shopfront
The one in the main product
The one in the variants

The variants have all the same availability (2-3 days), so i can define it just in the main product. am i right?

You can, but it will never be seen.

And if one variant is sold out it should show the image (3-4 weeks) i defined in the global config in Configuration/Shopfront?

Yes, unless there is an override for that specific variant.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: vanekmichal on July 16, 2012, 14:28:22 pm
Hi,

I tested a new version of VirtueMart 2.0.8.

The Firefox browser is damaged and incomplete lists.
In Chrome the same data are correct.
I attach images with this problem.

Tested on Window 7, 13.0.1 Firefox, Chrome 20.0.1132.57 m

thanks Michal


[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: KarlRanseier on July 16, 2012, 15:14:55 pm
Maybe i am totally wrong but isn't this availability image representing the shipping time?
I mean if my variant is in stock then the availability is 2-3 days, but if it is out of stock it is 3-4 weeks.
Can i do it like this?

The global one in Configuration/Shopfront
The one in the main product
The one in the variants

The variants have all the same availability (2-3 days), so i can define it just in the main product. am i right?

You can, but it will never be seen.
Ok then it makes no sense to define it in the main product. I thought so because originally all informations from main product were inherited by the variants.



And if one variant is sold out it should show the image (3-4 weeks) i defined in the global config in Configuration/Shopfront?

Yes, unless there is an override for that specific variant.

OpenGlobal
when i define an image in the variant, is this then an override of the global config  out-of-stock-image?

hm i still don't understand the behavior of this availability images.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: emel on July 16, 2012, 16:41:23 pm
have been building for 2 days straight, site is back on track, all looks good, EXCEPT the stockable variants :( :(
(since i had huge problems with displaying fields at within the cart, all that was left is to start all over again.)

joomla 2.5.6 dutch
template: esport gavick
virtue: 2.08c

I have my list with variables to add within the stockable lis, as soon as i click save, the lists are empty(!).

i really need help here....
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on July 16, 2012, 18:57:20 pm
The Firefox browser is damaged and incomplete lists.
In Chrome the same data are correct.

Can you send me a link to this page.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on July 16, 2012, 18:59:36 pm
Maybe i am totally wrong but isn't this availability image representing the shipping time?
I mean if my variant is in stock then the availability is 2-3 days, but if it is out of stock it is 3-4 weeks.
Can i do it like this?

The availability is an "out of stock" option.

when i define an image in the variant, is this then an override of the global config  out-of-stock-image?

That's correct.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Florentp on July 26, 2012, 12:27:22 pm
VM : 2.0.8e / AIO : 2.0.8e

I get a script error, breaking all my jquery scripts.
FireBug says :
Quote
child_attrib["selectoptions" + i] is undefined
on this line :
Code: [Select]
if (child_attrib["selectoptions"+i][0] != selections[i]) {

And php say me :
Quote
Warning: Invalid argument supplied for foreach() in /home/indienbo/www/plugins/vmcustom/stockable/stockable.php on line 227

Notice: Undefined variable: child_id in /home/indienbo/www/plugins/vmcustom/stockable/stockable.php on line 296

that appear only on page who return products with more than 1 child. If there is more than one child, i get this error.
Here is the line "var part" for variants of that same page :
Code: [Select]
var customfield_id = {};
var stockable =$.parseJSON('{"681":{"selectoptions1":["S","S"],"in_stock":0},"682":{"selectoptions1":["M","M"],"in_stock":0},"683":{"selectoptions1":["L","L"],"in_stock":0}}') ;
var stockhandle = "none";
var selecteds = [];//all selected options
var selections = [];
var found_id=0;//found child id
var original=[];

And same part on a page where everything works fine :
Code: [Select]
var customfield_id = {};
var stockable =$.parseJSON('{"15119":{"selectoptions1":["L","L"],"in_stock":1},"15120":{"selectoptions1":["M","M"],"in_stock":0},"15121":{"selectoptions1":["S","S"],"in_stock":0}}') ;
var stockhandle = "none";
var selecteds = [];//all selected options
var selections = [];
var found_id=0;//found child id
var original=[];

What's that doctor :) ?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on July 26, 2012, 18:42:44 pm
Can you post (or message me) a link to the page with the error.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Florentp on July 26, 2012, 18:53:44 pm
Hey,
Finally, i just can't understand why sometimes it works, and sometimes not...


Well, check this out :

This link don't work : http://vps10885.ovh.net/~indienbo/fr/cf_no_vmcat/og-abel.html
But this one is ok : http://vps10885.ovh.net/~indienbo/fr/cf_no_vmcat/aborted.html

To get login (http protect) :
login : dev
password : wearedev

Thank you so mutch Dr. OpenGlobal :)
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on July 27, 2012, 08:46:42 am
I am seeing many problems with the products on both links when they call the AJAX:

Code: [Select]
<br />
<b>Notice</b>:  Undefined offset: 0 in <b>/home/indienbo/www/components/com_virtuemart/controllers/productdetails.php</b> on line <b>254</b><br />
<br />
<b>Notice</b>:  Trying to get property of non-object in <b>/home/indienbo/www/administrator/components/com_virtuemart/models/product.php</b> on line <b>1553</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/indienbo/www/components/com_virtuemart/controllers/productdetails.php</b> on line <b>288</b><br />
[]

I think you have some big problems with your installation here. Have you modified the VM code at all?

But I'm not seeing the JS error that you mentioned.

However, your custom template is invalid so the stockable variant will not work. Just like almost every custom VM template that I've seen, it does not contain the required HTML classes. Class "productdetails-view" is missing.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Florentp on July 27, 2012, 14:25:50 pm
Quote
However, your custom template is invalid so the stockable variant will not work. Just like almost every custom VM template that I've seen, it does not contain the required HTML classes. Class "productdetails-view" is missing.
This problem is now solved. The company who sold me the template told me how to fix that.

About the error, i thaught it was just some not important errors.
I must compare my productsdetails.php and product.php  to the last release.
I don't made any core modification, but i'm using my own product integrator.
(I created a tool to import product to Virtuemart easilly, with stockable variants)
I found a product displaying same error on his detail page. So this item is a problem. I'll check the database to see if there is any error in the products table.


Thanks for your help and your time, OpenGloab.
It's really appreciated.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Florentp on July 27, 2012, 18:34:33 pm
About that :
Code: [Select]
<b>Notice</b>:  Undefined offset: 0 in <b>/home/indienbo/www/components/com_virtuemart/controllers/productdetails.php</b> on line <b>254</b><br />
<br />
<b>Notice</b>:  Trying to get property of non-object in <b>/home/indienbo/www/administrator/components/com_virtuemart/models/product.php</b> on line <b>1553</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/indienbo/www/components/com_virtuemart/controllers/productdetails.php</b> on line <b>288</b><br />

Problem is solved. My fault. There were, for some parents item, a duplicate entry in j17_virtuemart_product_customfields with parameter :
Code: [Select]
{"child":{}}Definitly a bug of my own product creation tool.

So anyway, the real problem is still there.
Jquery is broken on some page, and Firebug say me :

Quote
child_attrib["selectoptions" + i] is undefined :
if (child_attrib["selectoptions"+i][0] != selections) {
(on : http://vps10885.ovh.net/~indienbo/index.php?virtuemart_manufacturer_id[0]=4&option=com_customfilters&view=products&Itemid=890 )


But here, everything is fine :
http://vps10885.ovh.net/~indienbo/index.php?virtuemart_manufacturer_id[0]=3&option=com_customfilters&view=products&Itemid=889

And i really don't understand where it come from. Weird. Why on some categories, and not on one other :/
Title: What bugs do you know of in stockable variants plugin
Post by: atrus on July 28, 2012, 22:23:56 pm
Hi to all, in VM 2.0.8e noticed the following bug:

The message "Price: No additional charge" for Stockable variants always appears even if there is additional charge set for all children products. It just doesn't go away!

Would appreciate any comments,

Rgrds,
Chris

Sent from my BlackBerry 9700 using Tapatalk
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on July 29, 2012, 23:04:57 pm

Jquery is broken on some page, and Firebug say me :

Quote
child_attrib["selectoptions" + i] is undefined :
if (child_attrib["selectoptions"+i][0] != selections) {
(on : http://vps10885.ovh.net/~indienbo/index.php?virtuemart_manufacturer_id[0]=4&option=com_customfilters&view=products&Itemid=890 )


But here, everything is fine :
http://vps10885.ovh.net/~indienbo/index.php?virtuemart_manufacturer_id[0]=3&option=com_customfilters&view=products&Itemid=889


On first inspection, this looks like one of the developers has been messing around with the way the plugins work in VM again. I've been unable to do much development since the first 2.0.8 release so I haven't been checking if they're breaking things again :-)

I'll see if I can replicate this problem on a vanilla installation and if I'm right, I'll try to come up with a fix.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on July 29, 2012, 23:07:51 pm
The message "Price: No additional charge" for Stockable variants always appears even if there is additional charge set for all children products. It just doesn't go away!

This one is on my bug list. I've seen it on various customfields and on several different versions of VM2.0.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: rolandlaich on July 30, 2012, 20:59:25 pm
Quote
child_attrib["selectoptions" + i] is undefined :
if (child_attrib["selectoptions"+i][0] != selections) {

Hi OpenGlobal & FederA,

I've just made a plain fresh installation using joomla 2.5.6 and vm 2.0.8e.
Then created a size and color custom field as stockable variant plugin, created a parent test product, applied the custom field to it. Then I created several child products and assigned the variants to them. I gave parent and childs a stock level, applied min and max order amout.
The result is exactly the same JS error as FederA described before. As a result of the error the second variant dropdown displays nothing at all, no matter what item is selected at the first variant dropdown.
When I nevertheless add the product to the cart it is added but in an unsensful combination of variants.

Funny - with vm  2.0.7d this worked fine...
Also funny: The automatic childproduct name alias setting worked 50% correct in  2.0.7d: After renaming a childproduct in the parent's list view the initially assigned alias was changed when saving. This useful function is totally broken in 2.0.8e.

A fix willl really appreciated for this installation is going to be a production site quite soon.
Thanks in advance!
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 05, 2012, 13:27:35 pm
FederA,

The error you are seeing in firebug is because there is a hidden module (at least, I think it's a module) (you can find it with a div with id=FWListBrowseV1) which is listing products with an add to cart button and the stockable variant drop downs for those products.

Unfortunately, the javascript used in the stockable variant plugin can only handle one product on a page. On the broken page, there is more than one product in the hidden module, but on the working page, there is only one product.

I will need to work out a way to make the javascript work with multiple categories per page, but for now, these modules must be switche doff to prevent the error. This means that products can only be added to the cart from their own product details page.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 06, 2012, 22:18:59 pm
FederA,

Please try the attached stockable.php. This is still beta so I'd appreciate your testing and feedback. I hope it should fix the problems you are seeing.

OpenGlobal

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Florentp on August 07, 2012, 11:07:12 am
FederA,

Please try the attached stockable.php. This is still beta so I'd appreciate your testing and feedback. I hope it should fix the problems you are seeing.

OpenGlobal

Hi OpenGlobal. Thanks for this new release.
I did some tests.
Everything seems to works better :
- No more Jquery error, the lightbox (used as quick order function) is ok,
- products get added to the cart with good SKU, and the good child.

I just have one error. When i switch to the second display of my category (FWListBrowseV1, with the stockable variant listing for every products) each time i add a product to my cart, the product is added two times.
2 times with "1" as quantity.

But when I'm adding the product from the product detail page, the product is added only one time.

That's all :)

Quote
Unfortunately, the javascript used in the stockable variant plugin can only handle one product on a page.
Just to notice you that in the past, this were working verry well. 


Thanks OpenGlobal !
Florent
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 07, 2012, 18:21:51 pm
I just have one error. When i switch to the second display of my category (FWListBrowseV1, with the stockable variant listing for every products) each time i add a product to my cart, the product is added two times.
2 times with "1" as quantity.

Strange. I'll see if I can replicate that and fix it.

Just to notice you that in the past, this were working verry well. 

In the past, the customfields did not display for the module positions so they were never on the page more than once.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 07, 2012, 23:57:51 pm
FederA,

I cannot recreate your problem. Can you see if you see the problem when using the standard template/theme. I notice that the checkout has an error:

Notice: Undefined variable: url in /home/indienbo/www/templates/ja_ironis/html/com_virtuemart/cart/default.php on line 66

This may indicate a deeper problem with the template.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 08, 2012, 13:42:31 pm
I have discovered what is causing the "No additional charge" string to appear.

When you edit the customfields on a product, there is a custom_price field underneath the config which by default is set to 0. If you leave this as zero, the message "No additional price" will appear on the product details page. If you delete the 0 and leave it blank, this message will no longer appear on the product details screen.

The next release of this plugin will have a fix which automatically deletes the 0 when editing the product.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Florentp on August 08, 2012, 16:20:54 pm
FederA,

I cannot recreate your problem. Can you see if you see the problem when using the standard template/theme. I notice that the checkout has an error:

Notice: Undefined variable: url in /home/indienbo/www/templates/ja_ironis/html/com_virtuemart/cart/default.php on line 66

This may indicate a deeper problem with the template.

OpenGlobal


Hey OpenGlobal,
Yes, I definitly think this issue is caused by the template. I think that the creator of the template created his own "add product to cart" query,
and now that your get fixed, there is two request. Something like that. I'll see directly with the author to fix that.

Thanks a lot Mr OpenGlobal :)


Edit:
Finally was my fault. Again because of empty entries in customfields table like "{"child":{}}".
Title: Re: What bugs do you know of in stockable variants plugin
Post by: darhvader666uk on August 11, 2012, 11:12:16 am
Hi All,

I am new to the forum and was wondering if anyone could help?

Im kinda of pulling my hair out about this one and im already going bald.

This is the first time I have used Joomla / Virtumart however I have been a PHP developer for about 5 years so I know my way around the code.

What I am trying to achieve is using the VM - Custom, stockable variants plugin so that I can add a t-shirt to the store but to have stock controlled options for the different sizes.

So, first thing I do is go into Custom Fields within the products menu on the left hand side of Virtumart.  Here I make a new Field where I am then present with options.  After looking at tutorials, I have found that you then need to select Plugins within the Custom Field type.  I then make sure its published and also part of the cart attribute and fill out the rest.  Then you have another drop down box called "Select Plug-in".  This is where I select VM - Custom, stockable variants and options appear below.

I enter in the first option "Size" and then the box blow a S, M, and L all in a new line with no commas etc.

As soon as I then press save, all the information disappears. 

(http://img13.imageshack.us/img13/7648/image1id.png)

However, If I look in the db under ab3o9_virtuemart_customs, I can see there is an entry for it.  THis is the confusing part as im sure this should be displaying, right?

I carry on to make a product, fill in the relevant info and then go to the cutom fields tag to which I select the custom field I made with VM - Custom, stockable variants.  However, when I select the plugin, there is no dropdown box for the sizes I alread specified (and what tutorials seem to suggest).

(http://img191.imageshack.us/img191/4764/image2tz.png)

This is causing me great headaches as when I run email diagnostic throughout the stockable.php file, it seems to gather the correct information and because of this, nothing is showing on the front end (except the name of the plugin).

(http://img18.imageshack.us/img18/5287/62650218.png)

If anyone can hbelp or point me in the right direct, that would be perfect as this is giving me nightmares!

If it helps. im using VM2.0.6.

THanks in advance,

Stu
Title: Re: What bugs do you know of in stockable variants plugin
Post by: gcoulter on August 13, 2012, 18:14:09 pm
Hi

Been pulling my hair out with this plug in and trying to set up stockable variants.
I had reverted to ignoring it and using the generic child plugin instead. On the plus side this works with stock control but has a bug in that if you try and select the first "child" product/size then the parent is placed in the cart.

However I've just downloaded OpenGloabals new stockable.php file and YES!!!!. It will now check the stock of the child not the parent.
Just one small issue in that if you go back and add in the same item again it adds it into the cart as a new item, it doesn't update the item that is already there.
This means if I have only 1 in stock I can still add it to the cart twice.
This doesn't happen if you use the generic child plugin.

For anyone using this plugin it has been mentioned a few times already in this and other threads how many stages you have to go through.
I got round this by using a spreadsheet with all my parent & child products in it and creating a sql insert query.
If I get some time I'll post it here with some instructions.

Graham
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 19, 2012, 22:48:17 pm
As soon as I then press save, all the information disappears. 

That's not right at all. I've not been able to reproduce that problem either. Maybe it is a corrupt installation, or possibly a strange server setting on your host. I'd recommend upgrading to the latest version of VM or trying a fresh install (maybe on a different server).

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 19, 2012, 22:50:06 pm
Just one small issue in that if you go back and add in the same item again it adds it into the cart as a new item, it doesn't update the item that is already there.
This means if I have only 1 in stock I can still add it to the cart twice.

This is unfortunately a problem with the way the custom plugin system works (and it has to work that way). I'm trying to work out a way around it for a future release.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Florentp on August 21, 2012, 10:47:19 am
Hi OpenGlobal !
Just to let you know that my website is online : http://www.indienboutique.fr !

I have a strange issue : I can put a product in my cart more than i have in stock, and buy it :/
Do you think that's a template issue again? Thanks !


One other question : I have a total of 29.000 products in stock (including variants).
All my products are linked with stockable variants plugin. (Customfields table contain 7 391 row)
BUt my server is overcharge.. the website is like a monster for him.
Do you think that stockable variants plugin could be the reason ?

(I had to change for a better server, with like 16Ghz.. .But still overcharged at some point :/
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 21, 2012, 13:43:02 pm
I have a strange issue : I can put a product in my cart more than i have in stock, and buy it :/
Do you think that's a template issue again? Thanks !

That depends, what is you "Action when a Product is Out of Stock" setting?

One other question : I have a total of 29.000 products in stock (including variants).
All my products are linked with stockable variants plugin. (Customfields table contain 7 391 row)
BUt my server is overcharge.. the website is like a monster for him.
Do you think that stockable variants plugin could be the reason ?

(I had to change for a better server, with like 16Ghz.. .But still overcharged at some point :/

The plugin itself shouldn't be affecting performance, but the number of products and variants might be. I don't know what the performance statistics are for VM2.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Florentp on August 21, 2012, 15:43:19 pm
That depends, what is you "Action when a Product is Out of Stock" setting?
-> Do not Display Product.

But when a product is already sold-out, no problem.
My problem appear only when i have some stock : I can order more than i have :/
Title: Re: What bugs do you know of in stockable variants plugin
Post by: gcoulter on August 21, 2012, 18:24:35 pm
Did you download Openglobal's version of the stockable.php file?
There's a bug in the standard plugin which ignores the stock level of the variant size/colour.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Florentp on August 21, 2012, 21:37:52 pm
FederA,

Please try the attached stockable.php. This is still beta so I'd appreciate your testing and feedback. I hope it should fix the problems you are seeing.

OpenGlobal

Using this one. Is that good ?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: bmfc on August 23, 2012, 14:54:16 pm

When we order a stockable item product we have the following error:
Fatal error: Cannot use string offset as an array in /plugins/vmcustom/stockable/stockable.php on line 438

Panos.

Is there any solution to this problem?
thanks.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 23, 2012, 15:15:12 pm
That depends, what is you "Action when a Product is Out of Stock" setting?
-> Do not Display Product.

But when a product is already sold-out, no problem.
My problem appear only when i have some stock : I can order more than i have :/

OK, that's another one for the list. I'm sure that was working last time I checked.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 23, 2012, 15:18:43 pm

When we order a stockable item product we have the following error:
Fatal error: Cannot use string offset as an array in /plugins/vmcustom/stockable/stockable.php on line 438

Panos.

Is there any solution to this problem?
thanks.

The first solution would be to upgrade to the latest version. Line 438 is midway through a string.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: bmfc on August 23, 2012, 17:15:56 pm
i have the 2.0.8e version.
joomla 2.5.6

i still have the problem.

i appreciate the help.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Florentp on August 23, 2012, 17:50:19 pm
That depends, what is you "Action when a Product is Out of Stock" setting?
-> Do not Display Product.

But when a product is already sold-out, no problem.
My problem appear only when i have some stock : I can order more than i have :/

OK, that's another one for the list. I'm sure that was working last time I checked.

OpenGlobal

Sweet ! Thanks.

2 more questions :
When i go the product detail page, the plugin show me all the childs even if their stock is 0.
Is there a way to hide the not available childs on the stockable variant plugin display ?
Example : http://www.indienboutique.fr/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=846&virtuemart_category_id=50&Itemid=814
The size "L" is displayed, but out of stock.  Nice thing to turn customers crazy :D

Second question :
Is there an easy way to remove the stockable variant plugin from "Custom Fields" tab, in the product edit page?
Because I'm using my own product creator for Vm, and when i use VM to edit a product, the plugin break my products because i'm using custom parameters in virtuemart_product_customfields that i haven't creat into virtuemart_customs->custom_params

Thanks :D
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 23, 2012, 17:55:57 pm
i have the 2.0.8e version.
joomla 2.5.6

i still have the problem.

i appreciate the help.

What happens with version 2.0.10?

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 23, 2012, 18:02:08 pm
Is there a way to hide the not available childs on the stockable variant plugin display ?

In the VM configuration under shopfront, there is now an extra stock control option "Do not Display Product, if child products also out of stock" which I think should do what you want.


Is there an easy way to remove the stockable variant plugin from "Custom Fields" tab, in the product edit page?

You can remove it by clicking the red cross icon on the right hand side of the plugin.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: bmfc on August 23, 2012, 18:17:15 pm

What happens with version 2.0.10?

OpenGlobal

i upgrade to version 2.0.10 and it worked fine now. thank you.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Florentp on August 23, 2012, 18:59:08 pm
Quote
You can remove it by clicking the red cross icon on the right hand side of the plugin.

I did a try. It removed the plugin on the frontoffice !
I just want to unactive the plugin in product edit (backoffice), but keep it active for product display on frontoffice
In my case, Stockable variants are actually created directly on the database, and not from virtuemart.
If that's possible. (removing/editing a file ?) Don't spend time on this, just give me a answer if you already now how to unactive the backoffice display.
This is really not critic ;)

Quote
In the VM configuration under shopfront, there is now an extra stock control option "Do not Display Product, if child products also out of stock" which I think should do what you want.
Thanks ! Yes, it hide out of stock child in product detail page.
But the problem is that now, on product categories (front office) i can see all the out of stock products ! I took a look on this products : Parent and childs have stock 0.
Not normal. template mistake ?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 24, 2012, 12:42:41 pm
I just want to unactive the plugin in product edit (backoffice), but keep it active for product display on frontoffice

Oh right. No I don't think that's possible.

Thanks ! Yes, it hide out of stock child in product detail page.
But the problem is that now, on product categories (front office) i can see all the out of stock products ! I took a look on this products : Parent and childs have stock 0.
Not normal. template mistake ?

Err, no. That's not right at all. It shouldn't be a template problem because the template shouldn't be receiving any out of stock products. Are you using 2.0.10? It might be that a bug got into 2.0.10 because I haven't tested this recently.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Florentp on August 24, 2012, 13:48:27 pm
Quote
Err, no. That's not right at all. It shouldn't be a template problem because the template shouldn't be receiving any out of stock products. Are you using 2.0.10? It might be that a bug got into 2.0.10 because I haven't tested this recently.
No no, still on VM 2.0.8e.
So, that's a template issue... Thanks !


Florent
Title: Re: What bugs do you know of in stockable variants plugin
Post by: sukhrob on August 24, 2012, 14:50:30 pm
Hello,

I'm using version VM 2.0.10 - and seem to come across a bug with Stockable Variant.

The plugin is working fine if I use 2 Options (ex. Size & Color)

However, as soon as I add 3rd option (ex. Shape) The plug in stops working. Non of the options apply changes, and 3rd Option displays Blank Values.


[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 24, 2012, 15:13:32 pm
Does it work when you use the default theme/template? It looks like a javascript issue in the template to me.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: sukhrob on August 24, 2012, 15:40:52 pm
Yea seems that as soon as 3rd Option is entered, the Theme breaks as well in some part of the screen.
:(
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 24, 2012, 16:16:31 pm
Can you PM me a link and I'll check it out.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 24, 2012, 17:50:50 pm
Possible bug fix for sukhrob.

OpenGlobal

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: sukhrob on August 24, 2012, 21:27:57 pm
Possible bug fix for sukhrob.

OpenGlobal

WORKED LIKE A CHARM!
You're a genius!

Thank you so much.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: sukhrob on August 27, 2012, 13:18:21 pm
Not sure what this means, but was told by my theme provider:

Quote
There is a Virtuemart bug with the stockable variants (Fehler: TypeError: stockable_77[found_id] is undefined) which has to be fixed by the VM team first.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 27, 2012, 15:34:16 pm
What is this in relation to? Are you seeing another bug?

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: sukhrob on August 27, 2012, 15:40:51 pm
What is this in relation to? Are you seeing another bug?

OpenGlobal

Im having a bug, when I add custom stockable variants to product, in the main paige view and category view "add to cart" feature disappears. On product page it works fine.
So i reported it, to theme provider, and received that answer.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 27, 2012, 15:58:24 pm
Could you PM me some specific links.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: renatomiranda on August 27, 2012, 18:33:56 pm
One mistake that I noticed:

When the child product is added to the cart does not go out of stock and can be added several times until the sale is FINALIZED
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 27, 2012, 18:44:47 pm
Isn't that the same with normal products too?

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: sukhrob on August 27, 2012, 19:11:16 pm
Could you PM me some specific links.

OpenGlobal

PM sent!
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Florentp on September 10, 2012, 11:52:27 am
Hello OpenGlobal!
Any news about this issue?
Thanks!
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on September 10, 2012, 12:41:00 pm
Which issue?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Florentp on September 10, 2012, 17:11:03 pm
One mistake that I noticed:

When the child product is added to the cart does not go out of stock and can be added several times until the sale is FINALIZED

This one :)
I have the same problem on my website.

Thanks
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on September 10, 2012, 17:18:27 pm
Isn't this how VirtueMart works? Stock isn't allocated until it is paid for.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Florentp on September 10, 2012, 19:18:33 pm
Yes :D Sorry i was not really clear on this.

If the child stock is "1", i can add more than one to my basket, you see ?
See there : http://www.indienboutique.fr/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=54930&virtuemart_category_id=153&Itemid=1028 (http://www.indienboutique.fr/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=54930&virtuemart_category_id=153&Itemid=1028)
Actually, the stock for size "43" is 1.


Today someone bought me a product 3 times (added 3 times to the basket) and finally paid for 3 products. But i have only one.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: sucuisine on September 16, 2012, 23:21:13 pm
During checkout the shipment cost have to be  calculated based on the weight of the product. I have several variants of the same products each with an other weight. So I have to define the several child products with several weights

Within vm there are 2 solutions for this using custom fields:
Use a custom field type generic cart variants or use the custom field type plugin.

Using generic cart variant
The child products are being shown in the dropdown box on the detail product page. When a variant is chosen the product is being retrieved, this take approx 5 sec ( too long), and the name of the parent is changed
The calculating of the shipment cost is correct in the cart

There is a workaround (not nice) for the parent name: use the same name for the childs as the parent but use a different sku name. But there is no workaround for the delay in retrieving the product.


Using plugin stockable variants
The child products are being shown in the dropdown box. Changing to the other product variant is easy and fast. But the shipment calculation is based on the weight of the parent even the child is placed in the cart.

Is there a way to configure this that the weight of the child will be used in stead of the weigth of the parent?
Is there an other solution for ship cost based on weight?

Who can help??
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on September 17, 2012, 15:27:05 pm
I will look into this.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: reggiesingh on September 18, 2012, 06:45:42 am
During checkout the shipment cost have to be  calculated based on the weight of the product. I have several variants of the same products each with an other weight. So I have to define the several child products with several weights

Within vm there are 2 solutions for this using custom fields:
Use a custom field type generic cart variants or use the custom field type plugin.

Using generic cart variant
The child products are being shown in the dropdown box on the detail product page. When a variant is chosen the product is being retrieved, this take approx 5 sec ( too long), and the name of the parent is changed
The calculating of the shipment cost is correct in the cart

There is a workaround (not nice) for the parent name: use the same name for the childs as the parent but use a different sku name. But there is no workaround for the delay in retrieving the product.


Using plugin stockable variants
The child products are being shown in the dropdown box. Changing to the other product variant is easy and fast. But the shipment calculation is based on the weight of the parent even the child is placed in the cart.

Is there a way to configure this that the weight of the child will be used in stead of the weigth of the parent?
Is there an other solution for ship cost based on weight?

Who can help??

Having the same problem here. It's pretty frustrating as the 'generic child variant'  behaves unexpectedly from time to time e.g. sometimes all child options disappear when a certain child product is selected....plus the entire page changes when a child product is selected.

The 'child variant plugin' seems to be the cleanest way to go if you want the parent displayed at all times. If only it can be modified to recognize the weight values of the selected child product instead of the parent.

Disabling shipping by weight until this can be resolved

Site: www.richardhume.com
Title: Re: What bugs do you know of in stockable variants plugin
Post by: sucuisine on September 18, 2012, 13:31:34 pm
Hi reggiesingh

Generic child variant is OK except that  the  child product is being retrieved when selecting a variant. This take some seconds and the parents name is then changed.
Calculation of the shipment cost is also OK

But at plugin selection of a variants is Ok ( no product retrievement) but the shipment collection is not ok.

See the test products on www.sucuisine.com bami nasi category

Developer Sucuisine
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Rocked on September 18, 2012, 21:39:43 pm
Here's how to get weight & dimensions for stockable variants passed into the cart! :)

Open plugins/vmcustom/stockable/stockable.php

REPLACE THIS CODE:

Code: [Select]
public function plgVmOnAddToCart(&$product){
$customPlugin = JRequest::getVar('customPlugin',0);

if ($customPlugin) {
$db = JFactory::getDBO();
$query = 'SELECT  C.* , field.*
FROM `#__virtuemart_customs` AS C
LEFT JOIN `#__virtuemart_product_customfields` AS field ON C.`virtuemart_custom_id` = field.`virtuemart_custom_id`
WHERE `virtuemart_product_id` =' . $product->virtuemart_product_id.' and `custom_element`="'.$this->_name.'"';
$query .=' and is_cart_attribute = 1';
$db->setQuery($query);
$productCustomsPrice = $db->loadObject();
if (!$productCustomsPrice) return null;
// if ( !in_array($this->_name,$customPlugin[$productCustomsPrice->virtuemart_custom_id]) ) return false;
$selected = $customPlugin[$productCustomsPrice->virtuemart_customfield_id]['stockable']['child_id'];

if (!$child = $this->plgVmCalculateCustomVariant($product, $productCustomsPrice,$selected) ) return false;
if ($child->product_sku)
$product->product_sku = $child->product_sku;
if ($child->product_name)
$product->product_name = $child->product_name;
$product->product_in_stock = $child->product_in_stock;
}
}

WITH THIS CODE:

Code: [Select]
public function plgVmOnAddToCart(&$product){
$customPlugin = JRequest::getVar('customPlugin',0);

if ($customPlugin) {
$db = JFactory::getDBO();
$query = 'SELECT  C.* , field.*
FROM `#__virtuemart_customs` AS C
LEFT JOIN `#__virtuemart_product_customfields` AS field ON C.`virtuemart_custom_id` = field.`virtuemart_custom_id`
WHERE `virtuemart_product_id` =' . $product->virtuemart_product_id.' and `custom_element`="'.$this->_name.'"';
$query .=' and is_cart_attribute = 1';
$db->setQuery($query);
$productCustomsPrice = $db->loadObject();
if (!$productCustomsPrice) return null;
// if ( !in_array($this->_name,$customPlugin[$productCustomsPrice->virtuemart_custom_id]) ) return false;
$selected = $customPlugin[$productCustomsPrice->virtuemart_customfield_id]['stockable']['child_id'];

if (!$child = $this->plgVmCalculateCustomVariant($product, $productCustomsPrice,$selected) ) return false;

if ($child->product_sku)       $product->product_sku       = $child->product_sku;
if ($child->product_name)    $product->product_name    = $child->product_name;
$product->product_in_stock = $child->product_in_stock;  // Override this even if null.

if ($child->product_weight)    $product->product_weight = $child->product_weight;
if ($child ->product_weight_uom) $product->product_weight_uom = $child->product_weight_uom;
if ($child->product_length) $product->product_length = $child->product_length;
if ($child->product_width) $product->product_width = $child->product_width;
if ($child->product_height) $product->product_height = $child->product_height;
if ($child->product_lwh_uom) $product->product_lwh_uom = $child->product_lwh_uom;
// if ($child->min_order_level) $product->min_order_level = $child->min_order_level;
// if ($child->max_order_level) $product->max_order_level = $child->max_order_level;
}
}


THEN REPLACE THIS CODE:

Code: [Select]
function getValideChild($child_id ) {
$db = JFactory::getDBO();
$q = 'SELECT `product_sku`,`product_name`,`product_in_stock`,`product_ordered`,`product_availability` FROM `#__virtuemart_products` JOIN `#__virtuemart_products_'.VMLANG.'` as l using (`virtuemart_product_id`) WHERE `published`=1 and `virtuemart_product_id` ='.(int)$child_id ;
$db->setQuery($q);
$child = $db->loadObject();
if ($child) {
if ('disableit_children' === $this->stockhandle) {
$stock = $child->product_in_stock - $child->product_ordered ;
if ($stock>0)return $child ;
else return false ;
}
else return $child ;
}
return false ;
}

WITH THIS CODE:

Code: [Select]
function getValideChild($child_id ) {
$db = JFactory::getDBO();
$q = 'SELECT `product_sku`,`product_name`,`product_in_stock`,`product_ordered`,`product_availability`,`product_weight`,`product_weight_uom`,`product_length`,`product_width`,`product_height`,`product_lwh_uom` FROM `#__virtuemart_prfoducts` JOIN `#__virtuemart_products_'.VMLANG.'` as l using (`virtuemart_product_id`) WHERE `published`=1 and `virtuemart_product_id` ='.(int)$child_id ;
$db->setQuery($q);
$child = $db->loadObject();
if ($child) {
if ('disableit_children' === $this->stockhandle) {
$stock = $child->product_in_stock - $child->product_ordered ;
if ($stock>0)return $child ;
else return false ;
}
else return $child ;
}
return false ;
}


Notice I commented out a few lines in the first edited function, but you could uncomment them and add those columns (and any others) to the db query in the second function to pull more values from the child to the product added to the cart.

I suggest this be added to the core.  However, it might be best if there were additional parameter options for the custom stockable variants plugin on the backend that lets you choose which values you would like the child to override for the parent.

After you make those changes your weight / dimension based shipping rules should work correctly for any new products added to the cart.

The modified default stockable.php is attached.  Hope this helps someone!  Took me a little while to figure it out.    :)

 :D

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on September 18, 2012, 22:05:27 pm
Code: [Select]

if ($child->product_sku) $product->product_sku = $child->product_sku;
if ($child->product_name)   $product->product_name = $child->product_name;
$product->product_in_stock = $child->product_in_stock;

$product->product_weight     = $child->product_weight;
$product->product_weight_uom = $child->product_weight_uom;
$product->product_length     = $child->product_length;
$product->product_width      = $child->product_width;
$product->product_height     = $child->product_height;
$product->product_lwh_uom    = $child->product_lwh_uom;
//$product->min_order_level = $child->min_order_level;
//$product->max_order_level = $child->max_order_level;

It would be better to wrap the second block of lines in the same style if statements as the first block.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Rocked on September 18, 2012, 22:31:54 pm
If you wrap it with if(xxx) before setting the override - you are just saying if it's null do not override that field.  I debated it and decided I wanted it to override it even it was null for weight / dimensions -- maybe it shouldn't though.  Hmm... maybe it would be better to not override it if it null... either way it will work.

I went ahead and modified that code in the post above and added the null checks though.


Here's the way I think this should be implemented into the backend.  See the attached picture. I added a few ideas to this as well -- Threw this together quick... but it gets the idea across pretty well.

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: sucuisine on September 19, 2012, 11:30:55 am
Many thanks for Rocked and Openglobal

We are going to try this code and will post the results

Regards

Ps the second  part of the code of Rocked has a typo, the table name ' virtuemart_prfoducts' should be ' virtuemart_products'

I am still testing
Title: Re: What bugs do you know of in stockable variants plugin
Post by: sucuisine on September 19, 2012, 15:04:43 pm
Hi
I have created a custom field of type plugin
I selected the plugin VM Custom stockable variants and I tried to create the option name with values. It is not possible to same the option save with values.

When selecting the plugin ' Vm custom field with stock control'  then the option name and values are saved.
So I continued with plugin ' Vm custom field with stock control'
In the parent product tab 'custom field' i selected the above created plugin en I created the childproducts and Link to each other.
Issue: the custom field namedisplays on the detail product page but the variants is not being displayed  (no dropdown list).

This issue is resolved. There was a type in the code of Rocked: Prfoduct should be product

I have also tried by creating the child's in the tab product information ' add child product' - > the same issue as above.

Before I was able to see the dropdown list and could place the child in the cart.  In this case I was also not able to save under ' stockable variants'

I am using vm 2.0.10

Who can help? Is the stockable.php of the last vm version 2.0.10?
Or has this to something to do with that the Vm custom stockable variants not being saved?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: bodywarmer on September 19, 2012, 17:54:18 pm
I am having loads of problems with the my cart.

Is there one global file update that can be used?
http://farlixx.co.uk/latest/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=225&virtuemart_category_id=0 (http://farlixx.co.uk/latest/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=225&virtuemart_category_id=0)

please help
Title: Re: What bugs do you know of in stockable variants plugin
Post by: bodywarmer on September 19, 2012, 21:54:15 pm
Hi I am not sure if this bug has been resolved.

I have updated to the latest version of virtuemart, however I seem to be having the problems with the parent and child variants.
I can order more than are in stock of the child variant by using both the product page and then the final cart.

Also when ordering the child product from the parent, on the pop up window it comes up with that the parent has been added, however when looking at the shopping cart is the correct product.
http://farlixx.co.uk/latest/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=225&virtuemart_category_id=0 (http://farlixx.co.uk/latest/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=225&virtuemart_category_id=0)
Do I need a patch for this?

Help would be much appreciated for this.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: sucuisine on September 23, 2012, 13:44:55 pm
I have implement custom field plugin with stock control

Question 1
It is not posible to order 3 different variants of the same product. The second variant is always being replaced in the cart
Answer: issue does not occurs anymore


Question 2
How can I manage the sequence of the child products that is being displayed. I have to create a new variance that should be displayed at the top of the list?

Answer: workaround- change the description of the child records or the sequence of the variants in the in the parent product equal to the sequence in which it appear in the website.


Please who can help me?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Florentp on September 24, 2012, 11:30:55 am
Guys, please use the last file posted by OpenGlobal. The one in the last release of Virtuemart is too old :)
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on September 27, 2012, 14:55:47 pm
I have updated to the latest version of virtuemart, however I seem to be having the problems with the parent and child variants.
I can order more than are in stock of the child variant by using both the product page and then the final cart.

This is a known problem with plugins and is unlikely to be fixed any time soon, if at all. Basically, when using custom field plugins, each click on Add to Cart creates a brand new entry in the cart which is not verified against other entries in the cart.


Also when ordering the child product from the parent, on the pop up window it comes up with that the parent has been added, however when looking at the shopping cart is the correct product.

I'll look into this.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: WillP on October 06, 2012, 09:35:57 am
Looking at administrator/..../helpers/cart.php, that last one is going to require a significant change in the way the cart works. It seems that all custom plugins will generate duplicates when added to the cart multiple times. The plugin itself has no way of controlling this and merging them into single lines.

I'll try to raise this with some other devs who may be able to look into it.

OpenGlobal

Hi OpenGlobal,

Is this the problems in example I buy Product A with size S, I click add to cart. Then I repeat it, it generate another Product A with size S instead update previous quantity to 2?
If yes, have you find the solution?

Thanks!
Title: Re: What bugs do you know of in stockable variants plugin
Post by: DarthVaderNow on October 08, 2012, 00:00:10 am
Hi,

i was able to get stockable variants working. I even added current stock to front page. But they are working only in Chrome and Firefox (Ubuntu+XP), but not in IE8. There I get some sort of JS error I am not aware of. When switching top variant (s,m,l,xl) working OK, but not when switching bottom variant (kratki dolgi). Every variant has its own price and stock:

(http://shrani.si/f/2N/BX/2nhpM6tT/screenshot-administratio.png)

My page is
http://www.aeioushop.com/mmmJoomla/si/trgovina/test/test_parent-detail

edit: i realized that if i change top selection, bottom selection is not changed but values (stock and price variation) are taken from second choice (even if first choice in bottom window is chosen). This is extremely strange - assuming in other browsers working normally.

Please HELP - i do not know how to continue with this.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on October 08, 2012, 22:52:21 pm
What version are you using? That looks like old stockable.php code. And it looks like it's not an official stable release of VirtueMart because there's a hidden input in the form that is completely wrong:

Code: [Select]
<input type="hidden" name="customPrice[Array][20]" value="195">

I'd suggest upgrading to at least 2.0.10.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: DarthVaderNow on October 09, 2012, 00:27:02 am
Hi,

sorry: my versions are Joomla 2.5.6 and Virtuemart 2.0.4.

Virtuemart is official and stable as it is version 2.0.4. downloaded from official website (as is Stockable variant plugin). Problem of upgrading is there is a lot of custom code implemented in a lot of different files. Upgrading would bring hours of work just to update my customs. This would be very last option (but still without guarantee for working). I do not know about hidden fields, but somehow everything is working very well in all browsers excluding Internet Explorer.

There must be simple error in JS in stockable.php I cannot see. Is there any other debugger for IE besides one included in IE?

Please advise

edit: I upgraded Virtuemart & AIO to 2.0.12 (latest):: IE seems to work ok in test product, but a lot of other problems appeared (showing all child in category, cart component not working anymore,...) -> reversing to 2.0.4
I realized I am using "VM - Custom, stockable variants" plugin as delivered in 2.0.4 (the same is in 2.0.8e in my other page), but in 2.0.12 there is new "Stockable variants" beside old one - there are some differences??
Title: Re: What bugs do you know of in stockable variants plugin
Post by: sucuisine on October 10, 2012, 11:38:35 am
Hi I am using VM 2.0 10 and implemented custom fields with stock control and defined parent and children products

Everything working fine but only the not the right price is being displayed on the detail product page. Some times the price of the last variant is being displayed togther with the default first variant (1st product)

Please who can help?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on October 11, 2012, 18:30:21 pm
Virtuemart is official and stable as it is version 2.0.4.

2.0.4 was an awful release. It was the this version that made me join the Virtuemart team...to fix it :-)

There must be simple error in JS in stockable.php I cannot see. Is there any other debugger for IE besides one included in IE?

There is Firebug Lite but it's a pain to get it working with script.

I realized I am using "VM - Custom, stockable variants" plugin as delivered in 2.0.4 (the same is in 2.0.8e in my other page), but in 2.0.12 there is new "Stockable variants" beside old one - there are some differences??

These are the same, just a name change.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: ntunay on October 11, 2012, 23:15:46 pm
hi i have parent products they work perfect. but i have also child products with diffrent sizes and color. child product has just 1 stock. if i click add to cart button i keeps adding to cart. i mean if i click twice it adds two product but there are no two products.

i choose notify me option.

i have one product but if i click add to cart button ten times . i can buy ten product. in the cart there are ten same products but they show seperate. i mean

1 white dress 
1 white dress 
1 white dress 
.....
total:.....


not
3 white dresses
total:,,,,,

i think it is a bug

i tried on diffrent sites. they didnt work too

help please
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on October 12, 2012, 09:02:58 am
This is a known issue.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: ntunay on October 12, 2012, 12:58:48 pm
is there any solution. this is a big problem for me?
can next updates fix this bug
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Florentp on October 12, 2012, 14:07:40 pm
Yes, this should be fixed in next releases ;)
Title: Re: What bugs do you know of in stockable variants plugin
Post by: ntunay on October 12, 2012, 14:38:14 pm
i hope so :)
Title: Re: What bugs do you know of in stockable variants plugin
Post by: d_a_w_g_y on October 14, 2012, 21:32:13 pm
Hi OpenGlobal,

I think i'm in the right place now ;)

Using latest VM 2.0.12

I have an odd error that I am trying to track down, not sure if its a bug or configuration. I am using productdetails overrides:

TEMPLATE/html/com_virtuemart/productdetails

default.php
default_addtocart.php
default_showprices.php

here is the overview:

1. I added a Custom field of type plugin in virtuemart, VM custom stockable variants, here I added various flavours, e.g. lemon, orange, raspberry etc as a dropdown list.
2. Next I found I had to create some child products, even though I already had these from migration of vm 1.19, anyway not too worried about this, too much DB hacking will probably take more time than actually adding new child products. I like the way I can add different flavours and only use the ones I want to to be mapped to the specific products that I need to have flavours for, or at least it seems this way currently.
3. Next I started testing the functionality, everything seems to works fine, if my products have a quantity greater than 0. I can also add the new child product to the cart.
4.  Until, consider the following example:

  4a. Raspberry has 0 stock, lemon and orange have greater than 0 stock
  4b. I select Raspberry and the Notifyme link appears, which is correct and how I want it to work
  4c. Next I select Lemon, but this time instead of having a value of '1' I have a value of 'undefined', if i refresh my web browser, the value is reset to '1' again (and so is the flavour ::EDIT:: no this is not true sorry, refresh keeps the flavour name but puts a 1 in the quantity box), in this state of 'undefined' I am unable to add the product to the cart.

Therefore it is the change back from Notifyme to a product that has stock where the problem occurs.

I tracked it down in Firebug to:

Code: [Select]
<div class="addtocart-bar"><span class="quantity-box"><input class="quantity-input js-recalculate" type="text" value="undefined" name="quantity[]"></span><span class="quantity-controls js-recalculate">
My default_addtocart.php override for displaying the quantity box looks like:

Code: [Select]
<?php // Display the quantity box
      
    
$stockhandle VmConfig::get('stockhandle''none');
  
    if ((
$stockhandle == 'disableit' or $stockhandle == 'disableadd') and ($this->product->product_in_stock $this->product->product_ordered) < 1) {
    
 
?>

<a href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=productdetails&layout=notify&virtuemart_product_id='.$this->product->virtuemart_product_id); ?>" class="notify"><?php echo JText::_('COM_VIRTUEMART_CART_NOTIFY'?></a>

<?php } else {  ?>
<!-- <label for="quantity<?php echo $this->product->virtuemart_product_id?>" class="quantity_box"><?php echo JText::_('COM_VIRTUEMART_CART_QUANTITY'); ?>: </label> -->
   
      <span class="quantity-box">

<input type="text" class="quantity-input js-recalculate" name="quantity[]" value="<?php if ( isset($this->product->min_order_level) && (int) $this->product->min_order_level 0) {
    echo 
$this->product->min_order_level
} else {
    echo 
'1';
?>
" />

    </span>
    <span class="quantity-controls js-recalculate"> 
<input type="button" class="quantity-controls quantity-plus" />
<input type="button" class="quantity-controls quantity-minus" />
    </span>
   
    <?php // Display the quantity box END ?>


All my products and child products have a minimal purchase quantity of 1 and I have tried changing this override but with not much success so far, e.g. removed, changed, adapted the following:

Code: [Select]
<input type="text" class="quantity-input js-recalculate" name="quantity[]" value="<?php if (isset($this->product->min_order_level) && (int) $this->product->min_order_level 0) {    echo $this->product->min_order_level; } else {    echo '1';} ?>" />
Maybe I am completely overlooking something,

Any help on this would be most appreciated

Cheers

d_a_w_g_y

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: d_a_w_g_y on October 15, 2012, 19:35:20 pm
In regards to the undefined issue as last posted and In case this gets confusing I have managed to resolve this problem:

http://forum.virtuemart.net/index.php?topic=108768.0

I think half the battle with this sort of thing is knowing where to look! ;) hehe

cheers

d_a_w_g_y
Title: Re: What bugs do you know of in stockable variants plugin
Post by: tmcl on October 22, 2012, 13:09:27 pm
Hi OpenGlobal,

i've been using virtuemart 2.0.10 with no problems. Started to use vmcustom Stockable to give my products colour and size parameters.
followed various tutorials to configure one product to use this plugin.

the problem is that, when i click to buy a product with this plugin, i get a 402 error code (payment required) and cant buy the product.
the price is being updated but cant buy.

i then update virtuemart to lastest release (2.0.12e) with no luck to this problem.
i only get this error when i have "Parent Variant" checked in parent product custom fields.

thanks
Title: Re: What bugs do you know of in stockable variants plugin
Post by: temerario on October 22, 2012, 16:41:36 pm
Sorry for my poor english.

I create one products and more product childs with  stockable variants plugin.
This product are different for dimensions.
If i view, after i do search, one product child i see correct price but if i go to the product and change the drop list for change variant the product and the price don't change.

Someone help me? :(
Title: Re: What bugs do you know of in stockable variants plugin
Post by: temerario on October 23, 2012, 11:59:38 am
Anymore HELP ME :(?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: cloudti on October 23, 2012, 16:17:10 pm
...
If i view, after i do search, one product child i see correct price but if i go to the product and change the drop list for change variant the product and the price don't change.
...

Hi VM Community forum.

Quoting those words from our friend Temerario for more detailed explain, I am experiencing the same problem:

When a user select an option from the size drop down list, he got a product price modification correctly. But sometimes, when the user enter to the detail product page, it display the price from the last option of size list.

Try to enter this to this URL and refresh it with F5, at least 5 times.

http://uniforme-cp58.webjoomla.es/preproduccion/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=6&virtuemart_category_id=3&Itemid=577

I configured this plug in as the follow attached image display to us.

Thanks in advance


[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: abzamon on October 31, 2012, 11:27:27 am
Hello
is there a solution or a hack for the duplicated products in cart ?

Thx
Sylvain

Title: Re: What bugs do you know of in stockable variants plugin
Post by: abzamon on November 05, 2012, 11:42:08 am
hello again,

I precise my problem :

If I hit "add to cart" several times on the same child product detail page, It adds several lines to my cart instead of increasing the quantity of the the product

I need help on this one, or at least some insults with a simple google search to answer my issue ;)

Thx all

Sylvain
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Wapsel on December 19, 2012, 15:39:39 pm
Hi there,

I also have problems with the price calculation.
If I make a choice of the stockable variant, at first the price displays correct. If I then navigate to the next or previous product, it sometimes shows the most expensive price in combination with the cheapest option.
I've already tried to do something with the cache, but without success.

Hope someone has an solution!
Kind regards
Title: Re: What bugs do you know of in stockable variants plugin
Post by: vanekmichal on December 22, 2012, 22:26:49 pm
Hi,

I still have a problem with sorting a list in firefox.

In Firefox menu is not sorted correctly. (img)

http://www.tisknemekvalitne.cz/tiskneme2/index.php/letaky (http://www.tisknemekvalitne.cz/tiskneme2/index.php/letaky)



[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: thanos268 on February 08, 2013, 12:21:56 pm
hi to all.
I have a problem with the stockable plugin in vm 2.0.18a edition.
Not updated the product stock after adding a product to cart. Then when i press continue shopping  (without confirm) i can buy again and again the same product even if it is out of stock (virtual stock not work). With the simple generic child variant plugin seems to work (update stock level without confirm) but do not have the function of multiple fields.  Is there a solution?
Thanks
Title: Re: What bugs do you know of in stockable variants plugin
Post by: sukhrob on February 17, 2013, 13:30:30 pm
Hi there,

I also have problems with the price calculation.
If I make a choice of the stockable variant, at first the price displays correct. If I then navigate to the next or previous product, it sometimes shows the most expensive price in combination with the cheapest option.
I've already tried to do something with the cache, but without success.

Hope someone has an solution!
Kind regards

Yep, i had and still have the same problem. But OpenGL can not seem to recreate it on his end, hence can't provide the solution yet...

As you can see in attachment, in the category View, it shows the correct price of the parent.
Then you click on the product, and inside in the product detail page, it shows all the specifications of the first child variant, which is the smallest size which matches with the price of the parent. However, the price shows of the most expensive size.
So if i play with selections, and pick different size, and then go back to the smallest size, it updates the price correctly.

The problem with this is that it can confuse and scare off the clients. This really needs to be fixed.

This bug happens randomly, I can not point on specific product and say that it constantly throws that bug. But it still happens too often. If not with one product, then with the other.




[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on February 20, 2013, 00:20:11 am
hello again,

I precise my problem :

If I hit "add to cart" several times on the same child product detail page, It adds several lines to my cart instead of increasing the quantity of the the product

I need help on this one, or at least some insults with a simple google search to answer my issue ;)

Thx all

Sylvain

Hi, this is a known issue but is impossible to fix. As this works as a "custom plugin", VirtueMart doesn't know if it is appropriate to group the products into a single line. The plugin could be doing different things each time a product is added so that grouping the products is not possible. This is just a quirk of the plugins feature so cannot be fixed.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: chri.mus on March 01, 2013, 12:52:45 pm
Hello to all,
I am writing to describe a problem with stockable variant plugin.
My environment is virtuemart joomla 2.0.10 and 2.5.4. However, I also tried with the latest version of virtuemart 2.0.18a and the problem persists.
Now,
suppose in my store I have a product with quantity 2.
suppose also that a purchase is made by a customer for this product with quantity 1.
In the ordered products (backend) is correctly set the quantity to 1.
At the next purchase of the same product, if you enter quantity 2, it returns a message indicating that the maximum number of products that is possible to buy is 1.
That's all correct.

This same example, on a child product, causes the following problem:
making a second purchase and  inserting 2, please note 2 as quantity, virtuemart allows the purchase but in the stock is present only 1 of same product.
I noticed that the problem is on the calculation of the difference between products in stock and ordered products. Seems that this operation is made as follows:
stock chields product - parent product ordered instead of
stock chields product - child product ordered

In practice, the system calculates the stocks of products without count of child products ordered.
Is there a way to fix this?
I hope someone can help me to solv this problem otherwise it is useless to the implementation of virtuemart products child products.

Thank you all.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: bjc on March 18, 2013, 09:31:17 am
Hi there,

I also have problems with the price calculation.
If I make a choice of the stockable variant, at first the price displays correct. If I then navigate to the next or previous product, it sometimes shows the most expensive price in combination with the cheapest option.
I've already tried to do something with the cache, but without success.

Hope someone has an solution!
Kind regards

Yep, i had and still have the same problem. But OpenGL can not seem to recreate it on his end, hence can't provide the solution yet...

As you can see in attachment, in the category View, it shows the correct price of the parent.
Then you click on the product, and inside in the product detail page, it shows all the specifications of the first child variant, which is the smallest size which matches with the price of the parent. However, the price shows of the most expensive size.
So if i play with selections, and pick different size, and then go back to the smallest size, it updates the price correctly.

The problem with this is that it can confuse and scare off the clients. This really needs to be fixed.

This bug happens randomly, I can not point on specific product and say that it constantly throws that bug. But it still happens too often. If not with one product, then with the other.

Having the same problem. I'm using J 2.5.9 and VM 2.0.20b, but it has happened in at least the past couple versions of VM. I've tried Firefox, Chrome and Safari. Changing the selections fixes the price display for me too. It's kind of important that the price displays correctly though. Has anyone made any headway?

Brad
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on March 18, 2013, 13:40:12 pm
Sorry, I've been out of the loop for a while with heavy work commitments but I've been able to reproduce this problem intermittently and I'm hoping to be able to work on a fix in the next few weeks.

OpenGlobal
Title: Re: What bugs do you know of in stockable variants plugin
Post by: sukhrob on March 18, 2013, 16:02:26 pm
Sorry, I've been out of the loop for a while with heavy work commitments but I've been able to reproduce this problem intermittently and I'm hoping to be able to work on a fix in the next few weeks.

OpenGlobal

Awesome!!! Thank you so much for taking your time to do this.
Can't wait to get rid of this problem.. :)
Title: Re: What bugs do you know of in stockable variants plugin
Post by: bjc on March 18, 2013, 18:55:57 pm
Sorry, I've been out of the loop for a while with heavy work commitments but I've been able to reproduce this problem intermittently and I'm hoping to be able to work on a fix in the next few weeks.

OpenGlobal

Fantastic OpenGlobal, thank you very much. If I can do anything at all to help you replicate the problem please let me know. I know these intermittent things are incredibly frustrating.

Brad
Title: Re: What bugs do you know of in stockable variants plugin
Post by: bjc on April 08, 2013, 09:21:01 am
Sorry, I've been out of the loop for a while with heavy work commitments but I've been able to reproduce this problem intermittently and I'm hoping to be able to work on a fix in the next few weeks.

OpenGlobal

Hoping to get an update on how this is going. Thank you so much for working on this.

Brad
Title: Re: What bugs do you know of in stockable variants plugin
Post by: ouno.ujes on May 06, 2013, 23:33:07 pm
Sorry, I've been out of the loop for a while with heavy work commitments but I've been able to reproduce this problem intermittently and I'm hoping to be able to work on a fix in the next few weeks.

OpenGlobal

I have the same problem. I noticed that if I refresh the page (F5 key), the price of the selected (first) variant appears. But you can't expect the user to do think of that. So I'm looking forward to the fix, too.  :)

Ouno
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Spyros Petrakis on May 21, 2013, 17:07:22 pm
Hi,

I still have a problem with sorting a list in firefox.

In Firefox menu is not sorted correctly. (img)

http://www.tisknemekvalitne.cz/tiskneme2/index.php/letaky (http://www.tisknemekvalitne.cz/tiskneme2/index.php/letaky)

Hi i have the same problem with sorting but on all browsers, even if i change the order of child's in parent nothing happens. This is big problem because it is very confusing for the clients to see the sizes out of order.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: bjc on May 25, 2013, 08:30:46 am
Sorry, I've been out of the loop for a while with heavy work commitments but I've been able to reproduce this problem intermittently and I'm hoping to be able to work on a fix in the next few weeks.

OpenGlobal

I have the same problem. I noticed that if I refresh the page (F5 key), the price of the selected (first) variant appears. But you can't expect the user to do think of that. So I'm looking forward to the fix, too.  :)

Ouno

Has anyone found a solution to this? I suspect it's probably not a complicated bug but the code's a bit over my head.

Brad
Title: Re: What bugs do you know of in stockable variants plugin
Post by: sukhrob on May 25, 2013, 12:21:52 pm
Sorry, I've been out of the loop for a while with heavy work commitments but I've been able to reproduce this problem intermittently and I'm hoping to be able to work on a fix in the next few weeks.

OpenGlobal

I have the same problem. I noticed that if I refresh the page (F5 key), the price of the selected (first) variant appears. But you can't expect the user to do think of that. So I'm looking forward to the fix, too.  :)

Ouno

Has anyone found a solution to this? I suspect it's probably not a complicated bug but the code's a bit over my head.

Brad

Nope, still waiting for the solution... All hope is in the hands of OpenGlobal :D
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Florentp on July 02, 2013, 15:32:34 pm
Hello everybody.

Since I decided to use Vm2 for the website of the company I work for in August 2012 (So one year ago),
Stockable variants plugin doesn't work fine. There is still issues that makes my company loosing money.

One easy problem to understand :
When you use stockable variants plugin, your customers can buy you more than you have in stock.
If stock is 5 for example, client can't put more than 5 in cart. That's okay.
But he can add 5, then add 5 again.. And finally buy from you 20 when you just have 5.

Last week, we put online a product that customers was waiting for more than 5 months. (a very wanted shoe model)
During 5 months, we promoted it all over the web. We did advertising on google... Was pretty huge.
So when it was available, we sold out all our stock in less than 20 minutes.
But we had as final stock : -18. So, it's easy to understand. Some people bought more than we had in stock.
Every shoes are sold 70€. 70 x 18 = 1260€

We had to refund for 1260€, and to pay for the refund bank fees.

This is not the first time the problem occur, this happend every week (but often it's just a -1 just because customer added 2 times a product we had only 1 in stock).


I love Virtuemart (i started to use it when i was 16 years old, now i'm 23...) but it becomes difficult to explain to my boss why a simple function
as "stock gestion for each size of cloth/shoe" doesn't work fine ! I mean... This is a basic function. Every online shop selling clothing must be abble to have stock gestion for every sizes.
Ok we have it, but this is still not working as expected after one year using Virtuemart. My boss don't understand. And i don't know what to say him.
Some may say "Ok dude, but Virtuemart is a non-commercial project, peoples work on it when they have time...". This is not the problem.
The problem is that we all want to defend Virtuemart. I'm pretty sure that most of us love and believe on it. Actually, i'm so respectfull for the work done here...
Some of people from the Virtuemart team are professional model to me (and they'll recognize themself ^^).
But how can we defend Virtuemart VS other free solutions, well highlighted.
I want to defend Virtuemart, but it gets very complicated.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: bjc on July 08, 2013, 07:29:22 am
Sorry, I've been out of the loop for a while with heavy work commitments but I've been able to reproduce this problem intermittently and I'm hoping to be able to work on a fix in the next few weeks.

OpenGlobal

I have the same problem. I noticed that if I refresh the page (F5 key), the price of the selected (first) variant appears. But you can't expect the user to do think of that. So I'm looking forward to the fix, too.  :)

Ouno

Has anyone found a solution to this? I suspect it's probably not a complicated bug but the code's a bit over my head.

Brad

Nope, still waiting for the solution... All hope is in the hands of OpenGlobal :D

Really hoping someone has found a solution, or could recommend other options.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on July 08, 2013, 15:45:23 pm
I've managed to find something in the code where jquery isn't unbinding events from some of the dropdowns. No idea why. We might make some changes to the way VirtueMart works in the area so that we can work around this.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: bjc on July 08, 2013, 21:38:12 pm
I've managed to find something in the code where jquery isn't unbinding events from some of the dropdowns. No idea why. We might make some changes to the way VirtueMart works in the area so that we can work around this.

OpenGlobal E-commerce

I assume you're referring to the incorrect price that shows when the product page is first loaded. I can imagine it's hard to work on something that's intermittent. Would be happy to help test if it makes life easier :)
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on July 19, 2013, 17:37:20 pm
I have a possible workaround for those people experiencing the problem with the prices being updated incorrectly. This is a bit of a hack to workaround jquery not doing what it is told.

/components/com_virtuemart/asses/js/vmprices.js (line 95):

Code: [Select]
select = cart.find('select'),

Change this to:

Code: [Select]
select = cart.find('select:not(.attribute_list)'),

I'm still trying to ascertain if this is the error. It seems to have stopped the problems on my test system, so if you try this, please let me know if it does or doesn't work for you.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on July 19, 2013, 19:10:16 pm
For those who also want to prevent users from adding more items than you have in stock to their cart (by clicking the Add to Cart button multiple times), change the plgVmOnAddToCart() function in stockable.php (near the end of the file) to the following:

Code: [Select]
public function plgVmOnAddToCart(&$product){
$customPlugin = JRequest::getVar('customPlugin',0);

if ($customPlugin) {
$db = JFactory::getDBO();
$query = 'SELECT  C.* , field.*
FROM `#__virtuemart_customs` AS C
LEFT JOIN `#__virtuemart_product_customfields` AS field ON C.`virtuemart_custom_id` = field.`virtuemart_custom_id`
WHERE `virtuemart_product_id` =' . $product->virtuemart_product_id.' and `custom_element`="'.$this->_name.'"';
$query .=' and is_cart_attribute = 1';
$db->setQuery($query);
$productCustomsPrice = $db->loadObject();
if (!$productCustomsPrice) return null;
// if ( !in_array($this->_name,$customPlugin[$productCustomsPrice->virtuemart_custom_id]) ) return false;
$selected = $customPlugin[$productCustomsPrice->virtuemart_customfield_id]['stockable']['child_id'];

if (!$child = $this->plgVmCalculateCustomVariant($product, $productCustomsPrice,$selected) ) return false;
if ($child->product_sku)
$product->product_sku = $child->product_sku;
if ($child->product_name)
$product->product_name = $child->product_name;
$product->product_in_stock = $child->product_in_stock;

$this->stockhandle = VmConfig::get('stockhandle','none');
if ('disableit' == $this->stockhandle || 'disableit_children' == $this->stockhandle || 'disableadd' == $this->stockhandle) {
if (!class_exists ('VirtueMartCart')) {
require(JPATH_VM_SITE . DS . 'helpers' . DS . 'cart.php');
}
$cart = VirtueMartCart::getCart ();print_r($product);print_r($cart);

$orderedQuantity = $product->quantity;
foreach ($cart->products as $cartProduct) {
if ($cartProduct->virtuemart_product_id == $product->virtuemart_product_id) {
$orderedQuantity += $cartProduct->quantity;
if ($orderedQuantity > $product->product_in_stock) {
return false;
}
}
}
}
}
}

This seems to work for me.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: bjc on July 19, 2013, 22:17:58 pm
I have a possible workaround for those people experiencing the problem with the prices being updated incorrectly. This is a bit of a hack to workaround jquery not doing what it is told.

/components/com_virtuemart/asses/js/vmprices.js (line 95):

Code: [Select]
select = cart.find('select'),

Change this to:

Code: [Select]
select = cart.find('select:not(.attribute_list)'),

I'm still trying to ascertain if this is the error. It seems to have stopped the problems on my test system, so if you try this, please let me know if it does or doesn't work for you.

OpenGlobal E-commerce

Thank you so much or working on this. Unfortunately, the error still exists for me. Interestingly though, that code is on line 108 for me, not 95. Could you have a different version of vmprices.js than I do? I'm using VM 2.0.22a
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on July 22, 2013, 22:18:05 pm
I have attached a zip file containing the latest fixes to the stockable.php and vmprices.js. Extract the zip file and move stockable.php to plugins/vmcustom/stockable and move vmprices to components/com_virtuemart/assets/js and overwrite the files which are already there. These files are based on the 2.0.22a versions of those files.

This contains the fix for being able to add more products than are in stock by repeatedly clicking the Add to Cart button and (hopefully) the fix for the price display problems.

I'd appreciate any feedback on this before it goes into the next release.

OpenGlobal E-commerce

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: bjc on July 23, 2013, 03:11:48 am
I have attached a zip file containing the latest fixes to the stockable.php and vmprices.js. Extract the zip file and move stockable.php to plugins/vmcustom/stockable and move vmprices to components/com_virtuemart/assets/js and overwrite the files which are already there. These files are based on the 2.0.22a versions of those files.

This contains the fix for being able to add more products than are in stock by repeatedly clicking the Add to Cart button and (hopefully) the fix for the price display problems.

I'd appreciate any feedback on this before it goes into the next release.

OpenGlobal E-commerce

Pricing: I've only got stockable products, but this seems to be working flawlessly on my Mac with Firefox, Chrome and Safari. You're a rockstar OpenGlobal!
Title: Re: What bugs do you know of in stockable variants plugin
Post by: klubb on August 07, 2013, 13:25:10 pm
I have a question about performance issue in stockable plugin. I setting up one parent product and 8 child products. While testing locally I have observed that changing (more then 5-10 times) child in dropdown list can slowdown response from server and  whole pc.

Situation: when page open one or two queries goes on, after each change of the option stockable plugin generates increased  quantity of queries – 1 – 2 – 3 -4 – 5 and so on ,so if you change dropdown selection many times you can slowdown response from server and even get flooding 403 response.
You can check this on this site http://www.flexiblewebdesign.com/virtuemart-2-template-puremart/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=39&virtuemart_category_id=2&Itemid=475 (it’s not my page but behavior is the same) it’s  clearly seen if you try to change first and second dropdown list 5-10 times.

On my page I try to change dropdown list selection by click additional image through the jquery and I call change function – as a result the situation with “a lot of queries” happen very quickly. I think it happen because of recalculation, but I don’t know how to deal with this.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 07, 2013, 15:10:23 pm
I've only had a very brief look at this so far, but the first thing that strikes me is the error when loading the page:

TypeError: selectBox is null   
selectBox.removeAttribute('onchange');

in productUpdater.js (line 128)

I suspect that something else is interfering with the select change events.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: klubb on August 07, 2013, 22:09:44 pm
Hi, you can test this on my test-page http://temptutest.mywebcommunity.org/magazin/kosmetika/s-b/s-b-hi-def-39-detail. This version has not modified stockable plugin and you can watch in the console what I mean.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 07, 2013, 22:32:54 pm
Try adding the code fixes in the latest zip file above.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: klubb on August 08, 2013, 13:05:03 pm
Thank you very much! It works like a charm . One change - one query.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Geppux on August 11, 2013, 13:56:35 pm
Hi OpenGlobal, I just found this thread and I would like to ask you a couple of things. I have this problem using this plugin... I can not assign different discounts to the child product, they always take the discount I set for the parent product. I tried the last zip you posted but without success, I have always the same problem (joomla 2.5.14 - VM 2.0.22a).
I Think this is a bug, together with the fact that changing to different child product you always see the parent images (and not the child image) and that if I select directly a child product I should automatically find in the drop down menus the characteristics of the child I choosed and not the parent one.
Thank you for your answer.
Giuseppe
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 11, 2013, 22:41:27 pm
That is beyond the scope of this plugin. The stockable plugin is literally just for creating "stockable variants", if you want to do anything other than stock control with the children, you need to use the Dynamic Child Variants instead.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Geppux on August 12, 2013, 00:15:20 am
Thank you for the answer but... I need to create ALSO "stockable variants"... anyway...what is "Dynamic Child Variants"? you told in another post that is just called "Child Variants IIRC" but I didn't found it. Is the same as "Generic Child Variant"?

Giuseppe
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 12, 2013, 08:52:54 am
Hi Giuseppe,

Yes, that's the one.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Geppux on August 12, 2013, 12:04:49 pm
Thank you OpenGlobal for the answer and for the work you are doing. 
Surely the problems of discounts, images and drop down menu are big lacks for a so nice plugin. I understand that this plugin was created only to have stock control for variants but if the variants can not be considered as a normal product his use is very restricted. I would like to give my help but unfortunately my PHP knowledge is very poor.
Thank you again, bye.
Giuseppe
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 12, 2013, 13:55:38 pm
Making changes to the product images, descriptions and other items would be impossible because it would depend entirely on the template being used. I'd like to expand the Generic Child Variant in a future release to give it similar functionality to the Stockable variant plugin.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: fluidfusion on August 13, 2013, 09:14:59 am
Here's how to get weight & dimensions for stockable variants passed into the cart! :)

Open plugins/vmcustom/stockable/stockable.php

REPLACE THIS CODE:

Code: [Select]
public function plgVmOnAddToCart(&$product){
$customPlugin = JRequest::getVar('customPlugin',0);

if ($customPlugin) {
$db = JFactory::getDBO();
$query = 'SELECT  C.* , field.*
FROM `#__virtuemart_customs` AS C
LEFT JOIN `#__virtuemart_product_customfields` AS field ON C.`virtuemart_custom_id` = field.`virtuemart_custom_id`
WHERE `virtuemart_product_id` =' . $product->virtuemart_product_id.' and `custom_element`="'.$this->_name.'"';
$query .=' and is_cart_attribute = 1';
$db->setQuery($query);
$productCustomsPrice = $db->loadObject();
if (!$productCustomsPrice) return null;
// if ( !in_array($this->_name,$customPlugin[$productCustomsPrice->virtuemart_custom_id]) ) return false;
$selected = $customPlugin[$productCustomsPrice->virtuemart_customfield_id]['stockable']['child_id'];

if (!$child = $this->plgVmCalculateCustomVariant($product, $productCustomsPrice,$selected) ) return false;
if ($child->product_sku)
$product->product_sku = $child->product_sku;
if ($child->product_name)
$product->product_name = $child->product_name;
$product->product_in_stock = $child->product_in_stock;
}
}

WITH THIS CODE:

Code: [Select]
public function plgVmOnAddToCart(&$product){
$customPlugin = JRequest::getVar('customPlugin',0);

if ($customPlugin) {
$db = JFactory::getDBO();
$query = 'SELECT  C.* , field.*
FROM `#__virtuemart_customs` AS C
LEFT JOIN `#__virtuemart_product_customfields` AS field ON C.`virtuemart_custom_id` = field.`virtuemart_custom_id`
WHERE `virtuemart_product_id` =' . $product->virtuemart_product_id.' and `custom_element`="'.$this->_name.'"';
$query .=' and is_cart_attribute = 1';
$db->setQuery($query);
$productCustomsPrice = $db->loadObject();
if (!$productCustomsPrice) return null;
// if ( !in_array($this->_name,$customPlugin[$productCustomsPrice->virtuemart_custom_id]) ) return false;
$selected = $customPlugin[$productCustomsPrice->virtuemart_customfield_id]['stockable']['child_id'];

if (!$child = $this->plgVmCalculateCustomVariant($product, $productCustomsPrice,$selected) ) return false;

if ($child->product_sku)       $product->product_sku       = $child->product_sku;
if ($child->product_name)    $product->product_name    = $child->product_name;
$product->product_in_stock = $child->product_in_stock;  // Override this even if null.

if ($child->product_weight)    $product->product_weight = $child->product_weight;
if ($child ->product_weight_uom) $product->product_weight_uom = $child->product_weight_uom;
if ($child->product_length) $product->product_length = $child->product_length;
if ($child->product_width) $product->product_width = $child->product_width;
if ($child->product_height) $product->product_height = $child->product_height;
if ($child->product_lwh_uom) $product->product_lwh_uom = $child->product_lwh_uom;
// if ($child->min_order_level) $product->min_order_level = $child->min_order_level;
// if ($child->max_order_level) $product->max_order_level = $child->max_order_level;
}
}


THEN REPLACE THIS CODE:

Code: [Select]
function getValideChild($child_id ) {
$db = JFactory::getDBO();
$q = 'SELECT `product_sku`,`product_name`,`product_in_stock`,`product_ordered`,`product_availability` FROM `#__virtuemart_products` JOIN `#__virtuemart_products_'.VMLANG.'` as l using (`virtuemart_product_id`) WHERE `published`=1 and `virtuemart_product_id` ='.(int)$child_id ;
$db->setQuery($q);
$child = $db->loadObject();
if ($child) {
if ('disableit_children' === $this->stockhandle) {
$stock = $child->product_in_stock - $child->product_ordered ;
if ($stock>0)return $child ;
else return false ;
}
else return $child ;
}
return false ;
}

WITH THIS CODE:

Code: [Select]
function getValideChild($child_id ) {
$db = JFactory::getDBO();
$q = 'SELECT `product_sku`,`product_name`,`product_in_stock`,`product_ordered`,`product_availability`,`product_weight`,`product_weight_uom`,`product_length`,`product_width`,`product_height`,`product_lwh_uom` FROM `#__virtuemart_prfoducts` JOIN `#__virtuemart_products_'.VMLANG.'` as l using (`virtuemart_product_id`) WHERE `published`=1 and `virtuemart_product_id` ='.(int)$child_id ;
$db->setQuery($q);
$child = $db->loadObject();
if ($child) {
if ('disableit_children' === $this->stockhandle) {
$stock = $child->product_in_stock - $child->product_ordered ;
if ($stock>0)return $child ;
else return false ;
}
else return $child ;
}
return false ;
}


Notice I commented out a few lines in the first edited function, but you could uncomment them and add those columns (and any others) to the db query in the second function to pull more values from the child to the product added to the cart.

I suggest this be added to the core.  However, it might be best if there were additional parameter options for the custom stockable variants plugin on the backend that lets you choose which values you would like the child to override for the parent.

After you make those changes your weight / dimension based shipping rules should work correctly for any new products added to the cart.

The modified default stockable.php is attached.  Hope this helps someone!  Took me a little while to figure it out.    :)

 :D

Have been through all 18 pages of this very useful thread (highest regards to the OP for taking so much time on this) and was thanked for my efforts at page 14 where the shipping weights problem I am having popped up. Unfortunately this fix is not working for the version of VM (2.0.20b) that I am using.

I am selling products with Weight variants, 1kg, 5kg, 15kg and each weight costs a different amount to ship. Of course without change, the cart only calculates the shipping weight of the parent item which is useless.

When I applied the fix about I lost my dropdown box all together so I'm guessing it need re-approaching for the newer versions of VM.

Quite surprised this has not been implemented yet. Any ideas anyone?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 13, 2013, 09:32:02 am
Have you applied the latest fixes in the zip file on the previous page? I thought I'd fixed this.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: fluidfusion on August 13, 2013, 09:52:13 am
Hmm, can't seem to see that, probably going blurry having spent the last few hours reading off the screen. I did manage to find this other post: https://forum.virtuemart.net/index.php?topic=115921.0

But still not working for me. Could you point me to the post your are referring to?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 13, 2013, 09:55:12 am
https://forum.virtuemart.net/index.php?topic=103067.msg396489#msg396489 (https://forum.virtuemart.net/index.php?topic=103067.msg396489#msg396489)

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Jörgen on August 13, 2013, 09:59:19 am
Hello Openglobal and thanks for Your efforts.  :)

Sorry but the stockable.php from post #250 doesn´t seem to work.
You could also be interested in this thread. Rainman has tried the stockable.php from the svn and still gets flickering. I have also discovered that the transition between the different options don´t go very well. Custom field data doesn´t seem to be correctly updated, when changing between option. For example when going from Full Lace to Lace Front :(
http://forum.virtuemart.net/index.php?topic=117783.msg398988#msg398988 (http://forum.virtuemart.net/index.php?topic=117783.msg398988#msg398988)

Jörgen @ Kreativ Fotografi
Title: Re: What bugs do you know of in stockable variants plugin
Post by: fluidfusion on August 13, 2013, 10:08:18 am
https://forum.virtuemart.net/index.php?topic=103067.msg396489#msg396489 (https://forum.virtuemart.net/index.php?topic=103067.msg396489#msg396489)

OpenGlobal E-commerce

Many thanks, not working but I'm still on v20b. Do you think it might work if I upgrade? I would just upgrade and see but last time I tried the site broke and I had to revert back to a backup.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: fluidfusion on August 13, 2013, 11:30:35 am
Answered my own question here, did a backup version of the site and managed to successfully update to v22a. Still not adding weight info to the cart for child products though.

Any ideas?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: sandstorm on August 13, 2013, 12:54:02 pm
Wow, I just read through all 18 pages of this thread. Great work from OpenGlobal and input from other users - well done  8)

I am using Vm2.0.18 & also have a test version running 2.0.22a and have ran into a problem before with multiple prices, but have managed to ignore it until now.
I have 1000's of products using Parent\Child with the stockable variants plugin

I initially wanted to use different prices for buying multiples of products - This worked great in VM1, but I have never got it to work in VM2.
It also works great for single products, but not with products using the stockable variant plugin.

When I add multiple prices to the child product, when you view these in the front end store the price always reverts back to the main parent price? My initial idea was that if a customer was buying 1 variant of the product he/she pays full price. If they buy 2-4 of them they get to buy at the discounted price and so on for other quantities 5-10, 11-20, etc
I gave up with getting this to work a long time ago BUT,

I am now revisiting this as I need to add a different price to every product for a set shopper group.

With the help of CSVi, I have successfully imported these prices for all my products and child products, but when I test this by logging in as a member of the test shopper group, the price is ignored and always reverts to the main parent price. So I guess multiple pricing still isnt working for stockable variant plugin products?

Again this is OK for normal/single products, it just doesn't work for stockable variants.

Does anybody have any ideas on this? Is it a bug?

Thanks in advance,
Andy


PS Joomla Day UK in Ascot on 5/6th October 2013 - http://www.joomladay.co.uk
Title: Re: What bugs do you know of in stockable variants plugin
Post by: ypnetwork on August 13, 2013, 21:22:14 pm
hello


I have for some time problems with the stock. Here are the two problems:

1 Amount does not draw properly from:
If you on a product. e.g. Surfshirt buys a piece, it attracts only the Produktvariannte (the size of) a piece and not even in the main product. It would have to pull off a piece at both places.

2 Incorrect ordering quantities:
It is possible two surf shirt to order in size XS XS though when the amount is set to 1. The system looks just how much the Gesammtproduktmenge is the main product. The system should determine the future for the respective variables in the Produktvariannte the possible order quantity and not the main product.


How can I fix this?

I use the following plugins and Modlue:


plugins:

VM - Custom, product specification
VM - Custom, stock viable variants
VM - Custom, customer textInputStyleFilters
VM - Payment, Authorize.net
VM - Payment, Paypal
VM - Payment, Payzen
VM - Payment, Default
VM - Payment, SystemPay
VM - Shipper, By weight, ZIP and countries
VM - Shipment, By weight, ZIP and countries


modules:

For as modules, only because I have activated your shopping cart. The plugins and modules are up to date, and the date and the Joomla Virtuemart.




Sorry for my bad english

thanks in advance and greetings

Daniel Ammann
Title: Re: What bugs do you know of in stockable variants plugin
Post by: bunglehaze on August 14, 2013, 00:08:48 am
The custom stockable field and child variant plugins just plain do not work well at all. It is an infuriating system to use, when you eventually hash something together that does kinda work it breaks on a whim. I just updated to the latest 2.0.22 and now for some strange reason half of my products are choosing a child product from another parent, the backend still shows the child products all being correct  frontend is a totally different product.

**Just found this, when a product has related items selected it overrides the child product with the related item IF the related item  is also a parent item itself**

I do not understand how the stockable field needs to have each stockable option listed in the plugin and yet still works using a child product - why? It seems that VM keeps getting a slating during Joomla meetings, training days etc purely on the basis of this custom attributes system and I do not get how it has not just been ripped out and totally rewritten using a system based on an ecommerce system that is applauded for custom field handling. Most other issues with VM2 have been well dealt with and the system as a whole is really well executed now.

Child products setup works if you fiddle about with it but in the admin area the child products are shown by default in the full list, in the frontend they are shown in the category which is just strange - if you have a massive list of child products but only 4 parents you would usually only want those parent products showing up and the child products are displayed in the parent - why is there not an option to hide and group child products in both the backend and frontend?

The backend already has a link to child product of > *parent link*

A tick box in the backend perhaps that says "show all child products" would make that much simpler.

Why the stockable and child variant plugins are still strange:

I have a product called a eGo ce4+ ecig kit, it comes in 4 kit options already setup as child products . For the purpose of this explanation those would be.

Battery only

Deluxe Kit

Deluxe Kit 2

For this I use the child variant plugin. Each dropdown reloads the page to select the child product, not a huge problem but a little bit annoying for a user and adds page load time. Using the stockable plugin loads child products and options without needing a page reload but you seem to need to input the options before and for kits it is not usable. Really this functionality should all be handled in a single process, it should be able to dynamically add and edit options and just be able to choose what you want it to perform.

Title: Re: What bugs do you know of in stockable variants plugin
Post by: PolishedGeek on August 14, 2013, 00:51:45 am

I do not understand how the stockable field needs to have each stockable option listed in the plugin and yet still works using a child product - why? It seems that VM keeps getting a slating during Joomla meetings, training days etc purely on the basis of this custom attributes system and I do not get how it has not just been ripped out and totally rewritten using a system based on an ecommerce system that is applauded for custom field handling. Most other issues with VM2 have been well dealt with and the system as a whole is really well executed now.


I've been told that the custom fields functionality is getting a major rewrite in v2.2, due out in a few months last I chatted with Max. I'm looking forward to seeing how the new fields work.

I suspect, however, that most of the custom field plugins and addons will not be backwards compatible. It remains to be seen, but if the custom field overhaul is extensive there are probably going to be several extensions that have to be upgraded to work with the new system. Or they might not be needed at all anymore, if v2.2 includes their capabilities. I know that being able to mark custom fields as required has been a very popular request, so I imagine that might be included in VM 2.2.

Would love to see a coming-soon feature list for the new custom fields when Max & company are comfortable publishing it. :)
Title: Re: What bugs do you know of in stockable variants plugin
Post by: bunglehaze on August 14, 2013, 01:07:04 am
Deb, a full overhaul is what is needed. I know Max mentioned this was happening before but that must have been getting close to a year ago now so I assumed that whatever changes had been done and not much had changed. A year is a long time for people to have a hamstrung system to work with and like I say it is a real shame as it really casts a huge black cloud over what is overall a good product.

I have been waiting to re-configure a whole section of my site for well in excess of a year now because the current system would just not do the job, I thought about migrating to Mijoshop but decided against it after Max mentioned the changes a while back and being a long time user of VM I wanted to stick with what I know. I personally cannot wait to see if this overhaul addresses - NO - kicks into touch all of the gripes haunting VM since the 2.0 release.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 19, 2013, 22:49:49 pm
Answered my own question here, did a backup version of the site and managed to successfully update to v22a. Still not adding weight info to the cart for child products though.

Any ideas?

Try the attached version.

OpenGlobal E-commerce

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: escapezone on August 29, 2013, 23:57:55 pm
Hello!

I am using : Joomla 2.5.14 and Virtuemart 2.0.22b

I have created a product with 2 colors (stockable). Each color has quantity 12

For example :

Blue color quantity 12
Green color quantity 12

If i put 12 blue in my cart and then go to put 12 green , it doesn't let me to put other color..

it is like the stockable.php takes the maximum quantity 12 of the first color and then it doesn't let you put other color...

Imaging that you hane a clothes shop and someone wants to buy 1 small and 1 minimum size and you have exactly those available in your invertory,  he/she wont be able to put in the cart more than one size..

I hope you understand the problem , if you don't, ask me for more info.

Thank you!
Title: Re: What bugs do you know of in stockable variants plugin
Post by: tuki on August 30, 2013, 10:16:49 am
I found a tutorial for the child product with working stock control. The only differenct is not to use ajax refreshing (page reload).

Watch it here:
http://awebsupport.com/vm2-set-up-child-product-with-stock-control
Title: Re: What bugs do you know of in stockable variants plugin
Post by: khuzemav201 on September 23, 2013, 11:03:35 am
got your files from http://forum.virtuemart.net/index.php?topic=103561.0

i was having the same problem :
I make a fabric type options with custom fields, and i set SHOP CONFIGURATIO to 'Show Notify me instead Add to Cart', but the plugin not show options that are out of stock, and if I set parent product to stock 0 it show the Notify button instead add to cart, otherwise this only hide the options that are out of stock.

This is wrong.

I wanna that show all options, and when I seletc a size that are out of stock, this hide Add to Cart button and show Notify Me.

the file given in attachement did solve half the case it now auto calculate stock but when i select custom field which is out of stock it still shows in stock when i add it to cart but product are not adding in card.
secont i am no more able to visit checkout page or edit any product in admin after updating product.php

joomla 2.5.14
VM 2.0.22d

can you please help
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Florentp on September 23, 2013, 12:03:45 pm
The Stock handling for Order Status don't seems to work when i set it to "reserved".
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on September 23, 2013, 17:28:44 pm
khuzemav201, can you provide a link?

Florentp, sorry, I don't understand what you mean.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Florentp on September 23, 2013, 17:58:09 pm
khuzemav201, can you provide a link?

Florentp, sorry, I don't understand what you mean.

OpenGlobal E-commerce

Sorry...

VM -> Configuration -> Order Status
For "pending" status, if i set the "Stock handling" parameter to "Is reserved", it's not working.
The stock is still available, people still can put it on their cart.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: khuzemav201 on September 24, 2013, 09:38:23 am
khuzemav201, can you provide a link?

Florentp, sorry, I don't understand what you mean.

OpenGlobal E-commerce

http://mgeezz.com i have currently removed the modification can i pm you and provide my admin and ftp credentials
Title: Re: What bugs do you know of in stockable variants plugin
Post by: farangprod on September 25, 2013, 06:19:42 am
Hi,

I have few troubles with  stockable variants plugin...
I am using : Joomla 2.5.14 and Virtuemart 2.0.22d

1° I can't sort options and sometimes options comeas an unordered list.
2° The parent stock is not updated when i change children stock (parent stock stays to 0 even with 9 children items availables)
3° After adding a product in cart, if there isn't available stock anymore, the "add to cart" button is still here but on click it says 0 product added in cart. I would like to see "notify me " instead of button... jquery doesn't update status
4° in the dropdown list, if i have only one option (only one color for example) i would like to not show the dropdown list and select automatically the unique option available.

Hope you can help me to solve these problems.
Thanks a lot !

here is a link: http://absolutkiteboarding.farangprod.com/view/productdetails/virtuemart_product_id/85/virtuemart_category_id/36 (http://absolutkiteboarding.farangprod.com/view/productdetails/virtuemart_product_id/85/virtuemart_category_id/36)
Title: Re: What bugs do you know of in stockable variants plugin
Post by: sandstorm on September 25, 2013, 14:44:46 pm
When using stockable variants, we cant seem to use multiple prices easily.
I want to add a special price for s special shopper group for all my products. 
I can imprt these prices OK using CSVi and they display ordered in the backend so that default price shows first then the new shoppergroup price.
But when you are logged in the front of VM as the shoppergroup user. The price firstly seems OK when you look in category view, but when you look at product view, the price reverts after 1/2 second or so backto the default price.

This only happens on products that are set up as parent/child using the stockable variant plugin.

I have found that manually changing the order of the price so that default price is in last place, fixes, the problem, but I'm not sure why this should matter?

Also there is no way via CSVi or in the databse itself to reorder large number of prices?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on September 25, 2013, 15:08:00 pm
When using stockable variants, we cant seem to use multiple prices easily.
I want to add a special price for s special shopper group for all my products. 

Shopper groups are not supported in the stockable variants plugin.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: sandstorm on September 25, 2013, 15:13:26 pm
Shopper groups are not supported in the stockable variants plugin.
Is there any way to get this to work or get it supported?
It seems pretty daft that you can set these products up and then use the shopper group functions?

I have got it working manually by, manually reordering products, so that default price always shows last, This then works, but I cant manually reorder these for 1000's of products

EDIT

I have managed to get this working now, so feel free to close this topic.

Deleted all prices
Imported all prices 3 times for - Anonymous, Default & Shopper group
Set up shopper group (and leave checkbox to display prices)

Then when not logged in, logged in as regular shopper or special shopper group, everyone see's there own correct prices.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on September 25, 2013, 15:21:54 pm
Only by reprogramming the plugin yourself. Shopper groups weren't a part of VM when this plugin was first created and it was literally only meant to deal with stock control.

If you use the Generic child variant instead of the stockable plugin, it will handle shopper groups no problem, but you won't have the ajax dropdowns. (Not until I add that functionality to the Generic Child Variant for the 2.2 release anyway).

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: khuzemav201 on September 26, 2013, 07:28:26 am
I have few troubles with  stockable variants plugin with  Joomla 2.5.14 and Virtuemart 2.0.22d


here is a link of one of my product for example : http://mgeezz.com/bags-and-purses/fashion-handbag-4235-detail.html

in the above product in dropdown / child product: product CF-150 have 0 in stock / product CF-120 have 5 in stock / product CF-142 have 5 in stock
but on selecting any of the product from list neither sku updates nor stock of that particular product. and if i select product CF-150 which is 0 in stock the button does not change to notify me but remains add to cart.



can you please help me on this, your help is very much appreciated.
thanx in advance


 
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on September 30, 2013, 23:02:35 pm
The parent stock is not updated when i change children stock (parent stock stays to 0 even with 9 children items availables)

That is correct, otherwise your total stock would be twice as much as you actually have.

After adding a product in cart, if there isn't available stock anymore, the "add to cart" button is still here but on click it says 0 product added in cart. I would like to see "notify me " instead of button... jquery doesn't update status

You need to set that option in Configuration > Configuration > Shopfront > Action when a Product is Out of Stock

jquery doesn't update product sku on selecting product from list or update stock quantity of that particular product

That is correct. The plugin doesn't know where the product SKU appears on your template so it can't update that data. This plugin is not design to be a replacement for the Generic Cart Variant, it is literally just to add stock control to a dropdown option.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: farangprod on October 02, 2013, 16:42:31 pm
That is correct, otherwise your total stock would be twice as much as you actually have.
anyway, it doesn't work for me...
i have 18 children with 2 options (6 choices and 3 choices) with 2 products in stock for each.
normally i could add in cart every product in stock.... i can only add 2 .
after that, even when i choose another option it add none in cart.
i did many test and what i found is:
the stock of products refers to the first option selected product only and for adding or not, it compares his available stock with the number of children allready in cart (even if it's not the same product).
example:

children products:

1. kite 4m² black : 2 in stock
2. kite 4m² white : 2 in stock
3. kite 8m² black : 4 in stock
4. kite 8m² white : 4 in stock

if i add in cart 2 product 1. :
can't add product 2.
can add only 2 product 3. or 4.

if i add in cart 2 product 1. and 2 product 3.
can't had product 2.
can't add more product 3.
can't add product 4.



You need to set that option in Configuration > Configuration > Shopfront > Action when a Product is Out of Stock

it's allready done... i choose "send a message when availibity" (not sure of the exact sentence... i have it in french)
from the example above, if i add in cart 2 product 1.
Normally, the addtocart button have to disappear and the the link "send me a message..." must be shown, no?
instead of this, the addtocart button is still there and onclick the modal says "0 item add in cart"



That is correct. The plugin doesn't know where the product SKU appears on your template so it can't update that data. This plugin is not design to be a replacement for the Generic Cart Variant, it is literally just to add stock control to a dropdown option.

it doesn't matter where is the SKU is in the template, just have to identify sku var with an id and it will be easy to find it and replace it.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on October 04, 2013, 09:40:30 am
I have added the code (from page 14) to get the child product weight added to the cart, but actually my problem is the opposite:

The changes from Page 14 were for an old version of VirtueMart, I'm surprised your system still works at all.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: roojai on October 04, 2013, 09:48:37 am
I have added the code (from page 14) to get the child product weight added to the cart, but actually my problem is the opposite:

The changes from Page 14 were for an old version of VirtueMart, I'm surprised your system still works at all.

OpenGlobal E-commerce

I just removed my message and saw yours. Thanks.

I put an updated copy of stockable.php in place and it all works now.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on October 04, 2013, 10:15:38 am
anyway, it doesn't work for me...

Can you provide a link. Your previous link is a completely different page now.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: roojai on October 04, 2013, 10:40:27 am
I am not sure if this is a bug of the stockable variants plugin itself or a VM problem, or just a configuration but:

If you use stockable variants and a child is out of stock, then the "notify me" button is displayed when that option is selected - all good! But if you click the notify me button, and submit your email address, you then get redirected to the child, and not the parent, so you end up on a product that may not have its own image or description etc...

Likewise, if an email is sent out to people that have been requested to be notified, the link back goes to the child, and not the parent.

Is there anyway to avoid this?

Thanks
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on October 04, 2013, 10:43:52 am
Hi,

That's a good point. At the moment, I don't think there is a way around that so I'll have to look into this further.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: roojai on October 04, 2013, 10:46:53 am
OK fair enough.


I will just try to figure out a way to edit the "notify me" section and replace with a message like "new stock coming soon"
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on October 04, 2013, 10:47:52 am
You could use the "availability" method if you just want to display a message.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: farangprod on October 04, 2013, 12:11:32 pm
You can check it here:

http://absolutkiteboarding.farangprod.com/view/productdetails/virtuemart_product_id/141/virtuemart_category_id/3 (http://absolutkiteboarding.farangprod.com/view/productdetails/virtuemart_product_id/141/virtuemart_category_id/3)

all 10m² kites have 0 product in stock
the 4m² black kite has 4 products in stock
all other ones have 2 products in stock

Thanks
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on October 04, 2013, 12:33:37 pm
I can't replicate your problem. I can't order any 10m2 ones. I can order 4 black 4m2 and 2 white 4m2.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: farangprod on October 04, 2013, 17:58:03 pm
I can't replicate your problem. I can't order any 10m2 ones. I can order 4 black 4m2 and 2 white 4m2.

OpenGlobal E-commerce

i have updated vm to 2.0.24 and now, you're right, idon't have this problem anymore... i just can add 10 items in cart even if i have only 2 in stock!
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Florentp on October 15, 2013, 15:55:40 pm
Something weird that i never complain about before... The fact that stockable variants plugin add thousands of javascript lines in my categories pages.
For example on this page : beta.indienboutique.fr/fr/homme/t-shirts

Stockable variants plugin add like 4000 javascript lines on the page ! It's huge !
Can it be lighter, or maybe in a separated file ?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on October 15, 2013, 16:01:36 pm
Unfortunately no. Because you can order from the category page, every product needs to have it's javascript added to the category page too.

The ability to order from the category page was added fairly recently compared to the stockable functionality. It would be better to rewrite the whole stockable plugin so that the javascript doesn't need to be added for each product individually. But we're intending to rewrite the Generic Cart Variant to combine the functionality instead.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Florentp on October 15, 2013, 16:55:27 pm
What about add an option to active or unactive the insert of javascript code for website like mine,
which are not using a "add to cart" fuction directly from category page ?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Limonbay on October 30, 2013, 13:03:50 pm
Hi,

I have just upgraded to 2.0.24 and I have this problem with stockable.php:

If you are using stockable variants and have got 5 T-shirts, 2 black and 3 white. If you select 3 black, it will add only 2 (which is ok), but if you Add to Cart again, you get 4 into the cart (which is wrong), It never should be more than 2 and a "Notify me" sign should show up. I have already set this option in VM>Configuration

I have tried this code below but If I use it I get a blank page in 2.0.24

Is it any way to solve this issue? Thanks

Quote
For those who also want to prevent users from adding more items than you have in stock to their cart (by clicking the Add to Cart button multiple times), change the plgVmOnAddToCart() function in stockable.php (near the end of the file) to the following:
Code: [Select]
public function plgVmOnAddToCart(&$product){
$customPlugin = JRequest::getVar('customPlugin',0);

if ($customPlugin) {
$db = JFactory::getDBO();
$query = 'SELECT  C.* , field.*
FROM `#__virtuemart_customs` AS C
LEFT JOIN `#__virtuemart_product_customfields` AS field ON C.`virtuemart_custom_id` = field.`virtuemart_custom_id`
WHERE `virtuemart_product_id` =' . $product->virtuemart_product_id.' and `custom_element`="'.$this->_name.'"';
$query .=' and is_cart_attribute = 1';
$db->setQuery($query);
$productCustomsPrice = $db->loadObject();
if (!$productCustomsPrice) return null;
// if ( !in_array($this->_name,$customPlugin[$productCustomsPrice->virtuemart_custom_id]) ) return false;
$selected = $customPlugin[$productCustomsPrice->virtuemart_customfield_id]['stockable']['child_id'];

if (!$child = $this->plgVmCalculateCustomVariant($product, $productCustomsPrice,$selected) ) return false;
if ($child->product_sku)
$product->product_sku = $child->product_sku;
if ($child->product_name)
$product->product_name = $child->product_name;
$product->product_in_stock = $child->product_in_stock;

$this->stockhandle = VmConfig::get('stockhandle','none');
if ('disableit' == $this->stockhandle || 'disableit_children' == $this->stockhandle || 'disableadd' == $this->stockhandle) {
if (!class_exists ('VirtueMartCart')) {
require(JPATH_VM_SITE . DS . 'helpers' . DS . 'cart.php');
}
$cart = VirtueMartCart::getCart ();print_r($product);print_r($cart);

$orderedQuantity = $product->quantity;
foreach ($cart->products as $cartProduct) {
if ($cartProduct->virtuemart_product_id == $product->virtuemart_product_id) {
$orderedQuantity += $cartProduct->quantity;
if ($orderedQuantity > $product->product_in_stock) {
return false;
}
}
}
}
}
}
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on October 30, 2013, 22:28:09 pm
Here is the latest version that I have, not sure if this is the same as 2.0.24.

OpenGlobal E-commerce

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Limonbay on October 31, 2013, 12:30:46 pm
Thanks OpenGlobal,

I have changed my stockable.php for yours but the product doesn't get added to the cart and I get a pop up saying "Continue shopping - Undefined" and nothing happens.  :P
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on October 31, 2013, 15:01:36 pm
Can you give me a link.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Limonbay on November 01, 2013, 13:11:44 pm
Here's a link with an example (http://testlimonbay.esgenial.org/index.php/shop/all-categories/skateboards/zero-3-skull-blood-white-complete-skateboard-7-75-x-31-5-detail)   :)

I have also noticed that after update to 2.0.24 prices don't show up in the product page (as you'll see in the linked page)
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Jörgen on November 01, 2013, 13:35:34 pm
Hello :)

Works good with Firefox 25.0 and with Explorer 8.06, both on Windows XP. But the first product takes a veeeeery long until it drops into the basket on IE 8.
I can add both verde and bianco versions of the skateboards. New lines added for each addition. But the price is hidden though.

regards

Jörgen @ Kreativ Fotografi
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Limonbay on November 01, 2013, 13:53:07 pm
Thank you Jörgen,

The problem is that now I have a stock of 3 products in green and 5 in blue. If you press "Add to cart" again and again, it will add them regardless of the real available stock.


Title: Re: What bugs do you know of in stockable variants plugin
Post by: Jörgen on November 01, 2013, 14:08:41 pm
Hello Limonbay

I thought Your last reply said "Continue shopping - Undefined", so I didn´t check the stock values.

I can only add 2 of the blue = blanco ???, shouldn´t it say white ???
and 3 of the green = verde at one time, but repeatedly I can add this time after time into the shopping cart.

It looks like the stock control is only executed once per row in the shopping cart, not per SKU.

I have not tested what will happen when I come to checkout, but I believe there will be a negative stock :(

regards


Jörgen @ Kreativ Fotografi
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Limonbay on November 01, 2013, 14:55:46 pm
Quote
I thought Your last reply said "Continue shopping - Undefined"

That was if I use stockable.php proposed by OpenGlobal. If I use the original 2.0.24 version it has this price not shown and stock control problem.  :)
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on November 02, 2013, 15:08:33 pm
I'm not seeing the "Continue shopping - Undefined" message on your link and it looks like all of the products have the price missing, not just the stockable plugin ones. Is it a problem iwth your template?

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Limonbay on November 02, 2013, 20:49:52 pm
Hi OpenGlobal,

I have the same problem with joomla default template. Example (http://testlimonbay.esgenial.org/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=3&virtuemart_category_id=1&Itemid=)
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on November 02, 2013, 23:41:33 pm
I'm not seeing it on that site either.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Limonbay on November 03, 2013, 19:49:43 pm
Yes, that's correct. The sign "continue shopping - undefined" just appeared when I used your stockable.php file.

If I use 2.0.24 version as it comes in VM I get this result (not price and adding to cart more than stock) with my template and in joomla template.

So the problem is how to fix this problem or how to get a working stockable.php

Thanks!
Title: Re: What bugs do you know of in stockable variants plugin
Post by: inu2005 on November 04, 2013, 01:32:55 am
When using the stockable variants plugin I don't understand how I can change the sorting order/rearranging of child products in the dropdownbox.
This is a BIG PROBLEM (bug??) and I read a lot of posts from people who are struggling with this issue since more than a year ago and there has never been given a real solution.

Example:
If I have created earlier child products S/M/L in that order and I want to add XS later it will be visible in the dropdownbox like: S/M/L/XS.
It must be possible to rearrange the order to: XS/S/M/L, but I don's see how I can do this.
I see there is a child product ordering option down the Product Information Tab, but that does not seem to change the order in the dropdownbox.
New created child products also seems to be listed randomly. Who can help???

I use Virtuemart 2.0.24 / Joomla 2.5.14
Title: Re: What bugs do you know of in stockable variants plugin
Post by: maxispin on November 04, 2013, 09:57:41 am
Quote
I thought Your last reply said "Continue shopping - Undefined"

That was if I use stockable.php proposed by OpenGlobal. If I use the original 2.0.24 version it has this price not shown and stock control problem.  :)
Thanks OpenGlobal,

I have changed my stockable.php for yours but the product doesn't get added to the cart and I get a pop up saying "Continue shopping - Undefined" and nothing happens.  :P

ver 2.0.24

479         foreach ($plgParam as $attributes)

OpenGlobal's ver

479         foreach ($plgParam as $k => $attributes)
Title: Re: What bugs do you know of in stockable variants plugin
Post by: maxispin on November 04, 2013, 10:08:33 am
When using the stockable variants plugin I don't understand how I can change the sorting order/rearranging of child products in the dropdownbox.
This is a BIG PROBLEM (bug??) and I read a lot of posts from people who are struggling with this issue since more than a year ago and there has never been given a real solution.

Example:
If I have created earlier child products S/M/L in that order and I want to add XS later it will be visible in the dropdownbox like: S/M/L/XS.
It must be possible to rearrange the order to: XS/S/M/L, but I don's see how I can do this.
I see there is a child product ordering option down the Product Information Tab, but that does not seem to change the order in the dropdownbox.
New created child products also seems to be listed randomly. Who can help???

I use Virtuemart 2.0.24 / Joomla 2.5.14

I have also found this problem: http://forum.virtuemart.net/index.php?topic=119846.msg407982#msg407982.

The ordering is missing a function doing that.  Now it seems that the options are ordered based on the id of child.

Thus, the plugins stockable variant with child products is unusable.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Limonbay on November 04, 2013, 19:37:37 pm
Hi Maxispin,

Thanks for your answer.
Code: [Select]
ver 2.0.24

479         foreach ($plgParam as $attributes)

OpenGlobal's ver

479         foreach ($plgParam as $k => $attributes)

Actually both versions gave me toubles and didn't work for me. Excuse my ignorance in php. How should I apply the info you are providing me?

Thanks!
Title: Re: What bugs do you know of in stockable variants plugin
Post by: inu2005 on November 05, 2013, 09:32:37 am
Quote
Thus, the plugins stockable variant with child products is unusable.

That is is BIG SHORTCOMING of Virtuemart to my opinion and a BIG PROBLEM for my website. 
If new options are added and the order is not logical, the only way to change the order is to change/remake all child items (rename, etc.). This is CRAZY !

Isn't there a developer who can can make a function that can reorder the options in the dropdownbox?
I'm willing to pay if that helps.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: drukman2000 on November 05, 2013, 11:47:00 am
Here's how to get weight & dimensions for stockable variants passed into the cart! :)

Open plugins/vmcustom/stockable/stockable.php

REPLACE THIS CODE:

Code: [Select]
public function plgVmOnAddToCart(&$product){
$customPlugin = JRequest::getVar('customPlugin',0);

if ($customPlugin) {
$db = JFactory::getDBO();
$query = 'SELECT  C.* , field.*
FROM `#__virtuemart_customs` AS C
LEFT JOIN `#__virtuemart_product_customfields` AS field ON C.`virtuemart_custom_id` = field.`virtuemart_custom_id`
WHERE `virtuemart_product_id` =' . $product->virtuemart_product_id.' and `custom_element`="'.$this->_name.'"';
$query .=' and is_cart_attribute = 1';
$db->setQuery($query);
$productCustomsPrice = $db->loadObject();
if (!$productCustomsPrice) return null;
// if ( !in_array($this->_name,$customPlugin[$productCustomsPrice->virtuemart_custom_id]) ) return false;
$selected = $customPlugin[$productCustomsPrice->virtuemart_customfield_id]['stockable']['child_id'];

if (!$child = $this->plgVmCalculateCustomVariant($product, $productCustomsPrice,$selected) ) return false;
if ($child->product_sku)
$product->product_sku = $child->product_sku;
if ($child->product_name)
$product->product_name = $child->product_name;
$product->product_in_stock = $child->product_in_stock;
}
}

WITH THIS CODE:

Code: [Select]
public function plgVmOnAddToCart(&$product){
$customPlugin = JRequest::getVar('customPlugin',0);

if ($customPlugin) {
$db = JFactory::getDBO();
$query = 'SELECT  C.* , field.*
FROM `#__virtuemart_customs` AS C
LEFT JOIN `#__virtuemart_product_customfields` AS field ON C.`virtuemart_custom_id` = field.`virtuemart_custom_id`
WHERE `virtuemart_product_id` =' . $product->virtuemart_product_id.' and `custom_element`="'.$this->_name.'"';
$query .=' and is_cart_attribute = 1';
$db->setQuery($query);
$productCustomsPrice = $db->loadObject();
if (!$productCustomsPrice) return null;
// if ( !in_array($this->_name,$customPlugin[$productCustomsPrice->virtuemart_custom_id]) ) return false;
$selected = $customPlugin[$productCustomsPrice->virtuemart_customfield_id]['stockable']['child_id'];

if (!$child = $this->plgVmCalculateCustomVariant($product, $productCustomsPrice,$selected) ) return false;

if ($child->product_sku)       $product->product_sku       = $child->product_sku;
if ($child->product_name)    $product->product_name    = $child->product_name;
$product->product_in_stock = $child->product_in_stock;  // Override this even if null.

if ($child->product_weight)    $product->product_weight = $child->product_weight;
if ($child ->product_weight_uom) $product->product_weight_uom = $child->product_weight_uom;
if ($child->product_length) $product->product_length = $child->product_length;
if ($child->product_width) $product->product_width = $child->product_width;
if ($child->product_height) $product->product_height = $child->product_height;
if ($child->product_lwh_uom) $product->product_lwh_uom = $child->product_lwh_uom;
// if ($child->min_order_level) $product->min_order_level = $child->min_order_level;
// if ($child->max_order_level) $product->max_order_level = $child->max_order_level;
}
}


THEN REPLACE THIS CODE:

Code: [Select]
function getValideChild($child_id ) {
$db = JFactory::getDBO();
$q = 'SELECT `product_sku`,`product_name`,`product_in_stock`,`product_ordered`,`product_availability` FROM `#__virtuemart_products` JOIN `#__virtuemart_products_'.VMLANG.'` as l using (`virtuemart_product_id`) WHERE `published`=1 and `virtuemart_product_id` ='.(int)$child_id ;
$db->setQuery($q);
$child = $db->loadObject();
if ($child) {
if ('disableit_children' === $this->stockhandle) {
$stock = $child->product_in_stock - $child->product_ordered ;
if ($stock>0)return $child ;
else return false ;
}
else return $child ;
}
return false ;
}

WITH THIS CODE:

Code: [Select]
function getValideChild($child_id ) {
$db = JFactory::getDBO();
$q = 'SELECT `product_sku`,`product_name`,`product_in_stock`,`product_ordered`,`product_availability`,`product_weight`,`product_weight_uom`,`product_length`,`product_width`,`product_height`,`product_lwh_uom` FROM `#__virtuemart_prfoducts` JOIN `#__virtuemart_products_'.VMLANG.'` as l using (`virtuemart_product_id`) WHERE `published`=1 and `virtuemart_product_id` ='.(int)$child_id ;
$db->setQuery($q);
$child = $db->loadObject();
if ($child) {
if ('disableit_children' === $this->stockhandle) {
$stock = $child->product_in_stock - $child->product_ordered ;
if ($stock>0)return $child ;
else return false ;
}
else return $child ;
}
return false ;
}


Notice I commented out a few lines in the first edited function, but you could uncomment them and add those columns (and any others) to the db query in the second function to pull more values from the child to the product added to the cart.

I suggest this be added to the core.  However, it might be best if there were additional parameter options for the custom stockable variants plugin on the backend that lets you choose which values you would like the child to override for the parent.

After you make those changes your weight / dimension based shipping rules should work correctly for any new products added to the cart.

The modified default stockable.php is attached.  Hope this helps someone!  Took me a little while to figure it out.    :)

 :D

Have been through all 18 pages of this very useful thread (highest regards to the OP for taking so much time on this) and was thanked for my efforts at page 14 where the shipping weights problem I am having popped up. Unfortunately this fix is not working for the version of VM (2.0.20b) that I am using.

I am selling products with Weight variants, 1kg, 5kg, 15kg and each weight costs a different amount to ship. Of course without change, the cart only calculates the shipping weight of the parent item which is useless.

When I applied the fix about I lost my dropdown box all together so I'm guessing it need re-approaching for the newer versions of VM.

Quite surprised this has not been implemented yet. Any ideas anyone?

All,

I managed to fix the weight & dimensions issue.
Now ALL Stockable Variants are passed into the cart.
Also the shipment fee is fixed & calculated correctly.
I will attach the amended stockable.php in the next message.

All the best - Drukman.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: drukman2000 on November 05, 2013, 12:02:54 pm
All,

Attached is the amended stockable.php.
It solve the weight & many other dimensions issues.
Now ALL Stockable Variants are passed into the cart correctly.
As a result now for example you may charge shipment according to weight.

All the best - Drukman.

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on November 05, 2013, 13:28:07 pm
Yes, that's correct. The sign "continue shopping - undefined" just appeared when I used your stockable.php file.

If I use 2.0.24 version as it comes in VM I get this result (not price and adding to cart more than stock) with my template and in joomla template.

So the problem is how to fix this problem or how to get a working stockable.php

Thanks!

If I can't see the problem, I can't fix it.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Limonbay on November 05, 2013, 13:47:19 pm
The problem is that if you repeatedly press Add to Cart, it will add the selected products to the cart, even if they are not in stock.

Also the price is not showing up. This happens in my template and in joomla default template.

I attach my stockable.php just in case.


[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on November 05, 2013, 14:07:01 pm
Those problems are fixed in the version that I attached. I'm talking about the "undefined" bug.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Limonbay on November 05, 2013, 15:14:42 pm
Hi Openglobal,

I have just put your stockable.php again. I don't get that message now. I think that I had not set the shipment and payment method, maybe that was the reason?

Now if you see this example (http://testlimonbay.esgenial.org/index.php/shop/all-categories/skateboards/zero-3-skull-blood-white-complete-skateboard-7-75-x-31-5-detail), (with your file) prices don't show up, the same with stock left for each product and the "Show cart" sign.

Thanks!
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on November 05, 2013, 15:26:53 pm
The prices aren't showing up for any products on that site, whether they use the stockable plugin or not.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: maxispin on November 05, 2013, 17:32:38 pm
All,

Attached is the amended stockable.php.
It solve the weight & many other dimensions issues.
Now ALL Stockable Variants are passed into the cart correctly.
As a result now for example you may charge shipment according to weight.

All the best - Drukman.

Thanks Drukman!
Title: Re: What bugs do you know of in stockable variants plugin
Post by: drukman2000 on November 06, 2013, 07:15:27 am
All,

Attached is the amended stockable.php.
It solve the weight & many other dimensions issues.
Now ALL Stockable Variants are passed into the cart correctly.
As a result now for example you may charge shipment according to weight.

All the best - Drukman.

Thanks Drukman!

Hi maxispin,

It is my pleasure.

Drukman
Title: Re: What bugs do you know of in stockable variants plugin
Post by: rhks8 on November 18, 2013, 09:10:13 am
When using the stockable variants plugin I don't understand how I can change the sorting order/rearranging of child products in the dropdownbox.
This is a BIG PROBLEM (bug??) and I read a lot of posts from people who are struggling with this issue since more than a year ago and there has never been given a real solution.

Example:
If I have created earlier child products S/M/L in that order and I want to add XS later it will be visible in the dropdownbox like: S/M/L/XS.
It must be possible to rearrange the order to: XS/S/M/L, but I don's see how I can do this.
I see there is a child product ordering option down the Product Information Tab, but that does not seem to change the order in the dropdownbox.
New created child products also seems to be listed randomly. Who can help???

I use Virtuemart 2.0.24 / Joomla 2.5.14

I have also found this problem: http://forum.virtuemart.net/index.php?topic=119846.msg407982#msg407982.

The ordering is missing a function doing that.  Now it seems that the options are ordered based on the id of child.

Thus, the plugins stockable variant with child products is unusable.

I have had a go at fixing this and have found the following solution:

Open \plugins\vmcustom\stockable\stockable.php

Around line 532 you should see the following query:
Code: [Select]
$q = 'SELECT CONCAT( `product_name`, " [' .JText::_('COM_VIRTUEMART_PRODUCT_SKU').'"," : ",`product_sku`,"]") as product_name,`virtuemart_product_id` as id, `product_in_stock` as stock FROM `#__virtuemart_products_'.VMLANG.'` as l '
. ' JOIN `#__virtuemart_products` AS p using (`virtuemart_product_id`)'
. 'WHERE `product_parent_id` ='.(int)$child_id;

On the next line add

Code: [Select]
$q.= ' ORDER BY `pordering`';
So you should end up with

Code: [Select]
$q = 'SELECT CONCAT( `product_name`, " [' .JText::_('COM_VIRTUEMART_PRODUCT_SKU').'"," : ",`product_sku`,"]") as product_name,`virtuemart_product_id` as id, `product_in_stock` as stock FROM `#__virtuemart_products_'.VMLANG.'` as l '
. ' JOIN `#__virtuemart_products` AS p using (`virtuemart_product_id`)'
. 'WHERE `product_parent_id` ='.(int)$child_id;
$q.= ' ORDER BY `pordering`';

Now when editing a product in the VM admin area, under the 'Product Information' tab you can set the ordering of child products.  Save.  This should carry through to the custom fields tab and the dropdown lists shown on the front end.

I hope this helps (it sure gave me a headache).
Title: Re: What bugs do you know of in stockable variants plugin
Post by: inu2005 on November 20, 2013, 15:06:35 pm
rhks8 YOU ARE GREAT !!! This issue is SOLVED !!! The VM team should be notified about this.

When using the stockable variants plugin I don't understand how I can change the sorting order/rearranging of child products in the dropdownbox.
This is a BIG PROBLEM (bug??) and I read a lot of posts from people who are struggling with this issue since more than a year ago and there has never been given a real solution.

Example:
If I have created earlier child products S/M/L in that order and I want to add XS later it will be visible in the dropdownbox like: S/M/L/XS.
It must be possible to rearrange the order to: XS/S/M/L, but I don's see how I can do this.
I see there is a child product ordering option down the Product Information Tab, but that does not seem to change the order in the dropdownbox.
New created child products also seems to be listed randomly. Who can help???

I use Virtuemart 2.0.24 / Joomla 2.5.14

I have also found this problem: http://forum.virtuemart.net/index.php?topic=119846.msg407982#msg407982.

The ordering is missing a function doing that.  Now it seems that the options are ordered based on the id of child.

Thus, the plugins stockable variant with child products is unusable.

I have had a go at fixing this and have found the following solution:

Open \plugins\vmcustom\stockable\stockable.php

Around line 532 you should see the following query:
Code: [Select]
$q = 'SELECT CONCAT( `product_name`, " [' .JText::_('COM_VIRTUEMART_PRODUCT_SKU').'"," : ",`product_sku`,"]") as product_name,`virtuemart_product_id` as id, `product_in_stock` as stock FROM `#__virtuemart_products_'.VMLANG.'` as l '
. ' JOIN `#__virtuemart_products` AS p using (`virtuemart_product_id`)'
. 'WHERE `product_parent_id` ='.(int)$child_id;

On the next line add

Code: [Select]
$q.= ' ORDER BY `pordering`';
So you should end up with

Code: [Select]
$q = 'SELECT CONCAT( `product_name`, " [' .JText::_('COM_VIRTUEMART_PRODUCT_SKU').'"," : ",`product_sku`,"]") as product_name,`virtuemart_product_id` as id, `product_in_stock` as stock FROM `#__virtuemart_products_'.VMLANG.'` as l '
. ' JOIN `#__virtuemart_products` AS p using (`virtuemart_product_id`)'
. 'WHERE `product_parent_id` ='.(int)$child_id;
$q.= ' ORDER BY `pordering`';

Now when editing a product in the VM admin area, under the 'Product Information' tab you can set the ordering of child products.  Save.  This should carry through to the custom fields tab and the dropdown lists shown on the front end.

I hope this helps (it sure gave me a headache).
Title: Re: What bugs do you know of in stockable variants plugin
Post by: maxispin on November 21, 2013, 11:01:02 am
I love you rhks8 !

Thank you Very Much!
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on November 21, 2013, 11:03:44 am
Sorry, the forum hasn't been sending me the email notifications about updates to this thread so I've missed all of this. I'll look into this a bit further, run some tests and hopefully get this added to the main virtueMart release.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: maxispin on November 21, 2013, 11:09:13 am
Good to hear OpenGlobal ! Thanks in advance
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on November 24, 2013, 12:18:52 pm
rhks8 YOU ARE GREAT !!! This issue is SOLVED !!! The VM team should be notified about this.

Unfortunately it doesn't. It suffers from the same problem that my previous attempts have suffered from. It doesn't have any effect on the front end, only the backend. The front end variable is still ordered by the product ID.

I realised a while ago that the front end needs to be restructured to fix this problem, hence why I haven't gotten around to it yet.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on November 24, 2013, 13:08:37 pm
I have implemented a more comprehensive fix for the child values being brought through to the parent when it is added to the cart (weights and dimensions, etc), which I've put in the attached file.

I'd appreciate it if as many people as possible could test this to make sure that it doesn't introduce any other errors before I commit it to VM.

OpenGlobal E-commerce

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: inu2005 on November 25, 2013, 21:51:50 pm
Quote
I have implemented a more comprehensive fix for the child values being brought through to the parent when it is added to the cart (weights and dimensions, etc), which I've put in the attached file.

I'd appreciate it if as many people as possible could test this to make sure that it doesn't introduce any other errors before I commit it to VM.

OpenGlobal, I have tested your stockable.php.

My first test  - based on 1 custom field (size S/M/L/XL) - was successful (but also with the solution of rhks8 which I have been testing earlier this week…).  If you reorder and save the childs (TAB article information of the parent) this new order is visible in TAB custom fields. This new order is also used in the dropdownlist. To be effective I had to save again the order of the custom fields TAB of the parent.

My second test – which has 2 custom filelds (colours: WHITE and BLACK and size: S/M/L/XL)  – can be reordered (TAB article information of the parent). This new order is visible in TAB custom fields. However, this new order is not effective for the dropdownlist. I saved it again, cleared cache: the dropdownlist order doesn’t change.

My conclusion for the moment is that when your are using your stockable.php and want to reorder the childs to create a logical dropdownlist order (S/M/L/XL and not L/M/S/XL)  this is possible if you have a single custom field. It does not work if you are dealing with more custom fields.

If I can help you with more testing, no problem!
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on November 25, 2013, 23:27:42 pm
Hi,

Thanks very much for your testing. Yes, I found the same thing with the proposed ordering fix. The front end ordering is based on the product ID (a legacy problem that I inherited :-) ) rather than the order that it comes out from the SQL query, so a complete solution for product ordering is still outstanding.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Milbo on November 26, 2013, 17:31:10 pm
Using correct childs and using the product id is exactly what we want to have.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on November 26, 2013, 17:32:34 pm
What do you mean?

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: ArhoN on November 26, 2013, 22:13:53 pm
Hi,

I have just upgraded to 2.0.24 and I have this problem with stockable.php:

If you are using stockable variants and have got 5 T-shirts, 2 black and 3 white. If you select 3 black, it will add only 2 (which is ok), but if you Add to Cart again, you get 4 into the cart (which is wrong), It never should be more than 2 and a "Notify me" sign should show up. I have already set this option in VM>Configuration

I have tried this code below but If I use it I get a blank page in 2.0.24

Is it any way to solve this issue? Thanks

Quote
For those who also want to prevent users from adding more items than you have in stock to their cart (by clicking the Add to Cart button multiple times), change the plgVmOnAddToCart() function in stockable.php (near the end of the file) to the following:
Code: [Select]
public function plgVmOnAddToCart(&$product){
$customPlugin = JRequest::getVar('customPlugin',0);

if ($customPlugin) {
$db = JFactory::getDBO();
$query = 'SELECT  C.* , field.*
FROM `#__virtuemart_customs` AS C
LEFT JOIN `#__virtuemart_product_customfields` AS field ON C.`virtuemart_custom_id` = field.`virtuemart_custom_id`
WHERE `virtuemart_product_id` =' . $product->virtuemart_product_id.' and `custom_element`="'.$this->_name.'"';
$query .=' and is_cart_attribute = 1';
$db->setQuery($query);
$productCustomsPrice = $db->loadObject();
if (!$productCustomsPrice) return null;
// if ( !in_array($this->_name,$customPlugin[$productCustomsPrice->virtuemart_custom_id]) ) return false;
$selected = $customPlugin[$productCustomsPrice->virtuemart_customfield_id]['stockable']['child_id'];

if (!$child = $this->plgVmCalculateCustomVariant($product, $productCustomsPrice,$selected) ) return false;
if ($child->product_sku)
$product->product_sku = $child->product_sku;
if ($child->product_name)
$product->product_name = $child->product_name;
$product->product_in_stock = $child->product_in_stock;

$this->stockhandle = VmConfig::get('stockhandle','none');
if ('disableit' == $this->stockhandle || 'disableit_children' == $this->stockhandle || 'disableadd' == $this->stockhandle) {
if (!class_exists ('VirtueMartCart')) {
require(JPATH_VM_SITE . DS . 'helpers' . DS . 'cart.php');
}
$cart = VirtueMartCart::getCart ();print_r($product);print_r($cart);

$orderedQuantity = $product->quantity;
foreach ($cart->products as $cartProduct) {
if ($cartProduct->virtuemart_product_id == $product->virtuemart_product_id) {
$orderedQuantity += $cartProduct->quantity;
if ($orderedQuantity > $product->product_in_stock) {
return false;
}
}
}
}
}
}
Limonbay is right. If you have a stock for 2 for a particular child item and you add 3 items you get the message that "max quantity is reached. only 2 items are added to your cart" and 2 items are added to the cart but if you close the popup and you add another item of the same child item it is also added to the cart. This happens also if you navigate out of the product description and back again.
In VM1 the system didnt have so many capabilities but it could handle stock items really good. The stock management is very crucial for an e-commerce platform so you must take a good care on this matter.
Keep up the good work
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on November 26, 2013, 22:57:27 pm
What version are you using, that should already be fixed.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: ArhoN on November 27, 2013, 18:38:38 pm
Im sorry..
Using the Latest VM 2.0.24c
Title: Re: What bugs do you know of in stockable variants plugin
Post by: ArhoN on November 29, 2013, 15:14:42 pm
There is a problem also with the child products weights.

For calculating the shipping it doesnt get the seperate weights of the child items but only the parent products weight.
Havent tested the Length.

This is bad for international shipping cause the difference in price can be huge for large orders.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on November 30, 2013, 11:16:58 am
I've attached the latest version which should have fixed these issues.

OpenGlobal E-commerce

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: ArhoN on November 30, 2013, 14:22:42 pm
I've attached the latest version which should have fixed these issues.

OpenGlobal E-commerce
This Latest version fo the stockable.php is not included in the latest vestion of VM 2.0.24c ?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on November 30, 2013, 16:25:09 pm
The version I have attached will be available in the 2.0.24d version (unless I need to make further changes)

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: d_a_w_g_y on December 01, 2013, 10:22:11 am
Hi OpenGlobal / Team,

I downloaded the latest of stockable.php, I am currently running updated JOOMLA 2.5.16, VM 2.0.24c,

I think this question has been raised on a number of different forums but 'it seems' never a specific answer (infact I didn't find one), so here is the question:

"How do I get current stock level reported on the product details page that reflects my stockable variant?"

For example the following works with a normal product page:

http://forum.virtuemart.net/index.php?topic=107996.0

But each time I changed my stockable variant dropdown, the price changed ok but the stock level remained the same with a static value (which it seems is my first variant that loads when the page loads). I also found:

http://forum.virtuemart.net/index.php?topic=100480.135

Page 10, the question was asked by huegel-huepfer, but I failed to find an answer (please direct me to the correct discussion for this)

So it took a while to track it down, again its not going to suit everyones requirements as its a customization, so you might consider something like this as a configuration option, or maybe it already exists and i've missed it  8)

Anyway changing the following in stockable.php, I am able to view the correct stock level per each stockable variant:

::stockable.php::
Code: [Select]
if ("disableadd" == stockhandle && stockable_'.$js_suffix.'[found_id].in_stock <= 0) {
  var j = stockable_'.$js_suffix.'[found_id].in_stock;  /* d_a_w_g_y: added this for my stock level */
$(".addtocart-bar>span").remove();
$(".addtocart-bar>div").remove();
$(".addtocart-bar>a.notify").remove();
$(".addtocart-bar").append(\'<div><br></div>\');  /* d_a_w_g_y: added this to create some space */
$(".addtocart-bar").append(\'<div><br></div>\');  /* d_a_w_g_y: added this to create some space */
$(".addtocart-bar").append(\'<a href="ind\'+\'ex.php?option=com_virtuemart&view=productdetails&layout=notify&virtuemart_product_id=\' + found_id + \'" class="notify">' . JText::_('COM_VIRTUEMART_CART_NOTIFY') . '</a>\');
$(".addtocart-bar").append(\'<div><br></div>\');  /* d_a_w_g_y: added this to create some space */
$(".addtocart-bar").append(\'<div>Current Stock: \' + j + \'</div>\'); /* d_a_w_g_y: Heres the stock level, however this is for Notify Me so in theory it should be 0 */
} else {
var quantity = $(".addtocart-bar .quantity-input").val();
var j = stockable_'.$js_suffix.'[found_id].in_stock;    /* d_a_w_g_y: added this for my stock level */
if (isNaN(quantity)) {
    quantity = 1;
}
$(".addtocart-bar>span").remove();
$(".addtocart-bar>div").remove();
$(".addtocart-bar>a.notify").remove();
$(".addtocart-bar").append(\'<span class="quantity-box"><input type="text" class="quantity-input js-recalculate" name="quantity[]" value="\' + quantity + \'" /></span><span class="quantity-controls js-recalculate"><input type="button" class="quantity-controls quantity-plus" /><input type="button" class="quantity-controls quantity-minus" /></span><span class="addtocart-button"><input type="submit" name="addtocart" class="addtocart-button" value="'.JText::_('COM_VIRTUEMART_CART_ADD_TO').'" title="'.JText::_('COM_VIRTUEMART_CART_ADD_TO').'" /></span><div class="clear"></div>\');
$(".addtocart-bar").append(\'<div><br></div>\');  /* d_a_w_g_y: added this to create some space */
          $(".addtocart-bar").append(\'<div>Current Stock: \' + j + \'</div>\'); /* d_a_w_g_y: Heres the stock level for my variant */
Virtuemart.product($("form.product"));
}


cheers

d_a_w_g_y
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on December 01, 2013, 15:52:03 pm
This functionality is beyond the scope of what this plugin was intended to do. It is only meant to handle stock control. If you want other information updated on the page, you would be better off using the Generic Child Variant customfield instead.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: d_a_w_g_y on December 01, 2013, 17:08:21 pm
ye no worries, really appreciate the response,

I already have 800 products using the stockable variant plugin, not looked at the generic child variant (/me wonders how easy it would be to switch over), so figured I need these modifications for the extra functionality, I wanted to see the current stock level for each child product variant,

I also now have extra vendors which is (from what I've read) the only way of handling muliple shops in VM2,

cheers

d_a_w_g_y
Title: Re: What bugs do you know of in stockable variants plugin
Post by: ArhoN on December 04, 2013, 13:06:18 pm
OpenGlobal the problem was not lying at the stockable.php file.
The file you send me works perfectly.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: inu2005 on December 15, 2013, 19:50:31 pm
Quote
My conclusion for the moment is that when your are using your stockable.php and want to reorder the childs to create a logical dropdownlist order (S/M/L/XL and not L/M/S/XL)  this is possible if you have a single custom field. It does not work if you are dealing with more custom fields.

Quote
Thanks very much for your testing. Yes, I found the same thing with the proposed ordering fix. The front end ordering is based on the product ID (a legacy problem that I inherited :-) ) rather than the order that it comes out from the SQL query, so a complete solution for product ordering is still outstanding.

OpenGlobal, unfortenately after updating  Virtuemart to 2.0.26 your stockable.php fix doesn't work anymore, so frontend ordering of the dropdownlist is not possible anymore , not even with one single custom field (or am I mistaken?).
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on December 15, 2013, 21:26:21 pm
Can you provide links and details please.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: inu2005 on December 16, 2013, 00:13:44 am
Quote
OpenGlobal, unfortenately after updating  Virtuemart to 2.0.26 your stockable.php fix doesn't work anymore, so frontend ordering of the dropdownlist is not possible anymore , not even with one single custom field (or am I mistaken?).

Sorry, my mistake. After the update I think I have tested by accident a product which has two custom fields (colour + size), which frontend dropdownlist cannot be ordered.
Now I have tested a product with a single field (only size) and this order can still be changed thanks to your fix.

I still hope there will be a fix for frontend ordering in case you have products with multiple custom fields.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on December 24, 2013, 18:09:04 pm
I have attached a new version of the stockable.php file with a potential fix for the long-standing "ordering" bug. I have tested this on my system and it seems to be working properly so I'd appreciate some beta testing before I commit this to the next version.

Please remember that when you change the order of the children on the parent product, you need to save the parent product TWICE. The first save is to save the new child order, the second save is to save the stockable custom field settings for the new order.

OpenGlobal E-commerce

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: jsneo on April 02, 2014, 18:33:08 pm
I am using Joomla! 2.5.14 and VM 2.0.26d and tried using both the original stockable.php as well as your stockable.php last posted but still faces the "undefined" bug when adding the product to cart.

http://y2style.com/index.php/on-sale/ysl-rock-top-detail

Those problems are fixed in the version that I attached. I'm talking about the "undefined" bug.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on April 08, 2014, 13:57:01 pm
Ah ha!

Thanks to jsneo (who has been helping me via PM) we have now been able to track down the "undefined" bug.

In /components/com_virtuemart/views/productdetails/tmpl/default_addtocart.php (or /templates/$template/html/com_virtuemart/productdetails/default_addtocart.php if you are using a custom template) there are 3 input fields which are nested too deeply inside the if blocks. You may have something that looks like this:

Code: [Select]
                                <span class="addtocart-button">
                                <?php echo shopFunctionsF::getAddToCartButton ($this->product->orderable);
                                                
// Display the add to cart button END  ?>

                                 </span>
                                        <input type="hidden" class="pname" value="<?php echo htmlentities($this->product->product_nameENT_QUOTES'utf-8'?>"/>
                                        <input type="hidden" name="view" value="cart"/>
                                        <noscript><input type="hidden" name="task" value="add"/></noscript>
                                        <input type="hidden" name="virtuemart_product_id[]" value="<?php echo $this->product->virtuemart_product_id ?>"/>

The "pname", "view" and "virtuemart_product_id[]" need to be moved to the same place as the "option=com_virtuemart" field:

Code: [Select]
                <input type="hidden" name="option" value="com_virtuemart"/>
                <input type="hidden" class="pname" value="<?php echo htmlentities($this->product->product_nameENT_QUOTES'utf-8'?>"/>
                <input type="hidden" name="view" value="cart"/>
                <input type="hidden" name="virtuemart_product_id[]" value="<?php echo $this->product->virtuemart_product_id ?>"/>

        </form>

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: jsneo on April 08, 2014, 18:12:04 pm
Thanks a million OpenGlobal, you really make my day
Title: Re: What bugs do you know of in stockable variants plugin
Post by: mhuebler on April 09, 2014, 13:37:46 pm
hello,
i found a problem by using the option "Do not Display Product, if child products also out of stock" of the VM configuration.
the shop function to search products is not working if i use the configuration option.

VM 2.6.0
Title: Re: What bugs do you know of in stockable variants plugin
Post by: inu2005 on May 10, 2014, 10:20:33 am
BUG: Stock always ZERO after VM update 2.6.0a.

After the update from 2.6.0 to 2.6.0a I cannot add a childitem to my cart. The popup always shows: "article not available in this quantity", allthough I'm sure it is in stock. I'm using setting "Do not Display Product, if child products also out of stock".
I downgraded back to 2.6.0 and now it's working fine again, so there must be a bug somewhere in version 2.6.0a regarding stockcontrol.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Matt_Ginn on May 12, 2014, 12:17:42 pm
The modification to stockable.php to display the 'Current Stock' for child products no longer seems to work for me after updating to 2.6.0a! Anyone else having this problem??
Title: Re: What bugs do you know of in stockable variants plugin
Post by: mhuebler on May 20, 2014, 14:39:49 pm
yes i can confirm. but its not a problem of stockable plugin. i can track down the problem to the template file "default_addtocart.php'

please try the orginal vm template file 'default_addtocart.php' after update. this file works correctly.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: Cornel on June 09, 2014, 11:30:32 am
The option "Do not Display Product, if child products also out of stock" is selected.
I have a main product with three sub-products with SIZE as variant. I need the stock control on the variants.
The main product has NO STOCK and two out of the three sub-products has stock.
With virtuemart 2.0.26d a pull down with two products is shown and I can add a product to the cart.
Witj virtuemart 2.6.6 also a pull down with teo products is but I cannot add a product to the cart and the popup tells me 0

When I select SHOW STOCK at the store front-and config screen.... stock of ZERO is shown on the product page even if i select one of the variant sizes.
I my opinion stock of the variant should be shown on the product page and whem selecting another variant size stock display should change too.

Now I work around it to add stock to the main product (which is stupid!!).....each of the variants disappear when no stock of that variant. so the whole product is not displayed if no stock of any variant.    What do I have to change to make is work ?

The stock variant is not working as it should, because the main product does not need to have atock......  will this change at the next JL3 compatible virtuemart version
Title: Re: What bugs do you know of in stockable variants plugin
Post by: GJC Web Design on June 09, 2014, 15:25:33 pm
see towards the end of this topic - http://forum.virtuemart.net/index.php?topic=121956.0

this problem is discussed/being actioned
Title: Re: What bugs do you know of in stockable variants plugin
Post by: scottshort on August 03, 2014, 18:02:53 pm
Hello All -

 Now Running Joomla 2.5.24 and trying to upgrade from VM 2.0.22a upon advice from jenkinhill [security concerns].  We are supposed to go live with upgrade in a few days. We are running stockable variants plugin with structure of [Father - child- grandchild] or [grandparent - father - child] whatever you prefer.  In our case, Grandparent is the model, the Fathers are the colors, and the children are the sizes. 

SUMMARY:
I have upgraded from 2.0.22a to 2.6.0 with stockable variants plugin - now weights from Father are not passing to children in shopping cart so shipping cost calculations by weight are no longer working.  They were passing from Father to Child successfully in 2.0.22a.  I am now forced to manually enter weights into each child in order for my shipping calcs to work.  I need help to know if anyone has solved this specific bug in version 2.6.0 or higher?  Please post any solutions, thanks!   I have to admit that this forum post has tons of information, but for a non developer it has been hard for me to keep track of which bug is being discussed and which patch files are to solve which bug.   My developer also had to add some custom code fixes as a number of elements in our template such as the add to cart buttons were not displaying properly after this upgrade.

We have already tried upgrading to 2.6.6 but the cart broke with the "can't add to cart" bug discussed here in forum...  We tried replacing the stockable.php file suggested but this did not work so we were forced to downgrade to 2.6.0 to get the cart to work.  If anyone can more clearly suggest a solution to getting 2.6.6 working so that the "add to cart" bug is resolved - please repost so I can try to upgrade again...

THANK YOU ANYONE WHO HAS TIME TO RESPOND. 

Regards
Scott

DETAILS:

RESOLVED WITH 2.6.0

UNRESOLVED WITH 2.6.0

NEW INTRODUCED WITH 2.6.0

NOT INTRODUCED WITH 2.6.0
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 03, 2014, 21:09:20 pm
The stockable plugin was never designed to work with "grandchildren" products. Why aren't your colours and sizes just managed with children?

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: scottshort on August 04, 2014, 20:17:09 pm
Hello and thanks for your reply!   

Can anyone please offer any confirmed fixes to the 2.6.6 "cant add to cart" bug so we can try it again?


Quote
« Reply #363 on: May 20, 2014, 14:39:49 pm »

yes i can confirm. but its not a problem of stockable plugin. i can track down the problem to the template file "default_addtocart.php'

please try the orginal vm template file 'default_addtocart.php' after update. this file works correctly.

Can anyone confirm if this fix works?  From what version of VM do I need to get the default_addtocart.php file??


Quote
The stockable plugin was never designed to work with "grandchildren" products. Why aren't your colours and sizes just managed with children?

I thought that the stockable plugin does not work well with more than one attribute.  I have shoe model with over 20 colors with 6 sizes each..we need inventory for each size.   we have found with our template that adding all colors and sizes for one product was too difficult to manage plus listing all colors only as words in a drop down not visual enough for our clients and a bit overwhelming - and all the custom work to add the photos to this template in this configuration did not make sense.  We now have a very clean setup where the Grandfather product acts more like a category [unpublished] with each father product a color and each child the size.  I do not think that my use of this plugin in this manner is part of the problem.  [Also to help others troubleshoot, I do NOT have selected the option: "Do not Display Product, if child products also out of stock"... which I think has caused others some problems - see screen shot].

Not sure exactly how it was designed to work, but it and VM is working almost perfectly now [with no hacks] on my live site running Joomla 2.5.16 and VM 2.0.24a.  The only things not working are that a few custom fields like "related categories" and shipping dimensions and weights will not pass from Grandfather to grandchild......[plus the over-order /overstock bug] [plus the child list ordering bug] :o

My solution to these fields not passing has been to enter these values into each Father to pass to the child which I can live with - but I would be happy to live with only these shortcomings if I could get 2.6.6 [or 2.6.0 for that matter] to work!! 

We have just discovered on our test site running 2.6.0 that the shopping cart is broken:

I take seriously security concerns others have raised and want to upgrade my site as soon as possible...  Given the now confirmed wreckage of our 2.6.0 installation, I repeat:  Can anyone please offer any confirmed fixes to the 2.6.6 "cant add to cart" bug [when using stockable variants plugin] so we can try it again?

Thanks all for any help!

Scott

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: OpenGlobal on August 04, 2014, 20:20:20 pm
Can you provide a link. I don't really understand how you've set this up.

OpenGlobal E-commerce
Title: Re: What bugs do you know of in stockable variants plugin
Post by: scottshort on August 04, 2014, 20:33:30 pm
Thanks OpenGlobal - I just messaged you with some links.  Let me know if you need more.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: tmmnh on August 31, 2014, 17:52:38 pm
I try to add items into my shopping cart
for example this product has 3 sizes : 0-3M, 3-6M, 6-9M
so previously when i add item into cart
it shows under the Name Column : the parents product name with the (size) below it

but now whatever sizes i try to add in.
the parents product name becomes one of the child product name
and the SKU no matter wat sizes i add, all becomes the child's product's SKU

(http://s29.postimg.org/yawi44bfn/Screen_Shot_2014_08_30_at_10_28_35_PM.jpg) (http://postimg.org/image/yawi44bfn/)

seriouesly dunno what's wrong with this

My Custom Field for the product has already chosen the correct sizes to the SKU

(http://s30.postimg.org/8b7532k7x/Screen_Shot_2014_08_30_at_11_04_04_PM.jpg) (http://postimg.org/image/8b7532k7x/)

I m using Virtuemart 2.6.8

i was having the same problem before i upgraded from 2.6.7

Note : just checked back on my sample order.. i have no such problem when i was using 2.6.6 .. reason why i update my version is due to the double orders problem…
i solved the problem by upgrading but now i have the plugin child product problem...

Update : i m not sure if this is the problem.. somehow i saw this from my mainpage after i turn on debug


Warning: Invalid argument supplied for foreach() in C:\Domains\luvellen\luvelle.net\wwwroot\plugins\vmcustom\stockable\stockable.php on line 228 Notice: Undefined variable: child_id in C:\Domains\luvellen\luvelle.net\wwwroot\plugins\vmcustom\stockable\stockable.php on line 305

and i actually installed my 2.6.6 back and the problem is still there... now i really dunno what is wrong.. pls help if anyone could..


Realised its not a virtuemart problem... its the template problem
Title: Re: What bugs do you know of in stockable variants plugin
Post by: delimpasis on September 24, 2014, 09:04:24 am
Joomla 2.5.24
Virtuemart 2.6.6/2.6.10

I have set up parent product with stockable variants (Size/Color)
When I have 'Do not Display Product, if child products also out of stock' and in the FE select a size for which a color is out of stock, the color is not hidden, but it displays the 2nd letter of its value. If I add it to cart I get the popup with continue shopping link and a '0' together with the product name.
Title: Re: What bugs do you know of in stockable variants plugin
Post by: webmake on September 25, 2014, 21:24:58 pm
Joomla 2.5.24
Virtuemart 2.6.6/2.6.10

I have set up parent product with stockable variants (Size/Color)
When I have 'Do not Display Product, if child products also out of stock' and in the FE select a size for which a color is out of stock, the color is not hidden, but it displays the 2nd letter of its value. If I add it to cart I get the popup with continue shopping link and a '0' together with the product name.

I also picked up this problem when updating to 2.6.10 yesterday. Any body else?
Title: Re: What bugs do you know of in stockable variants plugin
Post by: vitea7 on November 18, 2014, 10:43:02 am
Hi I have a problem with add to cart for child products:
For example I have child product in stock set 3 items
and already was ordered 2 products so I guess it should allow to buy only 1 product but in front end when try to add product it allows to add up to 3 products also I can add again 3 products and again and again so there is no limit to add

I have updated "public function plgVmOnAddToCart(&$product){" function in stockable.php as I read in this thread but still no success.

take a look at my settings:



https://www.prodrive.net/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=10&virtuemart_category_id=1 (https://www.prodrive.net/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=10&virtuemart_category_id=1) link with the example

child product is Z. Tuesday, December 30, 2014 at 9:00 a.m.

virtuemart version is 2.0.24

please help me to configure it out, because it's a really big site and important one for me and really have to get it work properly.
thanks

[attachment cleanup by admin]
Title: Re: What bugs do you know of in stockable variants plugin
Post by: REandH on March 21, 2015, 23:34:58 pm
When creating a custom attr using the stockable plugin

I noticed in firebug that every time you make a selection, the number of calls to the server doubles!
This is pretty serious and will problem cause some big performance issues for high traffic websites.

It might not just be unique to the stockble plugin, as looking through the code,
something going wrong in components/com_virtuemart/assets/js/vmprices.js seems to be the problem

Hopefully this has already been fixed.