product photography – How to reduce reflections on flat lay mirrored sunglasses?

Besides setting up your lighting correctly, you can also use a polarizer filter to reduce unwanted reflections and to reveal the actual color of the glasses.

The polarizer filters that can be found nowadays are screw-on “circular polarizers”. They are easy to use: you simply turn the front ring to selectively throw away the right (amount of) reflections (the same way you would rotate a variable ND filter to reduce exposure, if you are familiar with that).

magento2 – M2.4 – Product prices not displaying on the front end including VAT

I have just migrated some products from 1.9 to 2.4, but for some reason even with the settings set up for VAT excluded price, and Price to display including VAT

But for some reason, the price is excluding VAT and then in Cart/Checkout the VAT is shown as a separate amount

categories – How to show given products only using product id array from specific category page in woocommerce

I would like to show only the list of product ids in the tax query using filter woocommerce_product_query

So I need to add an additional filter along with a tax query to filter to show only products with given ids.

\$tax_query() = array(‘add filter to show only specified products’)
\$q->set( ‘tax_query’, \$tax_query );

Thanks

discrete mathematics – Use the binomial theorem and the convolution identity to express in compact form the expression for the product of

Sum of c^(2(n-k))*(2n choose 2k)x^(2k) from 2k=0 to 2n with sum of c^((2(n-k))-1)(2n choose 2k+1)*x^(2k+1) from 2k+1=0 to 2n where c is an element of the set of rational numbers not 0

I found the compact form for both sums to be:
((c+x)^2n+(c-x)^2n)/2 = Sum of c^(2(n-k))*(2n choose 2k)x^(2k) from 2k=0 to 2n
((c+x)^2n-(c-x)^2n)/2 = Sum of c^((2(n-k))-1)
(2n choose 2k+1)*x^(2k+1) from 2k+1=0 to 2n

But at this point, I’m stuck. I don’t know how to use the convolution identity here to express the product of the polynomials.

I would appreciate it if you could give me some insight as to what the right approach should be here.

Apologies for not formatting this (not familiar with the Tex methods).

magento2 – How to get the stock quantity of simple products associated with configurable product?

I can get the stock quantity of simple products but not for simple products which is attached with configurable products.

Below is my code for simple product

``````<?php echo \$StockState->getStockQty(\$product->getId(), \$product->getStore()->getWebsiteId());?>
``````

How can I get the stock quantity for simple products which is associated with configurable product. Please help

linear algebra – Are vectors equal when their product is equal?

When we have such a simple outer products on two sides of the equation as below:

$$aa^T$$ = $$bb^T$$

where a and b are vectors,does it necessarily means a=b?

If yes, consider the equation:
$$1/n aa^T$$ = $$m^2bb^T$$
where, m and n are constant values. Now what does $$a$$ equal to?

$$`$$

mac mini – What results in the price difference for seemingly the same product?

I am considering buy the latest Apple Mac Mini M1 with 512GB storage from Apple or from Amazon. Apple lists it at \$899 while Amazon lists it at \$859. What is the hardware/software different that results in Amazon being \$40 cheaper than from Apple directly?

magento2 – Create fabric product which has meter as unit with default length

Want to create a fabric type of product which has Meter/Centi meter as selling unit in Magento 2.

I’m following this Question Can you sell product (fabric) by the metre in Magento?, we can use decimal unit in quantity with simple product which will work / please share other approach also.

I want this product to have 2 meters by default and than customer can add more as per his requirement. How can we achieve this.

Like
2 + User Input => This I can think we can achieve by custom option (other suggestion are also appreciated ) , but how can we have the default 2 meter quantity/ length for the product ?

WooCommerce with ACF: custom fields per product variation

I’m a little stuck here. So I have variable products and I need to show the output of a custom field in a custom tab.

So I created a new field in ACF, called ‘test’. I’ve got this to work for the product itself, but the content does not change when I select another variable.

The code I have to add a ‘Post type’ = ‘Product variable’ in ACF.

```add_action( 'woocommerce_product_after_variable_attributes', function( \$loop, \$variation_data, \$variation ) {
global \$abcdefgh_i; // Custom global variable to monitor index
\$abcdefgh_i = \$loop;
// Add filter to update field name

// Loop through all field groups
\$acf_field_groups = acf_get_field_groups();
foreach( \$acf_field_groups as \$acf_field_group ) {
foreach( \$acf_field_group('location') as \$group_locations ) {
foreach( \$group_locations as \$rule ) {
// See if field Group has at least one post_type = Variations rule - does not validate other rules
if( \$rule('param') == 'post_type' && \$rule('operator') == '==' && \$rule('value') == 'product_variation' ) {
// Render field Group
acf_render_fields( \$variation->ID, acf_get_fields( \$acf_field_group ) );
break 2;
}
}
}
}

// Remove filter
remove_filter( 'acf/prepare_field', 'acf_prepare_field_update_field_name' );
}, 10, 3 );

// Filter function to update field names
function  acf_prepare_field_update_field_name( \$field ) {
global \$abcdefgh_i;
\$field('name') = preg_replace( '/^acf(/', "acf(\$abcdefgh_i)(", \$field('name') );
return \$field;
}

// Save variation data
add_action( 'woocommerce_save_product_variation', function( \$variation_id, \$i = -1 ) {
// Update all fields for the current variation
if ( ! empty( \$_POST('acf') ) && is_array( \$_POST('acf') ) && array_key_exists( \$i, \$_POST('acf') ) && is_array( ( \$fields = \$_POST('acf')( \$i ) ) ) ) {
foreach ( \$fields as \$key => \$val ) {
update_field( \$key, \$val, \$variation_id );
}
}
}, 10, 2 );

// Add "Product Variation" location rule values
function my_acf_location_rule_values_post_type(\$choices){

\$keys = array_keys(\$choices);
\$index = array_search('product', \$keys);

\$position = \$index === false ? count(\$choices) : \$index + 1;

\$choices = array_merge(
array_slice(\$choices, 0, \$position),
array('product_variation' => __('Product Variation', 'auf')),
array_slice(\$choices, \$position)
);

return \$choices;
}

// Add "Product Variation" location rule match
function my_acf_location_rule_match_post_type(\$match, \$rule, \$options, \$field_group){

if (\$rule('value') == 'product_variation') {

\$post_type = \$options('post_type');

if (\$rule('operator') == "==")
\$match = \$post_type == \$rule('value');

elseif (\$rule('operator') == "!=")
\$match = \$post_type != \$rule('value');
}

return \$match;
}

```

and the code for the tab is

```add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab' );
function woo_new_product_tab( \$tabs ) {

\$tabs('test_tab') = array(
'title'     => __( 'Shipping', 'woocommerce' ),
'priority'  => 50,
'callback'  => 'woo_new_product_tab_content'
);

return \$tabs;

}
function woo_new_product_tab_content() {

// The new tab content

echo 'New Product Tab';
echo 'Here's your new product tab.';
echo get_field('test', \$post_id);
print_r(\$post_id);

}
```

Can someone help me on my way with this? Much appreciated!!