SEO – Should I add the page number of the category to the breadcrumbs on the product page?

I am currently working on a website whose content is paginated. It is a list of products. There are many categories, but for the sake of simplicity we assume that I have only one category with many pages.

I have implemented the pagination so that search engines can index it. Here is my implementation:

  1. prev / next meta tags.
  2. Canonical URL that refers to itself (that is, the first page refers to itself and the second page also refers to itself).
  3. There are no indexing blocks for ?page= Pages.
  4. Bread crumbs for the first page are Main > Categorybut for all other sites they are Main > Category > Page X,
  5. Bread crumbs are also added to structured data, and I also have one ItemList structured data element representing the list of displayed products.

Everything works as expected. Currently, however, all my products have the following breadcrumbs: Main > Category > Product X regardless of whether my product appears on the first page or not. I was wondering if there is an SEO advantage if I change it in Main > Category > Page X > Product for the products that do not appear on the first page of my category?

I think this would be a welcome change from the UI perspective, but I'm worried that this could negatively impact my SEO. And I'm worried that my structured data crumbs might get a little worse. Google displays them in the search results, and I'm not sure if that's the case Page X would be a great detail to put it for a product path 🙂

Does anyone have any thoughts / experiences on this topic?

7 – To display a variation of a product in a viewport

My homepage has a view area that lists all the products eligible for promotion. Any product variant that can be set via a taxonomy term field with checkboxes to "Show in banner 1". The store owner can now select this check box to indicate that this product variant is in the promotion. However, this only works for product displays with only one variation. For example, if I check only this checkbox for "Product Variation 4" of a particular product and no other variations, the first variation will be displayed with a Variation Selection widget, and that's not what I want. So how can I just show this particular variation without the widget with all the correct data and a button to add to the shopping cart?

product – Magento 1.9 Mysql Query to retrieve data

I'm stuck in some way to get data from Magento 1.9.
The solution I needed is MySQL query so I can collect all the data in a table.

The values ​​in the table that I needed from the different table are
Product ID, name, article number, description, price, image name, image path, meta title, meta description.
I do not know much encoding, so definitely needed MySQL query.
I'm looking forward to a solution from experienced developers. cheers

PostgreSQL stores vectors and calculates the dot product

I'm working on a small NLP project in Python, where textual similarities are made to documents (news articles, blog entries, etc.), and I'm thinking of saving every document feature vector in Postgres. For example, I have a document with the content Breakthrough on cancer research...Provided, after all the Python preprocessing it would be something like ((1, 0.225), (2, 0.1), (5, 0.11),...) where the first element in the tuple represents the index of the "feature" (in this case a word) and the second element represents its "score / size".

If I now have a second document with a similar data structure, we say query_vector = ((1, 0.525), (6, 0.9), (7, 0.1221),...) I have to run a query like that SELECT * FROM vectors_table WHERE dot_product(vectors_table.features_vector, query_vector) > 0.5, What dot_product will do is a multiple of the "score / size" of both vectors, which will be the case in the above example SUM(0.525*0.225, 0.9*0, 0.1221*0, ...) (0 because the other vector has no score for the feature with index 6 or 7).

I have a working solution, but it is far too slow. My simplest solution is to store the vectors as jsonb so that they become something like {1: 0.225, 2: 0.1, 5:0.11, ...} and I have only the keys on the jsonb in another column (for a faster calculation of the array intersection later), then I have a UDF as such:

CREATE OR REPLACE FUNCTION dot_product_overlap(query jsonb, query_keys anyarray, target jsonb, target_keys anyarray)
RETURNS float AS $$
DECLARE 
    row integer;
    result float := 0;
BEGIN
       FOR row IN SELECT * FROM array_intersect(query_keys, target_keys)
       LOOP
          result:=result+((query->>row)::float*(target->>row)::float);
       END LOOP;
    RETURN result;
END;
$$  LANGUAGE plpgsql;

WHERE array_intersect is another UDF to calculate the intersection between 2 arrays (something like & in the intarray). This UDF first calculated the intersection between two key fields and then computed the multiplication only if both vectors have the same key and finally summed everything up.

This works fine, except that the extremely slow execution of a query on a 5000-document table takes ~ 5 seconds. Now I wondered if there is a more efficient way to store these feature vectors and execute the scalar product. I researched a bit and stumbled upon MADlib cosine_similarity Function (which in this case is essentially a scalar product), but AFAIK does not fit the structure of my feature vectors.

PHP – Product Filter WordPress Plugin: Implement the principle of individual responsibility

Plugin is a small editor that lets you create a filter such as a price slider, mark check boxes, and a seasons drop-down menu.

An example of how the plugin works can be found on the following page: http://demo-product-filters.anexter.net

