Jump to content

Table "specific_price"


GroundSurfer

Recommended Posts

Hello,

I am still using PS 1.7.7.3 (sorry).

I am adding a special price with "Db::getInstance()->insert('specific_price', $data);". Database entry looks perfect/ Admin-backend entry, too.

The problem: There is no price change in the shop front. If I add a (second) special price with the admin site, save and delete this, then the first manually added special price is correctly shown in the frontend. I guess it's a cache problem? So I tried:

Product::flushCache($id_product);
Product::updatePrice($id_product);
Product::clearProductCache($id_product);

... but no luck.

Can anyone help me what to do? Thank you very much!

Best regards,

Holger

Link to comment
Share on other sites

Use the SpecificPrice class instead of pure SQL

Let me know if it helped.

 

$sp = new SpecificPrice();
$sp->id_product = (int)$id_product;
$sp->id_shop = 0;
$sp->id_shop_group = 0;
$sp->id_currency = 0;
$sp->id_country = 0;
$sp->id_group = 0;
$sp->id_customer = 0;
$sp->price = -1; // -1 = does not overwrite the base price
$sp->reduction_type = 'amount'; // or 'percentage'
$sp->reduction = 10; // ex. -10 zł
$sp->from = '2025-09-14 00:00:00';
$sp->to   = '2025-12-31 23:59:59';
$sp->add();

 

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...