I hase set some special price, with a start date, and no end date.
Now I want to remove all the special price.
so no discount.
I went to the catalog view, I select ALL products, and clicked on "change attributes".
I've check the "updated" checkbox beside start date, and special price.
then I click apply.
I can see the special price disappeared, but... on the front end, I can still see the promotion!
How is it possible?
Now note that If I select a product on the backoffice, and If I click on "save" (without editing anything) then it works on the front end!!
Of course I re-indexed everything and cleared the cache.
I have 20k products so I cannot select all products one by one to click on "save"
thaks for your help
Rod
I use magmi for this. Most bulk operations are possible here. You'll definitely need this if you say you have 20k+ products.
Outside of this solution, you'll probably have to do stuff manually, write a script to manage the mass update, or write a direct SQL statement to update this. I'd post a query here but it can be too varied because of Magento's EAV system.
Related
Using Shopify Scripts :::
I am trying to achieve the below but getting issue. Could you please let me know how to do this.
$25 off a purchase of $125 or more from the "sale" section. These products have a tag "sale" and are also in a collection "sale" based on that tag.
Looking forward for your quick response.
Great Thanks
If you examine the documentation for Shopify Scripts you'll notice that there is no support for auditing the line item for tags. So you should try the other approach which is proven, and works well.
Look for an item with a compare at price. If you find one, then that typically means the item is on sale. So you can rig your logic to look for items with a compare at price, and if they have one, then determine if the cart has exceeded the $125 in value, and if so, apply your discount.
I can't give you the exact code as I don't know the structure of your code. But this is what you need to do.
Wherever a product can be added to the cart assign a JavaScript function to check if the product is of "Sale" collection. If yes, add an attribute cart.attributes.something.something and keep changing it as and when required.
When the checkout mechanism is present in the page, and if your conditions satisfy the Sale discount, take then to /checkout?DISCOUNT=<CODE> and click of checkout. It'll automatically apply the discount.
I need to remove all special prices in my magento stores and I can't understand a thing about magento's database structure when I look into phpMyAdmin.
Can someone guide me?
Thx.
There's an easy way around to remove all the special prices from all products. You don't actually need to run any script. Just go to the administration -> catalog -> manage products and click on select all at the top left of the grid view. Then, in actions dropdown on the top-right, select Update Attributes and press Submit.
See the screenshot below:
Now, in the Update Attribute Screen, scroll down to Special Price field, and check the Change checkbox. DO NOT put anything in the text box. Click on save.
See the screenshot below.
It might take a while if you have many products, but it will work without disturbing your database. Once done, go to Index Management and Re-index everything.
You have 2 ways of resolving this:
1) Look more at the Magento database, It uses several tables to map prices etc. As well as a single flat table if you have that enabled. To update all prices you need to look for the special price value in the varchar table, Take that ID and update its parent.
2) Create a PHP script that will load all products and loop through and update the values you want. Basic code would be:
// inside a loop
$product->setSpecialPrice(0);
$product->save();
An easy way to debug what SQL you need is to enable MySQL logging, Save a product and see what tables are being wrote to. Or even in the product catalog save event add an echo to the Entity after save to print out the generated SQL.
If you want to remove special price then create csv file for import and add blank valspecial price field using SKU and import that csv. Its remove all special prices.
Direct from database.
Before execute bellow query export and keep backup "catalog_product_entity_decimal" table.
execute bellow query.
DELETE from catalog_product_entity_decimal where attribute_id in (
select attribute_id from eav_attribute where attribute_code =
'special_price');
You can just select fields blank and save changes then all special prices will be remove.
image attached here
The Question is why you need to remove them? You could also hide them using CSS, quick and easy but once again... you should evaluate this need and solution! Hope it helps!
Ok so what I want is to have multiple simple products draw from the same stock.
Scenario
I have a sinle nail file (Stock:500)
I have a box of nail files (50/box)
I want it so that if someone buys a box then it deducts from the 500 stock of the singles. Essentially what we do is if someone buys a box, then we ship them 50 of the single files in a box.
Any easy way to do this?
This isn't a native function of Magento, so there a few approaches you can take to emulate it:
Use an external stock management package to keep track of stock and modify Magento to use that. This will require more backend modification.
Attempt to fool Magento by using product bundles in clever ways. This will require more frontend modification
Develop or find a Bill of Materials plugin for Magento. I didn't see anything after a short search, so you may have to build it. Have that module check the constituent materials for a product before allowing it to be added to the cart.
Hope that helps!
Thanks,
Joe
Consider:
Create a template for the products that you wish to order this way. This template need only be the files you need to modify, by default it will find the missing files from your default theme;
In the template you can place some PHP to write out some extra javascript, of the prototype variety;
This frontend code hides the real quantity box, with prototype 'hide' for the relevant css id to make it a hidden form field;
The code shows its own quantity box, also an extra field for how many of the fifty packs are required;
An onchange event on these boxes gets the values of the boxes, does the required multiplication and addition, then updates the hidden 'real' quantity box with (boxes*50)+singles;
On submit the customer sees in the cart the total quantity of the product ordered - this will be total units, not broken down 'per box'. If this is a problem, you can put some words to explain that or modify your main template to handle this and present to the customer the boxes+singles breakdown;
Set your products to use the 'new theme' that has your template update code.
Test, test, test!
As mentioned by Joseph this cannot be done out of the box. The above workaround is only partial, however, so long as you make it clear to customers that they are buying 500 units instead of 500 boxes then you should have a reasonable solution.
Is it possible to have a bundle product that when added to the cart adds each of the bundle items as individual line items.
I want to allow my customers to configure their product (let’s say it’s a computer) and then in the shopping cart, remove an item they don't want - or change their mind about - from that bundle. They might then choose to add a new item instead - or a bunch of other (non-bundle stuff, just normal shopping).
The idea being that they have a fast method of adding most of the stuff they want in this bundle, but they can then edit their cart to add something that wasn’t available as an option to them when configuring the bundle.
I don’t want to overload the user with too many options in the bundle product page.
I might have missed an option in Magento, but currently it adds all the bundle items into the caret as a single line item, making it uneditable in the way I want.
Any suggestions please?
This behavior in Magento is intentional, as you may not want to let a customer order a PC without a CPU or memory. In your case, this assumption appears not to be the case, but that remains the method for using bundled products.
There are a few options open to you to avoid this situation. Firstly, you could use some product type other than bundle, and actually add simple products to your cart rather than the bundled ones. This would allow customers to add options at will, but would not preserve any promotional pricing on the products, as Magento checks those prices/discounts on every page load, and would kick out any changes you set manually.
The other option would be to allow customers an easier path to changing the bundle product that they have chosen. When rendering the bundle product, you could render a little X button (or whatever you find appropriate), which would lead to an action you specify, whose job it is to change the bundle options, resave the cart item, and redirect the user back to the cart. This is probably the cleanest solution to the problem.
Hope that helps!
Thanks,
Joe
I am running a Magento store where someone can buy a personalized item with their name on it. Under the product, you see "Name:" with an input box where they can fill out their name. They click "Add to Cart", it ads it, I fill the order and everyone's happy.
But, in order to purchase another product with a different name, they have to go from the cart back to the product. Its a mess.
I'd like there to be a button under the "Name" field that says "Add Another". Upon click, it pulls down another field for "Name:". Now we see two name fields, I add "John" and "Joe" in the first and second fields, then click "Add to Cart".
In my cart, I now see two products added. One with Johns Name, and one with Joes.
Any and all help is greatly appreciated. I'm a Wordpress guy trying to figure out Magento!
This is not really a simple addition, but basically you'll need to modify app/code/core/Checkout/controllers/CartController.php to call addProduct for each of the items in the form. This isn't really a trivial change, as you'll have to rip apart that method to make it load the products in sequence.
Another approach would be to use an event (such as checkout_cart_product_add_after) to keep track of when an item is added and see if extra parameters were passed, adding more items as necessary.
Alternatively, you may be able to use related products to accomplish this (since they are added to the cart as well). I haven't looked at how to approach that one, but it may be worth a look.
Hope that helps!
Thanks,
Joe