Using class like moltin cart with joomla - joomla

Is there any cart class you can use in joomla such as you cna use moltin cart class? i.e purely with code? moltin doesn't seem to work with joomla. The sessions seem to be overwritten by joomla so that when you var dump the cart it will always have one item.
I have tried to use the composer class moltin cart and other cart classes from packagist to implement cart functionality i.e i just want to add items using code like $cart->add($product); the problem is that these classes seem to use sessions that are overwritten by joomla with every page load thus it is impossible to add new items to the cart

Related

Prestashop 1.7-> How can i add new ajax areas in cart page?

I am trying to add new Ajax areas in cart page. see the image below. i want to put an input that will refresh when i increment the quantity of a product and show the number of the product inside the cart.
Please help!!!
This is possible, you have to use the Prestashop hooks.
You can add data to the hooks using modules.
Available hooks on the shopping-cart page
displayCrossSellingShoppingCart
displayShoppingCart
displayShoppingCartFooter
You can find all available hooks here: Prestashop 1.7 - List of module hooks
You can find more information on how to use hooks here Prestashop 1.7 - Usage of hooks

After update theme options how to update Woocommerce Cart Session?

I have a custom theme options page ( In WordPress Site ) and in that option I have a couple of options for WooCoommerce Mini Cart Customization.
Everything works fine as expected but every time I update some option from backend I can't see that changes right way in frontend due to WooCommerce Cart Session.
As you know WooCommerce mini cart Or custom cart won't be updated automatically if that cart is going through add_to_cart_fragments, So, every time after changing the options I need to update cart session by doing add to cart, remove cart item or update cart item etc.
Honestly, I'm little clueless here, All I want to do is after an update my theme options from backend I want to clear WooCommerce cart session/cache, So, I can see the changes right way without updating or adding anything.
I know WooCommerce cart session can be updated through an ajax But if I going to update theme options in the backend I how can run an ajax in the frontend that will clear WooCommerce cart session for me?
Or have anyone have an idea about it. let me know if you guys don't get me what really I want to do.
Hope it makes sense.
Thanks

Cart functionality in Magento from scratch

I'm fairly new to Magento and am setting up a new theme from scratch. I'm not using any of the standard Magento JS files until now and I've included jQuery and a js file for custom scripts.
Now I'm looking into recreating the Add To Cart functionality but standard wise this seems to call some js function which I do not have declared now (lacking the Magento JS files). I'd like to set it up on my own with an ordinary form submit.
Can anyone give me an example of how to execute the Add To Cart command for the product I'm currently viewing? Without the necessity of standard Magento JS files?
What Magento do for add to cart is it calls productAddToCartForm.submit function of javascript to validate all required field and if true then it submit product form.
So you can call your javascript method for form submit and add to cart.
Add to cart button comes from this file, so you can change onclick event here.
app\design\frontend\base\default\template\catalog\product\view\addtocart.phtml

joomla virtuemart customization

Is there any possible solution to develop this http://www.tailorstore.co.uk/tailor-made-shirts
kind of functionality in joomla virtuemart like any component or module available for this attributes ?
There is any possible solution with Joomla. Simply create a component that has the buttons and javascript to edit the image on the page you've shown there - and pass it all across into a virtuemart cart.
In terms of clicking on a button and changing the image - this is pretty basic javascript. See this How to add product to virtuemart Cart without saving to darabase? About adding a product into the virtuemart cart outside of virtuemart
Or use a simple shopping cart module like this: http://extensions.joomla.org/extensions/e-commerce/shopping-cart/10116
In terms of an existing component changing the images like on your site the answer is no it almost certainly doesn't exist - but that's the beauty of Joomla - being able to build it easily.

How to add bundled products to the cart simultaneously with checkboxes in magento

In Magento, I created a list of bundled products. In the frontend, along with each bundled product a checkbox is placed, so the user could select any number of bundled products with checkboxes, and add all of them in a cart simultaneously.
I wanted to know how I would be able to add all the selected bundled products to the shopping cart in a bulk.
Please check the link:
https://dl.dropbox.com/u/53435938/bundled-product-list.png
Any help would be much appreciated.
You can either:
Use ajax to post items to cart.
Use a use custom controller to add multiple items to cart (magento allows to add related items but you can't specify qty)
Maybe look at http://inchoo.net/ecommerce/magento/how-to-increase-magento-sales-with-one-simple-extension/ for inspiration on the module
Are you using the out-of-the-box bundle product type?
There is a way to setup such a bundle so that all of the items are "required" when purchasing the bundle. It should work out-of-the-box and you shouldn't have to pass anything to the add-to-cart function other than the ID of the entire bundle.
What you will want to do is edit the bundle product to have a single selectable product for each bundled option. Be sure to set the user-defined quantity to "no". See attached screenshot.

Resources