Unable to sort configurable products based on attribute value and price - magento-1.7

Am new to Magento. Am unable to sort the products in my shopping cart based on price and attribute name -- qty. My attribute values are 750 ml, 500ml, 200ml and they have their respective price. Sorting using only price is working but i dnt know how to sort using the attribute value. The below code displays the minimum price value. But i want to display the minimum price value of the minimum attribute value
echo $this->getPriceHtml($_product,true);

The easiest way is to edit you attribute (in Attribute management) to be shown in product listing and Used for Sorting in product listing
In this way you are sure that the attribute is selected in the collection and it's available from the catalog/product template pages.

Related

How to dynamically filter based on different column in tableau?

I have two columns site and Profit catgeory.
Site --> A, B, C
Profit Category --> 1,2,3 [ It will be calculated dynamically, when data changes]
Data:
I want to filter site based on profit category.
Workbook:
If I select Site A in filter option, it hsould display all the sites which is in same Profit category as Site A. If Site A falls under Profit Category 1 means all Sites wchich falls under Profit Catgeory 1 should be dispalyed.
I am struck with this. Please help me to solve this.
You need to display a parameter control instead of a filter control.
Parameters are used to hold the (single) response from the user for making a choice. You can reference parameters in many places, including calculated fields. You can then use calculated fields as a filter.
You can combine these features in different ways. In your case, I suggest creating a parameter based on the Site field. Showing the parameter control and allowing the user to select a site. Then building a boolean calculated field to determine whether a record should be included in the analysis or not based on the selected site and the data values in the current record.
Filter on that calculated field and you should be able to get the effect you described.

how to change woocommerce quantity field value from gravity forms field?

I've tried changing the value of the woocommerce quantity field from another field using gravityforms plugin with number field and calculations form, but didn't work. How to do it? Please help
In the Woocommerce product, if you have the WooCommerce Gravity Forms Product Add-Ons plugin activated, you can select the form you want to use, then in the Form Display at the bottom, you'll see advanced options. For Replace Modified Items? select Yes, for Quantity and Stock, select Yes, and then choose the field you want to populate the cart's quantity.
The advanced options will look for a number or quantity field to replace the woocommerce product quantity.

How to add 2 buttons 'add to cart' getting with different data in Prestashop?

My product has 2 prices (discount price, old price). I want to add two buttons that add product with different price. How I can do it?
If you need to just show old/discounted price for a product use Specific Prices option in Prices tab of a prodct.
Or maybe you want to do that for a bunch of products.
The standard way to do that kind of things in Prestashop is by using price rules. In this case you may need to create a category like Sales/Offers. Assign all products you need to that category in their Association tab. Then go to Price Rules -> Catalog Price Rules + Add a new condition group (choose category here), create the price rule above based on your needs.

Tableau - Filter View Based on Different Variable

Is there a way in Tableau to filter a view based on its relationship with a different variable?
For example, say I have a dataset with variables Company (values = A, B, C) and Product (values = 1, 2, 3). In one view, I want to select a Product. In the other view, I want to filter to only Companies that have that Product, but I want to show all Products for those companies. The typical filtering approach in Tableau could easily show me which Companies have that Product, but the rows with other Products from the same Companies would be excluded by the filter.
Any solutions? I get the feeling I may be missing something simple.
Create a parameter to represent the product of interest. You can load the values of the parameter from the Product field, but will have to add/remove choices periodically as product list changes.
Place Company on the filter shelf, and use the condition tab to choose only companies that have that Product with a formula such as max(Product = [Product of Interest])
For more than one product at a time, create a set of Products instead of a parameter and change the formula to test for set membership instead of field equality. If you have a set of Products called [Products of Interest], note the plural, the formula is then simply max([Products of Interest])
The nice part about a set is that it notices changes to the database Products list automatically. The bad part about a set is that Tableau doesn't make it easy to add or remove elements from a set in the user interface unless you are using Tableau Desktop (at least not by version 10.1)
In addition to the methods explained by Alex, (if you are okay with having multiple sheets) you can have 2 sheets linked with an Action filter -
First sheet would just show the unique list of Products (this acts as the Source sheet)
Second source would contain whatever view you like to show with Companies and their products (this acts as the destination sheet)
Create an action filter between the 2 sheets and use the "Selected fields" under Target filters to filter using the Company field. This way, if you select any specific product(s) in the first sheet, all relevant companies would be filtered in the second sheet but all the products show up too!
EDIT: this is a good solution in many cases, but there are a few things to be careful about.
Note that the first sheet needs Company on some shelf, possible detail, so that field is available for the filter action. If there can be multiple companies per product, then that can complicate the viz a bit.

Paypal IPN using PHP to get customized Quantity and Amount

I have downloaded the sample paypal IPN script using php and customised with the email for the buyout option and it has also some hidden paramaters such as amount, quantity,return_url, notify_url like this. My main idea is to do the buyout option for the product purchase in my website.The current calculation for the product purchase is as follows:
Item Price:$20
Quantity :10
Total amount $200
I need the calculation to some different way as our site have some static set of quantities and prices, so our point of calculation is as follows:
Item Price:$20
Quantity :10
Total amount:$20
So, the total amount needs to be the same for the given number of quantities.The IPN configuration doesn't allow me to change the quantity field by this way, please suggest some ideas to overcome this issue.
The item price is price per item, the quantity is of course multiplied by the item price. Your second example should have $2 as the --Item-- price. If you want to sell "10 items for $20", I think you will need to make a new item for that combo and just but the actual quantity in a custom field.
If you want to use the same item and paypal's quantity field, I think you need to look into calculating a discount and making that part of the parameters (discount_amount_cart or discount_amount_X for item X I think).