How to display attributes SKUs and Description above Add to Cart button - php

I am using WordPress WooCommerce. I have a requirement to display SKU and Description of ATTRIBUTES above Add To Cart button on Product page.
Right now Description is above the button and SKU is below the button.
Current result
How can I display them above the button? Also, right now Description appears after selecting Product Variables, I want it to display all the time, just it can change upon changing selection.
Expected result
I checked in WooCommerce template files, there are different PHP files for displaying both SKUs and Attr Desc.

Related

Change order of dropdowns on single product page

I am trying to change the order of the dropdowns on a variable product in WooCommerce. I want the quantity dropdown to be the first dropdown, and then the variation dropdowns afterwards.
Here is what it looks like now:
I know my way around PHP, MySQL, and some other languages, but I haven't written any custom code yet.
Any suggestions would be outstanding.
You can do this using WooCommerce attributes.
Go through Products > Attributes , in your dashboard.
Select your attribute (eg. Variation Option1) ,
There's an option called "Default sort order", change it to "Custom Ordering".
Go to your product edit page,
In product data section, Attributes tab, change the order of attributes using drag and drop
Save your product
Done!

Woocommerce 3 - Individual Add to Cart Button for Grouped Products

I have a grouped product and on the page there is a table with the individual products. For adding them to the cart you have to select the quantity or use the checkbox (if "sold individually" is selected). The add to cart button is displayed below the table.
I am trying to do the following:
Instead of showing the quantity field or the checkbox i would like to have an individual add to chart button for every individual product in the table.
I have found this question, but it does not work for me: Woocommerce Grouped Products with Individual “Add To Cart” Button
Does anyone has an idea how to do this? Many thanks!

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.

Opencart filter_id or value in product view

I am creating an open cart shop and I want to display filter value or id at product view
For example I would have a filter called "plastic", "metal" and etc.
Displaying the filter id or value would allow me to style the product via css.
For example product with "metal" would be a little more grey.
Is there any way to do that on open cart ?

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