dongyi9330 2019-07-13 17:10 采纳率: 100%
浏览 51

访问3次时Joomla视图不更新数据

I've made my own shopping cart component, everything worked fine in development, but when in production it behaves diferent way. First I though it was due to the joomla session but then I changed the code to store the cart products in database, but the behaviour is the same: when visiting any of the products category for the second time and on, it shows the cart information showed when visited for the first time. This is a problem because the category products list needs to hide those products already added.

I've printed some data to the joomla console so I can explain the behaviour:

  1. Viewing category a. Displaying view in: 2019-07-12 21:24:22. Url: index.php?option=com_shoppingcart&type=1&category=0&scategory=0&data=&Itemid=323. Products added before: -. Products added on category a: 6108.
  2. Viewing category e. Displaying view in: 2019-07-12 21:25:03. Url: index.php?option=com_shoppingcart&type=5&category=0&scategory=0&data=&Itemid=332. Products added before: 6108. Products added on category e: 3824.
  3. Viewing category a. Displaying view in: 2019-07-12 21:25:40. Url: index.php?option=com_shoppingcart&type=1&category=0&scategory=0&data=&Itemid=323. Products added before: 6108, 3824. Products added on category a: 6130.
  4. Viewing category c. Displaying view in: 2019-07-12 21:26:17. Url: index.php?option=com_shoppingcart&type=3&category=0&scategory=0&data=&Itemid=322. Products added before: 6108, 3824, 6130. Products added on category c: 6166.
  5. Viewing category e. Displaying view in: 2019-07-12 21:27:12. Url: option=com_shoppingcart&type=5&category=0&scategory=0&data=&Itemid=332. Products added before: 6108, 3824, 6130, 6166. Products added on category e: 5984.
  6. Viewing category a. Displaying view in: 2019-07-12 21:25:40. Url: index.php?option=com_shoppingcart&type=1&category=0&scategory=0&data=&Itemid=323. Products added before: 6108, 3824. Products added on category a: 6787.
  7. Viewing category c. Displaying view in: 2019-07-12 21:28:06. Url: index.php?option=com_shoppingcart&type=3&category=0&scategory=0&data=&Itemid=322. Products added before: 6108, 3824, 6130, 6166, 6787. Products added on category c: -.

As showed above, when visiting the "a" category for the third time (step 6) it shows the same result when visited for the second time (step 2), then I added a product and go to "c" category for the second time (step 7) and the products added before seems updated until step 6.

I've tried:

  1. Cache Handler: file
  2. Path to Cache Folder: cache/
  3. Cache Time: 15
  4. System Cache: OFF | ON conservative | ON progressive
  5. Session Handler: PHP | Database
  6. Session Lifetime: 15
  7. Shared Sessions: YES|NO
  8. Cleared joomla cache
  9. Truncated joomla's session tables

I'm using Joomla 3.9.5

Can someone please help me, I will appreciate and thank any comment or suggestion.

NOTE: I'm storing my cart products on a very own table, not with joomla database session handler.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 怎么在stm32门禁成品上增加记录功能
    • ¥15 Source insight编写代码后使用CCS5.2版本import之后,代码跳到注释行里面
    • ¥50 NT4.0系统 STOP:0X0000007B
    • ¥15 想问一下stata17中这段代码哪里有问题呀
    • ¥15 flink cdc无法实时同步mysql数据
    • ¥100 有人会搭建GPT-J-6B框架吗?有偿
    • ¥15 求差集那个函数有问题,有无佬可以解决
    • ¥15 【提问】基于Invest的水源涵养
    • ¥20 微信网友居然可以通过vx号找到我绑的手机号
    • ¥15 寻一个支付宝扫码远程授权登录的软件助手app