radykal | Support Center Chooser

For which product do you need support?

Fancy Product Designer Multistep Product Configurator

Start a new topic
Answered

Show preview before add to cart

 Hi there,


Our client wants to display the designed product before add to cart performed ie to view the preview of designed product in product detail page like the screenshot attached. Is that possible?


jpg
(182 KB)

Best Answer

 Hi,


variable.php =>Check line no 121

class-frontend-product.php => Check line no 334 to 341

php
php
(7.44 KB)

1 person has this question

Hi,

I added the design preview like the above in the onclick event of fpd-modal-done function. I used the following

wp-content\plugins\fancy-product-designer\inc\class-frontend-product.php

var src3=fancyProductDesigner.getViewsDataURL('png', 'transparent', 0.3)[0];

if(src3!='')
{
document.getElementById('design_preview_div').style.display="block";
document.getElementById('design_preview').setAttribute( 'src',src3);
}

And in variable.php file template, use the following ,

<div id="design_preview_div" style="display:none" > <label for="design_preview_label" class="labelmargin">Design Preview:&nbsp;&nbsp;&nbsp;&nbsp;</label> <img id="design_preview" >

 

I'm searching exactly the same thing, it's important for me to show a preview before the user add to cart his product ! 
I

Login or Signup to post a comment