code4business / freeproduct Goto Github PK
View Code? Open in Web Editor NEWMagento Extension: Add gifts in your shopping cart when meeting cart rules
Magento Extension: Add gifts in your shopping cart when meeting cart rules
The commit: "Add localizations for 'es_ES', 'fr_FR', 'nl_NL' and 'pt_PT'. " / 369558a
added a mapping in the composer.json which results in an error during installation
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing c4b/freeproduct (dev-master ffeb801)
Cloning ffeb80152c1ab3de1d935c9e9cd6d40708a129e3
Writing lock file
Generating autoload files
[ErrorException]
Source /home/myhaircosteexp/www/vendor/c4b/freeproduct/./app/etc/modules/C4B/Freeproduct.xml does not exist
For me, the following code in Freeproduct\Model\Observer.php salesruleValidatorProcess function
$freeItem = static::_getFreeQuoteItem($rule->getId(), $sku, $item->getStoreId(), $qty);
Need to be changed to
$freeItem = static::_getFreeQuoteItem($rule->getId(), $sku, $quote->getStoreId(), $qty);
As I have a multi-lang store, I need the free product be the same language as the current quote language.
I'm not sure the reason why use $item->getStoreId, so I simply add the issue here.
Hey guys,
So I downloaded the repo and uploaded to server.
Created a new Shopping Cart Rule, selected the 'Add to Gift' option, set Discount Amount to 1, and entered Gift SKU.
However, whenever I save the Shopping Cart rule, the Gift SKU never seems to be saved? Always shows up as a blank field afterwards.
Anyone have an idea as to how/why that could be happening?
I installed this extension with Magento Connect. I configured to add under cart price condition, but it's not working.
When we use this module and the customer get's a free gift in the the cart there is a problem with events. When a customer goes back to the product page or other page there is a event fire for removeFromCart.
I have these skus in the catalog: PROD1 and GIFT1.
If I purchase PROD1 I'll get GIFT1 for free. If I purches 2 PROD1 I sould get 2 GIFT1 for free and so on.
To accomplish this task I have a shopping cart rule so that if there is an item in the cart with sku PROD1 so add GIFT1. With this rule the quantity field in shopping cart is ignored. To let it work I should add a rule for each possible value for the field QUANTITY. So I should have rules like "if there is sku PROD1 and Qty is 1 add 1 GIFT1", "if there is sku PROD1 and Qty is 2 add 2 GIFT1" and so on. Suppose there are 10 skus of this kind, if I want this to work up to 10 quantity for each sku I should add 100 rules.
Hope it's clear. Thank you for your attention.
For now have issue when setup bundle product as gift:
Fatal error: Call to a member function getValue() on a non-object in /var/magento/app/code/core/Mage/Bundle/Model/Product/Type.php on line 940
The repository has no tags, so if you want to install a specific version using composer, you have to specify a commit hash, like "dev-293021251bac87ae5849fd8ff5c080c743e1cb94"
. It would be great to have tags on the merge commits.
I'd suggest using Semantic Versioning but any kind of version tags understood by Composer are better than none.
I try to use it with Magento 2.4.2
My website get down with error ( Area code ...etc) State.php line 153 .
I tried to return back be romving the module, but the problem keep shows up! Because the module made some changes on Magento.
So the only way is deleting everything (Website & Database), then used my backup for the time before I installed it.
Hi,
is it possible to bring the 1.0 version to Magento Connect?
Works better with some extension install systems ;-)
Greetings Jan
When I try to order only the free product I don't make it to the checkout, because when I removed the last regular item the free product is removed as well.
Any idea how to fix that?
Edit:
I also can't add the free product to the cart only
Hi there,
If I add 1, 2 or 3 of a qualifying product to the cart, it correctly adds 1,2 or 3 of the free gift. But, if I add say 6 of the qualifying product to the cart, the free gift items seems to be limited to 3. Has anyone else seen this?
I have tried to add a downloadable product as a free gift product. The downloadable product is displayed in the cart and also shows up as one of the Ordered Items after completing the checkout process. However, it is not displayed under My Downloadable Products in the Customers Account.
It seems that no information is stored in the downloadable_link_purchased
and downloadable_link_purchased_item
database tables upon checkout.
More info on this issue can be found on magento.stackexchange.com.
If you apply a discount coupon that causes the conditions of the free product to no longer be met, the free product is not removed from the cart.
It does not take into account when you add or remove the coupon.
The shipping cost is not calculated with the weight of the gift product.(Gift product weights 0)
regards,
Pedro
Hello,
When I tried to add products into basket, there is an error message:
Cannot send headers;
headers already sent in /var/www/.../app/code/community/C4B/Freeproduct/Model/Observer.php, line 1
How to fix this error?
it automatically redirect to shopping cart from onepage cart page. order success page not showing and order submitted.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.