Author Topic: VM3 Stockable variants for Size + Color?  (Read 44302 times)

spi7fire

  • Beginner
  • *
  • Posts: 13
  • VirtueMart Version: 3
Re: VM3 Stockable variants for Size + Color?
« Reply #60 on: February 18, 2015, 17:26:22 pm »
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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27426
  • Always on vacation
    • Jenkin Hill Internet
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VM 3.4.3.10057 on Joomla 3.9.8 PHP 7.0.33
Testing VM .3.6.0.10075 on Joomla 3.9.8

spi7fire

  • Beginner
  • *
  • Posts: 13
  • VirtueMart Version: 3
Re: VM3 Stockable variants for Size + Color?
« Reply #62 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.

balai

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1365
Re: VM3 Stockable variants for Size + Color?
« Reply #63 on: February 18, 2015, 18:17:02 pm »

spi7fire

  • Beginner
  • *
  • Posts: 13
  • VirtueMart Version: 3
Re: VM3 Stockable variants for Size + Color?
« Reply #64 on: February 18, 2015, 18:28:22 pm »

sonickev

  • Beginner
  • *
  • Posts: 20
  • Skype Name: sonickev2001
  • VirtueMart Version: 3.0.4
Re: VM3 Stockable variants for Size + Color?
« Reply #65 on: February 19, 2015, 05:19:18 am »
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

  • Beginner
  • *
  • Posts: 32
Re: VM3 Stockable variants for Size + Color?
« Reply #66 on: February 19, 2015, 08:06:12 am »
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

  • Beginner
  • *
  • Posts: 13
  • VirtueMart Version: 3
Re: VM3 Stockable variants for Size + Color?
« Reply #67 on: February 19, 2015, 08:13:08 am »
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

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1365
Re: VM3 Stockable variants for Size + Color?
« Reply #68 on: February 19, 2015, 11:01:11 am »
@sonicev
Quote
Right 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

  • Beginner
  • *
  • Posts: 13
  • VirtueMart Version: 3
Re: VM3 Stockable variants for Size + Color?
« Reply #69 on: February 20, 2015, 12:21:31 pm »
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

  • Beginner
  • *
  • Posts: 13
  • VirtueMart Version: 3
Re: VM3 Stockable variants for Size + Color?
« Reply #70 on: February 20, 2015, 22:15:25 pm »
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

  • Beginner
  • *
  • Posts: 13
  • VirtueMart Version: 3
Re: VM3 Stockable variants for Size + Color?
« Reply #71 on: February 20, 2015, 23:37:07 pm »
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

  • Beginner
  • *
  • Posts: 8
Re: VM3 Stockable variants for Size + Color?
« Reply #72 on: February 27, 2015, 16:37:37 pm »
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

  • Beginner
  • *
  • Posts: 8
Re: VM3 Stockable variants for Size + Color?
« Reply #73 on: February 27, 2015, 17:05:31 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

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1365
Re: VM3 Stockable variants for Size + Color?
« Reply #74 on: February 27, 2015, 17:40:02 pm »
Quote
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.
Have you tried my plugin?
http://breakdesigns.net/extensions/stockable-custom-fields

This feature is there