marianokit / magento-w2p

Automatically exported from code.google.com/p/magento-w2p
0 stars 0 forks source link

Template XML caching #221

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
We request template XML from ZP every time a product is shown for
personalisation.

We need to cache that XML somewhere somehow so that no request goes to ZP
if there is no user id. The only reason we go to ZP for it every time is to
get user cache data. No user - no data, so use a locally cached XML.
It will speed up showing the product for the first time.

Original issue reported on code.google.com by zetapri...@gmail.com on 26 May 2010 at 8:14

GoogleCodeExporter commented 8 years ago

Original comment by Anatoly....@gmail.com on 21 Jun 2010 at 5:37

GoogleCodeExporter commented 8 years ago
Test it on magento (DEV)

Original comment by Anatoly....@gmail.com on 24 Jun 2010 at 8:58

GoogleCodeExporter commented 8 years ago
1. Kill all magento cookies.
2. Choose a template
3. Kill the cookies again, close the browser
4. Change a field name in the template on ZP
5. Open the same mage product and check that the fields didn't change (comes 
from a local cache)
6. Update it couple of times.
7. Navigate away from the product
8. Come back to the product - you should see the fields changes as per the 
change in the template because the XML now comes from ZP.

Original comment by zetapri...@gmail.com on 24 Jun 2010 at 9:04

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
7. Navigate away from the product -  this won't trigger user registration on ZP.

Follow this steps:

7.1 Update preview (the user will be registered on ZP)
7.2 Navigate away from the product

Original comment by Anatoly....@gmail.com on 24 Jun 2010 at 10:00

GoogleCodeExporter commented 8 years ago
Some additions to exist documentation: 
http://code.google.com/p/magento-w2p/source/detail?r=869

Original comment by Anatoly....@gmail.com on 24 Jun 2010 at 10:14

GoogleCodeExporter commented 8 years ago

Original comment by zetapri...@gmail.com on 25 Jun 2010 at 7:38

GoogleCodeExporter commented 8 years ago
Tried a few different variations just in case I got the testing part wrong. 
Bottom line, the field name changes on page refresh after I change it on w2p 
site. This means it is not locally cashed right?
Tested on this product:
http://ec2-174-129-95-130.compute-1.amazonaws.com/magento/index.php/testing/fsbo
-vertical-sign-01-3-photos-18-x-24-testing.html?SID=4o2nli4c1m05qkocc5ut4rhlv1

Ex. 1
1. Followed the steps and got to the field changing part.
2. Didn't refresh the page in the store and just hit "Update preview" with the 
fields populated
3. The field whose name I changed got ignored (changed_field_name_1.png) and 
didn't show in the template preview

Ex. 2
1. Followed the steps and got to the field changing part.
2. Navigated away from the page (also tried refreshing it) and came back.
3. Field name was changed (Field "Content" was changed to "Changed field name"):
http://ec2-174-129-95-130.compute-1.amazonaws.com/magento/index.php/testing/fsbo
-vertical-sign-01-3-photos-18-x-24-testing.html?SID=4o2nli4c1m05qkocc5ut4rhlv1

Basically, the field name changes as soon as I change it on w2p site. Weather I 
have cookies cleared or not, leaving the page and coming back, refreshing the 
page, refreshing the page with clearing browser cache... field name is updated 
instantly.

Original comment by agur...@gmail.com on 25 Jun 2010 at 12:04

Attachments:

GoogleCodeExporter commented 8 years ago
Test it on magento (DEV)

Original comment by Anatoly....@gmail.com on 6 Jul 2010 at 5:19

GoogleCodeExporter commented 8 years ago
Followed the testing instructions and got same results as before. The field 
name changes as soon as I change it in the w2p site. Tested on this template, 
the new field name is "Changed this field name".
http://ec2-174-129-95-130.compute-1.amazonaws.com/magento/index.php/testing/fsbo
-vertical-sign-01-3-photos-18-x-24-testing.html?SID=4o2nli4c1m05qkocc5ut4rhlv1

I can't seem to make this happen:
5. Open the same mage product and check that the fields didn't change (comes 
from a local cache)
The field name changes (tried clearing cookies and cache)

Original comment by agur...@gmail.com on 7 Jul 2010 at 11:34

GoogleCodeExporter commented 8 years ago
I need to test it with assist from ZetaPrints side.

Original comment by Anatoly....@gmail.com on 8 Jul 2010 at 5:52

GoogleCodeExporter commented 8 years ago
The easiest is upload 2 CDRs with those field differences.

Original comment by zetapri...@gmail.com on 8 Jul 2010 at 6:13

GoogleCodeExporter commented 8 years ago
Please, re-test it again. I switched off SID in URLs.

Original comment by Anatoly....@gmail.com on 8 Jul 2010 at 7:50

GoogleCodeExporter commented 8 years ago
As far as I can tell, seems to work OK now.

Tested it on thisw product:
http://ec2-174-129-95-130.compute-1.amazonaws.com/magento/index.php/testing/xml-
cache-testing.html

Of this template:
http://magento.zetaprints.com/?page=template;TemplateID=0CA80F88-3747-4AEC-96C1-
06FE7C3549D1

1. Opened the product page
2. Cleared the cache and cookies
3. Changed a field name in the template on the w2p site
4. Refreshed the product page (field name remained unchanged, meaning the XML 
is cached)
5. Field name remains unchanged even on page refresh and page refresh with 
cache clearing
6. Populated the text field in question and regenerated a preview - field was 
excluded from the generated preview
7. Refreshed the page after the preview regeneration - field name was updated.

Behavior in a nutshell:
XML is cached when there are no cookies. After the cookie is downloaded (which 
happens only if a preview is generated), the XML is updated and changes appear 
after the next page refresh.

Original comment by agur...@gmail.com on 8 Jul 2010 at 11:46

GoogleCodeExporter commented 8 years ago

Original comment by zetapri...@gmail.com on 9 Jul 2010 at 4:06