Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • thatch10 Friend
    #187931

    Hi, the thread on custom product variant disabling the add to cart button and product qty has been moved, however I can’t access where it has been moved to due to account permissions.

    Can you please advise how to view this thread please?

    Thatch

    Ninja Lead Moderator
    #494670

    We would not move any post from user if it’s posted in right forum. Kindly check again and you can show me what the problem you are still facing, I shall help you check it.

    thatch10 Friend
    #494696

    My question was due to the fact that once you add a stockable product variant through the Virtuemart plugin with the JA Hawkstore template0 to the store the add to cart button and qty field do not work.

    This happens with the QuickStart and immediately adding a product variant.

    Using the default joomla template the add to cart and qty function ok.

    I suspect JavaScript jquery issue with the template. Please advise if any one has the stockable variant working with no error and how to achieve this please.

    Thatch

    thatch10 Friend
    #494756

    Ninja Lead,

    PM sent with details for site access

    Thatch

    MoonSailor Friend
    #494766

    Hi Thatch,

    <blockquote>stockable product variant through the Virtuemart plugin</blockquote>

    I am sorry I could not find the “stockable product variant option”, If its a different plugin, please share it with me and i shall check. It would be great if you can share your site url and login details via PM. I need to check the issue before i can give any answers.

    Regards.

    thatch10 Friend
    #495010

    plugin is VM Custom field with stock control,

    pm sent

    Stock Quickstart install with product set to have a custom field, add to cart and qty broken

    Thatch

    MoonSailor Friend
    #495084

    Hi thatch10,

    Because template is effected when adding product to cart, so, in the case, you need to change plugin “stockable” of virtuemart.

    In file “plugins/vmcustom/stockable/stockable.php”, What I change is :

    – Line 403 remove

    [PHP]
    $(“.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>’);
    [/PHP]

    Add :

    [PHP]
    $(“.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=”ja-addtocart-button” value=”‘.JText::_(‘COM_VIRTUEMART_CART_ADD_TO’).'” title=”‘.JText::_(‘COM_VIRTUEMART_CART_ADD_TO’).'” /></span><div class=”clear”></div>’);
    [/PHP]

    – Line 404 remove

    [PHP]
    Virtuemart.product($(“form.product”));
    [/PHP]

    Add
    [PHP]
    javmaddcart();
    [/PHP]

    In file “templates/ja_hawkstore/js/javmprices.js”, line 178
    [PHP]
    JAVirtuemart.product($(“form.ja-vm-product”));

    $(“form.js-recalculate”).each(function(){
    if ($(this).find(“.product-fields”).length) {
    var id= $(this).find(‘input[name=”virtuemart_product_id[]”]’).val();
    JAVirtuemart.setproducttype($(this),id);

    }
    });
    [/PHP]

    change to :
    [PHP]
    javmaddcart = function(){
    JAVirtuemart.product($(“form.ja-vm-product”));

    $(“form.js-recalculate”).each(function(){
    if ($(this).find(“.product-fields”).length) {
    var id= $(this).find(‘input[name=”virtuemart_product_id[]”]’).val();
    JAVirtuemart.setproducttype($(this),id);

    }
    });
    };
    javmaddcart();
    [/PHP]

    Now, its running as normal. Pls check again.

    Regards

    thatch10 Friend
    #495147

    MoonSailor I initially applied your changes manually myself to my localhost and found no difference with the shopping cart, I still cannot add to the cart from a product with a variant.

    I then checked that the files had been modified on the test address that I sent you via pm, this also did not appear to work.

    I have paced the whole test site back up with the changed files, can you please take a look and find where I have gone wrong or if there are additional changes to be made

    Thatch

    MoonSailor Friend
    #495209

    Hi thatch10,

    With the site you send PM to me, when I change file “stockable.php” as above reply, add to cart is functioning normally, kindly check again.

    <blockquote>I initially applied your changes manually myself to my localhost </blockquote>

    You can simply copy 2 following files

    – plugins/vmcustom/stockable/stockable.php
    – templates/ja_hawkstore/js/javmprices.js

    to your local site.

    If it’s still not running, pls up it to live site, I will check it for you, it should work 🙂

    Regards

Viewing 9 posts - 1 through 9 (of 9 total)

This topic contains 9 replies, has 3 voices, and was last updated by  MoonSailor 11 years, 4 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum