Magento: pass custom value per product in order - php

I have created custom field (dropdown field) in Magento cart page. User will able to choose any option from this field. I have created this field manually means I didn't use Magento product custom option. My requirement is that now I want to pass the field value whatever the customer wants per product in order.
thanks

Related

custom product options,there price is dependent on another?

Is there a way to create custom product options in a way that the one's price is dependent on another (without using the configurable product) ? and i'm using only custom options.
Like for example we have product that have a custom option Print Type a radio input having some options [A-Type, B-Type, C-Type] and one more option Sizes [XXX,XX,X,L,X,S].
And my question: If we change Print Type, the price of Sizes should reflect according to the selected Print Type. Should i have to use a observer to bind option prices to each other or any other method??

Magento, insert value in a custom attribute after save products

I've created a custom attribute for products in Magento, I want insert this value after the product is saved, because I must insert a code that read the field weight and calculate the price of spedition for that. I need that value because I must send that value in a module for eBay that takes all value in products when I launch it. I am a beginner in Magento. So do you have some code, info or other that can help me, how I can do that?
Hi you can use catalog_product_save_after event which trigger after product saves . you can listen this event and get all product data and you can set any attribute value from there.

Woocommerce: Adding customizable product seperatly to cart

I have product with a custom field. This custom field will be filled by the user (add a custom text).
The problem now is, if the user want to buy twice the same product but with different text, the product will be shown in the cart and also in the order as 1 product with the quantity of 2, instead of two separate products.
Variable product is not an option as every user can enter in the text field whatever they want.
I really digged in to the code, but I don't find the point where I could hook in to.

How to set price of product by user, prestashop

Im trying to set custom price for some products entered by user. Simply i have a module with form, and i want user to input price. then the data from user will be used to check out.
Basically, user inputs 45$ for product, he click submit, and i want the product appear in the cart with the price that user specified.
i tried some of these prestashop methods, but there is no way to set price, just quantity and pruduct_id
$cart->updateQty(1,2 );

Adding only the base product into cart of a bundled product in Magento

I am trying to add a base product of the bundled item (with no configuration, or additional products added into the bundle). None of the configurable items are required, and the price of the bundled item is set to a fixed price.
I've attempted to try the solution given here: http://www.magentocommerce.com/boards/viewthread/17289/
if (empty($optionIds)) {
// return Mage::helper('bundle')->__('Please select options for product.');
$selectionCollection = $product->getTypeInstance(true)->getSelectionsCollection($product->getTypeInstance(true)->getOptionsIds($product), $product);
$bypass_sel_arry = $selectionCollection->getData();
$options = array($bypass_sel_arry[0]['option_id']=>$bypass_sel_arry[0]['selection_id']);
}
But I've noticed that when the item gets added to cart, it automatically picks up the first option in the configurable items.
Any help would be appreciated.
This will need jQuery involvement.
You should follow the following approach, it is bit tricky but it may resolve your problem.
Associate the simple product with bundle products.
Make the show type check-box.
Display the price of simple products associated in the product view page.
Convert the type check-box to button with text labeled as "Add to cart". This will give you many add to cart buttons on a product detail page.
Pass the id of the product in any attribute of the button.(This will be done via code customization)
//Code to get ID, pass this in any of the button attribute
$product_id = $this->getProduct()->getId();
//Code to get the button clicked id
$("#btnDel").click(function(){alert(this.id);});
When the button is clicked get the id of the product and go to url
http://magentoserver.com/checkout/cart/add?product=[productID]&qty;=1
This will add your product in the Cart.

Categories