Skip to content

Instantly share code, notes, and snippets.

@unlocomqx
Created January 19, 2024 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unlocomqx/77a8a504623df685b5c7924498ecc8bb to your computer and use it in GitHub Desktop.
Save unlocomqx/77a8a504623df685b5c7924498ecc8bb to your computer and use it in GitHub Desktop.
<?php
// The ID of the current product
/** @var int $id_product */
// The selected combination ID
/** @var int $id_attribute */
// The current selected quantity
/** @var int $quantity */
$oos = \Product::getQuantity(
$id_product,
$id_attribute,
null,
Context::getContext()->cart,
null
) < $quantity;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment