• Resolved ronen24

    (@ronen24)


    the output of variation doesnt work well
    this is the output i get
    ???? ???? pa_-:-, pa_-:–160-190—2–80-190, pa_-:–

    insted of the product name and variation name

    i have added a script to make it a bit more readale but it still doesnt work as i wanted

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Emily Wilson

    (@emilywil)

    Hello @ronen24

    Thank you for choosing our plugin.

    We apologize for the inconvenience.

    Please try to add the below code to your child theme functions.php file and try again.

    // Remove attributes name from the product title.
    function asnp_wepb_prepare_product_data( $data, $product, $item, $extra_data ) {
        if ( empty( $data ) || empty( $data['name'] ) ) {
            return $data;
        }
    
        if ( $product->is_type( 'variation' ) ) {
    		$data['name'] = $product->get_title();
    		if ( ! empty( $extra_data['attributes'] ) ) {
    			$attributes = [];
    			foreach ( $extra_data['attributes'] as $attribute ) {
    				$attributes[] = sanitize_text_field( $attribute['label'] );
    			}
    			if ( ! empty( $attributes ) ) {
    				$data['name'] .= ' ' . implode( ', ', $attributes );
    			}
    		} else {
    			$data['name'] .= ' ' . wc_get_formatted_variation( $product, true, false );
    		}
    
            $data['name'] = sanitize_text_field( $data['name'] );
    	}
    
        return $data;
    }
    add_filter( 'asnp_wepb_prepare_product_data', 'asnp_wepb_prepare_product_data', 10, 4 );

    I hope it helps.

    Best Regards

    Thread Starter ronen24

    (@ronen24)

    Hi, thank you for the response but it still doesnt work saddly.
    https://alina.tonight-sleep.com/product/bundle-jewis-bedmattress/

    Plugin Support Emily Wilson

    (@emilywil)

    Hi @ronen24

    Thank you for your feedback.

    OK we will check it out and fix it in the next versions.

    Thanks for your patience.

    Best Regards

    Plugin Support Emily Wilson

    (@emilywil)

    Hi @ronen24

    It is fixed in the new version, so please update the plugin and try again.

    I hope it helps.

    Best Regards

    Thread Starter ronen24

    (@ronen24)

    Hi, thanks for the update but it is still not resolved on my end. as you can see here:
    https://alina.tonight-sleep.com/product/bundle-jewis-bedmattress/

    Plugin Support Emily Wilson

    (@emilywil)

    Hi @ronen24

    You should remove the function that we have provided in the previous message from your child theme and try again.

    Also, make sure that you have updated pro plugin too, in case you have the pro version.

    In case the above information can not help you and you have the pro version, contact us here to get a premium support.

    I hope it helps.

    Best Regards

    Thread Starter ronen24

    (@ronen24)

    i have removed the function and it still the same.

    Plugin Support Emily Wilson

    (@emilywil)

    Hello @ronen24

    We apologize for the inconvenience.

    It should be checked on your site to find the issue. It can be done by our premium support service. If you have the pro version of the plugin please contact us here to get support.

    Best Regards

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.