Dear all,
is it possible to create some preconfigured carts containing different products and quantities?
E.g, I would like to create "cart 1" containing 2 products A and 3 products B. Than, I would like to create a "cart 2" containing 1 products B and 4 products C.
This way a user can select "cart 1" or "cart 2", modify it (if needed) or create hits own cart
http://forum.virtuemart.net/index.php?topic=79799.0
Sorry :)
I'm using VM 3.0.18 on Joomla 3.6.5 with PHP 5.5.38
You can use a link, having all data on it.
In my case for 1 product it's MYSITE/fr/cart?task=add&quantity%5B%5D=15&virtuemart_product_id%5B%5D=22
For multiple products
MYSITE/fr/cart?task=add&quantity%5B%5D=15&virtuemart_product_id%5B%5D=22&quantity%5B%5D=2&virtuemart_product_id%5B%5D=45 ...
SEF is active and i use fr language tag for french.
I could adjust my extension for this case
http://extensions.virtuemart.net/product/products/vm-isx-cart-saver-detail
I think you can do this with Javascript in your template:
for example:
<?php if ($myvar == 'myresult'){ //check condition A or B
?> //close php
<script>
jQuery(document).ready(function($){ //or other trigger we want to use
jQuery.ajax({
method: 'POST',
url: Virtuemart.vmSiteurl + "index.php?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=json"+Virtuemart.vmLang+window.Itemid, //be sure this script is under virtuemart javascript is defined
cache: 'false',
data:{
ids: [1991] //an array with our ids
},
success: function(msg){
//TODO handle success function, maybe alert or sweetalert
},
error: function(){
//TODO handle error
}
});
</script>
<?php
}
else
{
//another javascript for other products
?>
<script>
jQuery(document).ready(function($){ //or other trigger we want to use
jQuery.ajax({
method: 'POST',
url: Virtuemart.vmSiteurl + "index.php?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=json"+Virtuemart.vmLang+window.Itemid, //be sure this script is under virtuemart javascript is defined
cache: 'false',
data:{
ids: [1995,1987] //an array with our ids
},
success: function(msg){
//TODO handle success function, maybe alert or sweetalert
},
error: function(){
//TODO handle error
}
});
</script>
<?php
};
?>
Good luck
Hello mr. Milbo.
I just buy your extension "vm-isx-cart-saver".
I have many problems.
Con you help me?
I wait yours.
Thanks.
@verreri support for that plugin is by ticket - go to http://extensions.virtuemart.net/ticket