Zen4All-nl / Zen-Cart-Dynamic-Price-Updater

The Dynamic Price Updater is a module for Zen Cart that automatically updates the price display on product pages when a visitor changes an attribute or adjusts the cart quantity
GNU General Public License v2.0
2 stars 4 forks source link

zcDPU_Ajax: function setCurrentPage() - why? #16

Closed torvista closed 2 years ago

torvista commented 3 years ago

I don't see the point of this function within DPU. It just writes to whos_online.

Why?

Zen4All commented 3 years ago

Don't know, will look in to it

Zen4All commented 3 years ago

Looks like it is safe to remove the function from the module

mc12345678 commented 2 years ago

I don't see the point of this function within DPU. It just writes to whos_online.

Why?

Because of how ajax call data was being captured by Zen Cart prior to Version 1.5.5. Pre 1.5.5, just the ajax call was being captured as the "current page" within Who's Online (e.g. act=DPU_Ajax&method=dpu_update): . This resulted in a loss of URI data associated with the navigating customer and did not identify at what the customer was looking.

As of Zen Cart 1.5.5 (base version), the ajax call itself was omitted from being captured in the who's online data which makes/made the method $this->setCurrentPage() mostly unnecessary in modern versions.

This was described in the commit that added the class method.

torvista commented 2 years ago

ok, thanks!