radykal | Support Center Chooser

For which product do you need support?

Fancy Product Designer Multistep Product Configurator Another

Start a new topic
Answered

thumbnail of personalized products in cart

It would be very usefull for the customer if he sees a thumb of his personalized products during the checkout process. Right now he only sees the product image.

png
(20.5 KB)

Best Answer

I notice that its not working anymore in my demo site as well. I will fix that with the next update.


Thats already included, if your theme does not display the correct thumbnail, then the required WooCommerce hook is missing in your theme.

Can you name the missing hook so I can contact the theme developer?

Hey Rafael,

I switched on the debug mode and got the message that the woocommerce_cart_item_thumbnail Filter is missing. That's strange because I find this filter in the cart.php of my theme. The theme is the canvas theme from woothemes so it should be compatible to the woocommerce guidlines.

What can I do?

I have the same issue with DW Store from Designwall, but all hooks are ok in debug mode with Fancy plugin. Not changing product image after design is done and not changing image in cart...

This is the link

 

 Solved in my case. Need to remove image product. When I was inspecting the thumbnail under firebug, I seen that img sorce was the designed product, but thumbail still original image product!!! When I removed that product image, then show the fancy image :/

Thank's Raúl, that tweak also works for me now. Unfortunately there is no product photo anymore.

Answer

I notice that its not working anymore in my demo site as well. I will fix that with the next update.

Great! Looking forward for the update.

Hey! Thanks for the update on this.

Do you already have an idea when the update is coming?

I'm working on a prototype for a client and He's asking for a preview in the cart, so the customer is sure have to correct product.


Thanks and have a great day!

 Thanks for the job, man. Waiting for the update, certainly it is a very important feature...

For those who do not want for the update, here is a quick fix.


1. Open inc/class-cart.php 

2. Replace the change_cart_item_thumbnail with this code:

 

public function change_cart_item_thumbnail( $thumbnail, $cart_item=null ) {

	if( !is_null($cart_item) && isset($cart_item['fpd_data']) ) {

		$fpd_data = $cart_item['fpd_data'];

		//check if data contains the fancy product thumbnail
        if ( isset($fpd_data['fpd_product_thumbnail']) && $fpd_data['fpd_product_thumbnail']) {

        	$dom = new DOMDocument;
			libxml_use_internal_errors(true);
			$dom->loadHTML( $thumbnail );
			$xpath = new DOMXPath( $dom );
			libxml_clear_errors();
			$doc = $dom->getElementsByTagName("img")->item(0);
			$src = $xpath->query(".//@src");
			$srcset = $xpath->query(".//@srcset");

			$src[0]->nodeValue = $fpd_data['fpd_product_thumbnail'];
			$srcset[0]->nodeValue = $fpd_data['fpd_product_thumbnail'];

			return $dom->saveXML( $doc );

        }

	}

	return $thumbnail;

}

 

When i do that my cart page stays empty (white)

I am not sure if i am doing this right but the cart page stays empty with the theme i am using but also the 2014 and  2015 themes...

I have the same problem. Not changing product image after design is done and not changing image in cart... Thank you for answer.


Login or Signup to post a comment