Jump to content

Frontpage not removing expired discounts


JTimmer

Recommended Posts

We have a relatively new shop. We discounted some products with end date and there was at the top of our frontpage a list of discounted products. The discounts expired 2 days ago but the products were still on the FP. When you clicked them you saw normal price. When I manually emptied the cache they disappeared from FP as one would expect. I expect this to work automatically. What can be wrong?

V8.2 on Vimexx hosting (php 8.1, directadmin)

Link to comment
Share on other sites

It's hard to tell it is this module bug or other issue. Just for test you can change in this module method renderWidget to something like this:

public function renderWidget($hookName = null, array $configuration = [])
    {
            $variables = $this->getWidgetVariables($hookName, $configuration);

            if (empty($variables)) {
                return false;
            }

            $this->smarty->assign($variables);

        return $this->fetch($this->templateFile);
    }

 

Link to comment
Share on other sites

il y a 17 minutes, JTimmer a dit :

It's a Dutch shop, it's a specific price on the product page in the admin, with an end date. Maybe the English term is different?

It's not really a bug, either a not implemented feature. When you add end date in a rule (cart or specific price) there is no hook to notify core/modules expiration arrived. According to me you have 3 solutions:

  1. As @endriu107 suggested you change module code to avoid caching (bad performances)
  2. You open and save every day module ps_specials, this delete cache (no vacations, no we, no disease... 😉)
  3. You develop a module that in cron task check for end of time rules and delete template cache of ps_specials module and index
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...