• My account
    • (X)Sign in

      I am a returning customer at TYPO3 Multishop

      Enter your username and password here in order to log in on the website:

      Forgot your password?

      Not yet customer of TYPO3 Multishop?

      • Order history
      • Automatic generated e-mail history
      • Track your Order
      New at TYPO3 Multishop
You are here:

Help by translating Multishop in your local language

On the following page you can help by translating Multishop in your local language:

https://translation.typo3.org/projects/TYPO3.ext.multishop/

Spanish:

https://translation.typo3.org/es/TYPO3.ext.multishop/pi1/locallang.xlf

The following language are already translated by our supporters:

  • Dutch
  • German
  • French

Subtract Stock


Author Message
cindy
Cindy
Multishop experienced
Topic creator
registered since: 07.09.2011
Posts: 24
Hi,

I installed typo3_multishop 2.0.23 and in parameters, I have checked :
Subtract Stock = 1.

I have several products with stock and if I order, after the stock don't subtract. How can I do ?

Thanks you very much,

Best regards,
Cindy
Written on: 14. 03. 2012 [13:47]
bas
Bas van Beek
Multishop guru
registered since: 12.05.2010
Posts: 644
Are you using a customized checkout? Cause we have many shops that uses the SUBTRACT_STOCK setting.

I have tested it once more and it's working fine on our test server.

PHP
if ($ms['MODULES']['SUBTRACT_STOCK'])
{
    // now decrease the stocklevel
    $str="update tx_multishop_products set products_quantity=(products_quantity-".$value['qty'].&quot<img src="typo3conf/ext/mm_forum//res/smilies/icon_wink.gif" alt="icon_wink.gif" /> where products_id='".$value['products_id']."'";
    $res=$GLOBALS['TYPO3_DB']->sql_query($str);
    $str="select products_quantity from tx_multishop_products where products_id='".$value['products_id']."'";
    $res=$GLOBALS['TYPO3_DB']->sql_query($str);
    $row=$GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
    if ($row['products_quantity'] < 1)
    {
        if ($ms['MODULES']['DISABLE_PRODUCT_WHEN_NEGATIVE_STOCK'])
        {
            // stock is negative or zero. lets turn off the product
            mslib_befe::disableProduct($value['products_id']);
        }
    }
    // now decrease the stocklevel eof
}
Written on: 19. 03. 2012 [22:51]