-
AuthorPosts
-
thatch10 Friend
thatch10
- Join date:
- May 2008
- Posts:
- 104
- Downloads:
- 154
- Uploads:
- 8
- Thanks:
- 11
- Thanked:
- 19 times in 1 posts
June 3, 2013 at 12:55 pm #187931Hi, 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 ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
June 4, 2013 at 7:02 am #494670We 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.
1 user says Thank You to Ninja Lead for this useful post
thatch10 Friendthatch10
- Join date:
- May 2008
- Posts:
- 104
- Downloads:
- 154
- Uploads:
- 8
- Thanks:
- 11
- Thanked:
- 19 times in 1 posts
June 4, 2013 at 10:11 am #494696My 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 Friendthatch10
- Join date:
- May 2008
- Posts:
- 104
- Downloads:
- 154
- Uploads:
- 8
- Thanks:
- 11
- Thanked:
- 19 times in 1 posts
June 4, 2013 at 10:18 pm #494756Ninja Lead,
PM sent with details for site access
Thatch
MoonSailor FriendMoonSailor
- Join date:
- November 2011
- Posts:
- 1106
- Downloads:
- 0
- Uploads:
- 245
- Thanks:
- 89
- Thanked:
- 248 times in 223 posts
June 5, 2013 at 2:01 am #494766Hi 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 Friendthatch10
- Join date:
- May 2008
- Posts:
- 104
- Downloads:
- 154
- Uploads:
- 8
- Thanks:
- 11
- Thanked:
- 19 times in 1 posts
June 6, 2013 at 11:51 am #495010plugin 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 FriendMoonSailor
- Join date:
- November 2011
- Posts:
- 1106
- Downloads:
- 0
- Uploads:
- 245
- Thanks:
- 89
- Thanked:
- 248 times in 223 posts
June 7, 2013 at 3:25 am #495084Hi 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 Friendthatch10
- Join date:
- May 2008
- Posts:
- 104
- Downloads:
- 154
- Uploads:
- 8
- Thanks:
- 11
- Thanked:
- 19 times in 1 posts
June 7, 2013 at 3:10 pm #495147MoonSailor 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 FriendMoonSailor
- Join date:
- November 2011
- Posts:
- 1106
- Downloads:
- 0
- Uploads:
- 245
- Thanks:
- 89
- Thanked:
- 248 times in 223 posts
June 8, 2013 at 5:36 pm #495209Hi 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.jsto 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
-
AuthorPosts
This topic contains 9 replies, has 3 voices, and was last updated by MoonSailor 11 years, 6 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum