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

VM3 Stockable variants for Size + Color?

Started by rayge, January 01, 2015, 14:02:37 PM

Previous topic - Next topic

spi7fire

There are few people who've tested it with several templates, you think ALL templates doesn't support this kind of feature correctly?  i dought that.
Can you show me a working version of this feature on a default template?

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

spi7fire

That's because it is working on version 3.0.6 which isn't released yet
If anyone has a website which runs on 3.0.4 version and using a stockable custom fields, i'll be happy to see it in action, cause until now i havn't seen any.
If anyone has a solution for how to fix this problem it will be even greater
meanwhile i am stuck and its a crucial part of my fashion store website.

balai

#63


sonickev

Quote from: spi7fire on February 18, 2015, 18:09:43 PM
That's because it is working on version 3.0.6 which isn't released yet
If anyone has a website which runs on 3.0.4 version and using a stockable custom fields, i'll be happy to see it in action, cause until now i havn't seen any.
If anyone has a solution for how to fix this problem it will be even greater
meanwhile i am stuck and its a crucial part of my fashion store website.

exactly how it feels to me.

I am using what I believe to be a very professional and quality template, but the authors of the template are trying hard to meet with undocumented standards in the product presentation that appears to be a moving target with VM3.

I really appreciate what Balai is trying to present, but being told that my template is wrong does not really sit well with the Virtuemart ethic.

A successful plugin is flexible and configyarble to fit with what people are doing out in the real world. A plugin needs to work with other plugins and methods.

Right now...with all the latest examples and templates from (some of) the best engineers - there isn't an available working solution.

I'm using a T3 based template and I'm told my markup isn't right, that I need to do 'this and that'. I don't think that is how this is meant to work.
I'm looking and hoping for something that works and doesn't break as soon as I install something else.

Fantastic work by all involved. I never want to take away from that. really great and fast!...but not there yet.


advergroup

Are there any official instructions provided by VM on this new process for custom fields?

Does admin realize there are many wishing to deploy VM on live sites?

spi7fire

I'm willing to pay for a fix for that bug in my website, Balai/anyone else, if you're interested please PM me
I must go live within a week and this is what holds me.. 

balai

#68
@sonicev
QuoteRight now...with all the latest examples and templates from (some of) the best engineers - there isn't an available working solution.

I am using the new js handler introduced by VM3 to add my scripts
http://docs.virtuemart.net/tutorials/development/196-the-vm-javascript-handler.html

Nothing related with the plugin itself. Simply what added with that method is ignored by the template and i assume that it has to do with the place that this is loaded into the markup.
I am looking to make the plugin more flexible with that but any template intending to be compatible with VM3 has to work with those methods, otherwise there will be other problems ahead.

spi7fire

I've wrote to my template support team, and this is what they answered:

--

Joomla-monster:
Hello,

Ok, now I see.
It seems the child product is loaded on the first try only.
I disabled our theme override for VirtueMart and the same issue appeared.
So the problem is related to the VirtueMart core files.


--

So Balai, it's not a Template problem.

Also, they told me that the functions on dynupdate.js aren't being called after first selection.
Where does the code who listens to changes and fires the call to dynupdate methods exists? i couldn't find it

I found this change in 3.0.6: http://dev.virtuemart.net/projects/virtuemart/repository/revisions/8689
But when i change it in my local env. it doesnt affect anything..   any suggestions?

spi7fire

I've installed version 3.0.6 from this link: http://dev.virtuemart.net/projects/virtuemart/files
But it still doesn't work in my website.
Left with no ideas.

spi7fire

OK i have a solution, the problem is that dynupdate.js doesn't recalls cvfind.js after we select item from the dropdown.  I guess that because it calls AJAX, we lose the cvfind binding.
So to solve it i added two things to the code:
1.  on /virtuemart/administrator/components/com_virtuemart/models/customfields.php
after line 869 i added a function:
$j = "
                  function getSelectorVariants() { return [".$jsVariants."]; }
                  jQuery('#".implode(',#',$tags)."').off('change',Virtuemart.cvFind);
                  jQuery('#".implode(',#',$tags)."').on('change', { variants:[".$jsVariants."] },Virtuemart.cvFind);
";
so the php will compile the needed list.
and then on /virtuemart/components/com_virtuemart/assets/js/dynupdate.js
after line 72 i've added a variable that gets the above list, and re-binded the cvFind:
    Virtuemart.updateDynamicUpdateListeners = function() {
      $__list = getSelectorVariants();
 
      jQuery('*[data-dynamic-update=1]').each(function(i, el) {
            var nodeName = el.nodeName;
            el = jQuery(el);
            console.log('updateDynamicUpdateListeners '+nodeName, el);
            switch (nodeName) {
                case 'A':
               el[0].onclick = null;
                    el.off('click',Virtuemart.updL);
                    el.on('click',Virtuemart.updL);
                    break;
                default:
               el[0].onchange = null;
               el.off('change',Virtuemart.cvFind);
                    el.on('change', { variants: $__list  },Virtuemart.cvFind);
               el.off('change',Virtuemart.upd);
                    el.on('change',Virtuemart.upd);

korpithas

Hi all,

So to sum up on this confusing topic,

At this very moment is VM3.0.6 able to provide child products with different stock and different price while at the same time parent product are not orderable?

As far as i can tell if ''multi variants'' had an option ''Parent orderable  Yes or No''  like the ''Generic child variant '' has, case would be closed.

I am trying using VM3.0.6 and Joomla 3.4.0 but at the moment cant make that happen.

Anyone any progress?

Thanks

korpithas

Quote from: Milbo on February 06, 2015, 17:34:06 PM
I just explained that this should be possible, because the inventory of the children is added to the parent

Hi Milbo,

This function is not working as you describe.
The Stock level of child products is not added to the parent stock. Unless i miss something.
Can you please clarify?
thanks

balai

QuoteAs far as i can tell if ''multi variants'' had an option ''Parent orderable  Yes or No''  like the ''Generic child variant '' has, case would be closed.
Have you tried my plugin?
http://breakdesigns.net/extensions/stockable-custom-fields

This feature is there