1

We recently started using a Full Page Cache on our website which basically rendered our old method for tracking product views useless as soon as the page becomes cached. Our old method was basically a code snippet in design/frontend/theme/default/template/catalog/product/view.phtml which was executed on page load.

Now it is possible for me to hole punch this code so that it can run on each page load - I was wondering before doing that if there is a possible alternative method of recording views on the product page whilst using a FPC & without using hole punching?

asked Dec 23, 2014 at 7:06
1
  • Hard to say without knowing what FPC you are using and what the code snippet does, but the likelyhood is you will need to send a request into Magento which in turn means you are most likely going to need a hole punch. Commented Dec 29, 2014 at 12:15

1 Answer 1

0

If you don't want to use hole punching you can load such data using AJAX request just after page is loaded.

Prepare controller action which returns that data for you. Then call this using JavaScript after page is loaded and update content with your new data.

answered Aug 18, 2015 at 5:32

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.