Jump to content

Product has '0' stock. How to add new stock?!?!


Recommended Posts

Updated for other reason.

This was in 1.1. final too. Maybe it's just a wrong working order. Maybe its designed in another way i would like it to be..

How dou you 'update' your stock??


I go to the product-detail-page in the backend and just beyond the Final retail price: I can change the stock.
Link to comment
Share on other sites

[pre]
function displayFormInformations($obj, $currency, $languages, $defaultLanguage)
{
global $currentIndex, $cookie;
$iso = Language::getIsoById(intval($cookie->id_lang));

$divLangName = 'cname¤cdesc¤cdesc_short¤clink_rewrite¤cmeta_description¤cmeta_title¤cmeta_keywords¤ctags¤cavailable_now¤cavailable_later';
$qty_state = 'readonly';
$qty = Attribute::getAttributeQty($this->getFieldValue($obj, 'id_product'));
if ($qty === false) {
if (Validate::isLoadedObject($obj))
$qty = $this->getFieldValue($obj, 'quantity');
else
$qty = 1;
$qty_state = '';
}
[/pre]

The above states that there is somewhere defined

Link to comment
Share on other sites

  • 4 weeks later...

function displayFormInformations($obj, $currency, $languages, $defaultLanguage)
{
global $currentIndex, $cookie;
$iso = Language::getIsoById(intval($cookie->id_lang));

$divLangName = 'cname¤cdesc¤cdesc_short¤clink_rewrite¤cmeta_description¤cmeta_title¤cmeta_keywords¤ctags¤cavailable_now¤cavailable_later';
$qty_state = 'readonly';

Where $qty_state = ''

Just take out the word readonly and leave the quote and it will be fine. Make sure you do a back up. This file can be found under your Admin name/tabs/AdminProducts.php

It worked for me. Your quantity box is set to Read Only for some reason which is clearly stupid!

Link to comment
Share on other sites

The quantity field in the product info page is set to read-only because this is where all the quantities for the individual attributes (combinations for new 1.0) are added together in a single figure. So, if you have 2 red, 3 blue, 1 yellow, the figures will add up to a total of 6 in the quantity box in the Product Information page (tab #1).

Each product you create must have a default attribute created, even if there is only one style/model/color/etc. There is a line towards the bottom of the Combinations page (tab #3) that says, "A default attribute must be designated for each product. " You may not think this would be necessary, but this is the only way to manage the quantities, as the quantities for each product must be entered here, even if there is only one style. You will note that the field for Quantities on this page reads: (Overwrites quantity on Information page). To make this more clear, I may have worded this, "Quantities entered here for all attributes combine to make a total on Information Page." A bit wordy, though...

It would not be a good idea to modify your code to make the Quantity on the Information page to not be read-only. You may have products that do need different attributes, so keeping this system as-is is probably best.

See this page for more instruction on how to create Attributes/Groups and how to create the product attribute combinations: http://www.prestashop.com/wiki/Attributes_and_attribute_groups/

Link to comment
Share on other sites

×
×
  • Create New...