Element classes are major classes of plugins, but they have too many responsibilities

  • Creating controls for the editor in admin https://i.stack.imgur.com/JDH3z.png
  • Rendering for which frontend with which user
    will interact
  • Apply selected options to the product
    Inquiry. For example, if the customer selected cat1 in the item,
    then it is necessary to change the query to the database for it to exist
    Only products of this category

Can you tell me which pattern or solution I need for the code to conform to SOLID principles?

class Drop_Down_Element extends Abstract_Filtering_Element {
    public function get_element_slug() {
        return 'drop-down';
    }

    public function get_element_title() {
        return __( 'Drop Down' );
    }

    public function get_url_key() {
        return $this->get_option( 'url-key' );
    }

    public function apply_filter_to_query( WP_Query $product_query, $filter_value ) {
        $tax_query_item = (
            'taxonomy' => $this->get_taxonomy(),
            'field' => 'slug',
            'terms' => $filter_value,
            'operator' => 'OR'
        );

        $product_query->set(
            'tax_query',
            array_merge(
                $product_query->get( 'tax_query', () ),
                ( $this->get_url_key() => $tax_query_item )
            )
        );
    }

    public function render_template() {
        $this->get_teplate_loader()->render_template( 'elements/drop-down.php', (
            'element' => $this,
            'items' => $this->get_items()
        ) );
    }

    protected function get_items() {
        $items = ();

        foreach ( get_terms( (
            'taxonomy' => $this->get_taxonomy(),
            'hierarchical' => true,
            'menu_order' => 'asc',
            'order' => 'asc'
        ) ) as $term ) {
            $key = urldecode( $term->slug );

            $items() = (
                'key' => $key,
                'title' => $term->name,
            );
        }

        return $items;
    }

    public function generate_controls() {
        $editor_panel = new Tabs_Layout( (
            'title' => $this->get_element_title(),
            'tabs' => (
                'general' => (
                    'label' => __( 'General', 'wcpf' ),
                    'controls' => (
                        new ControlText_Control( (
                            'key' => 'postTitle',
                            'control_source' => 'post',
                            'label' => __( 'Title', 'wcpf' ),
                            'placeholder' => __( 'Title', 'wcpf' ),
                            'required' => true
                        ) ),
                        new ControlText_Control( (
                            'key' => 'optionKey',
                            'label' => __( 'URL key', 'wcpf' ),
                            'placeholder' => __( 'option-key', 'wcpf' ),
                            'control_description' => __( 'The “URL key” is the URL-friendly version of the title. It is usually all lowercase and contains only letters, numbers, and hyphens', 'wcpf' ),
                            'required' => true
                        ) ),
                        new ControlSelect_Control( (
                            'key' => 'itemsSource',
                            'label' => __( 'Source of options', 'wcpf' ),
                            'control_description' => __( 'Select source of options, that will be using to filter products', 'wcpf' ),
                            'options' => (
                                'attribute' => __( 'Attribute', 'wcpf' ),
                                'category' => __( 'Category', 'wcpf' ),
                                'tag' => __( 'Tag', 'wcpf' ),
                                'taxonomy' => __( 'Taxonomy', 'wcpf' )
                            ),
                            'default_value' => 'attribute'
                        ) )
                    ),
                ),
                'visual' => (
                    'label' => __( 'Visual', 'wcpf' ),
                    'controls' => (
                        new ControlText_Control( (
                            'key' => 'cssClass',
                            'label' => __( 'CSS Class', 'wcpf' ),
                            'placeholder' => __( 'class-name', 'wcpf' )
                        ) )
                    )
                )
            )
        ));

        return $editor_panel;
    }
}


abstract class Abstract_Element extends Component {
    protected $project;

    protected $wp_post;

    /** getters, setters, options management **/

    public function get_default_options() {
        return ();
    }

    public abstract function get_element_slug();

    public abstract function get_element_title();

    public abstract function generate_controls();

    public abstract function render_template();
}

interface Filtering_Element_Interface {
    function get_filter_value( $default_value = null );

    function set_filter_value( $filter_value );

    function get_url_key();

    function apply_filter_to_query( WP_Query $product_query, $filter_value );
}

magento2 – Bulk update of product prices: Magento 2

In my M2 business I have over 200,000 products. They were added manually
via API (https://domain.com/rest/all/V1/products Call).

Nowadays, the prices of my products change frequently and I have to update all if I get a price list from my supplier.

What would be the best and fastest way to update the prices of all my products? API calls take too much time.

The CSV import with the M2 backend has given me some mistakes in the past because of the large number of products.

Any idea? One thought that comes to my mind is to write a PHP script to analyze my price-list CSV file and direct SQL queries directly to a database.

woocommerce – Product overlapping header

I've never seen this before, but my product pages overlap my header. Only product pages. This started when I added a page with elementor (an exact copy of another page) and a product (a duplicate of another product). Nothing else. Nothing in any code editors. I do not usually use elementor (I prefer classic text editor), but I had no problems when I used it before.

I've added padding to my site in custom CSS, but this will pad all the regular pages above the header.