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
Hi ! Thanks for the answer, but where do you exactly put your code ?
Because it doesn't work for me
$modalWrapper.on('click', '#fpd-modal-done', function(evt) { ////////////////////////////////////////////////////////////////CUSTOM CODE //////////////////////////////////////////////////////////////// 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); } ////////////////////////////////////////////////////////////////CUSTOM CODE //////////////////////////////////////////////////////////////// jQuery('#fpd-modal-cancel').click(); if(<?php echo intval(fpd_get_option('fpd_lightbox_add_to_cart')); ?>) { $cartForm.find(':submit').click(); } evt.preventDefault(); })
I exactly put it here
in the file where woocommerce template single.php or in variable.php => wp-content/plugins/woocommerce/templates/single-product/add-to-cart/variable.php before the code
<?php do_action( 'woocommerce_before_add_to_cart_button' ); ?>
Hi Krishna,
I also added your code but its not working from my side. I added which you have mentioned correctly.
do you have any other solution?
Thanks,
Sushant
Hi,
So no one found a solution to get this preview before ? :(
Thanks,
Hi,
variable.php =>Check line no 121
class-frontend-product.php => Check line no 334 to 341
Hi,
Thanks for your update but it still doesn't work for me.
I compared our 2 files, and it looks like different
Which version you have? I join my files here
Krishna Priya
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?
1 person has this question