News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

What bugs do you know of in stockable variants plugin

Started by OpenGlobal, May 24, 2012, 14:36:59 PM

Previous topic - Next topic

OpenGlobal

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

OpenGlobal

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]

Florentp

Quote from: 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

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 :)

QuoteUnfortunately, 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
Web programmer. Passionate.
PHP, SQL, Javascript, JQuery, css.
Skype : florent.indienboutique

OpenGlobal

Quote from: FederA on August 07, 2012, 11:07:12 AM
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.

Quote from: FederA on August 07, 2012, 11:07:12 AM
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

OpenGlobal

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

OpenGlobal

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

Florentp

#156
Quote from: 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


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":{}}".
Web programmer. Passionate.
PHP, SQL, Javascript, JQuery, css.
Skype : florent.indienboutique

darhvader666uk

#157
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. 



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).



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).



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

gcoulter

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
Graham Coulter
Ireland

OpenGlobal

Quote from: darhvader666uk on August 11, 2012, 11:12:16 AM
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

OpenGlobal

Quote from: gcoulter on August 13, 2012, 18:14:09 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

Florentp

#161
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 :/
Web programmer. Passionate.
PHP, SQL, Javascript, JQuery, css.
Skype : florent.indienboutique

OpenGlobal

Quote from: FederA on August 21, 2012, 10:47:19 AM
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?

Quote from: FederA on August 21, 2012, 10:47:19 AM
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

Florentp

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 :/
Web programmer. Passionate.
PHP, SQL, Javascript, JQuery, css.
Skype : florent.indienboutique

gcoulter

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.
Graham Coulter
Ireland