Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
See screenshot: http://www.zimagez.com/zimage/-28032014-140415.php
Generated code:
<div class="field-content">, <div class="form-item form-type-textfield form-item-quantity">
<label for="edit-quantity">Количество </label>
<input type="text" id="edit-quantity" name="quantity" value="1" size="1" maxlength="128" class="form-text" data-cip-id="edit-quantity">
</div>
, <input type="submit" id="edit-submit" name="op" value="Добавить в корзину" class="form-submit">, <input type="hidden" name="form_build_id" value="form-UuuOcuxF4ZYdczt-0HMF27B83181R4bdnjGzn8K5g7w">
, <input type="hidden" name="form_token" value="rJN-p6ULtruUDVE4eS7USibkDlR8uJbmQM9hXw-OZtc">
, <input type="hidden" name="form_id" value="basic_cart_add_to_cart_quantity_form">
</div>
If I use formatter "Addto cart button with quantity". On node fields display - all Ok.
What is this? And how to clear this?
Comment | File | Size | Author |
---|---|---|---|
#3 | basic_cart-2228001-3.patch | 654 bytes | cs_shadow |
Comments
Comment #1
VVS CreditAttribution: VVS commentedComment #2
Formatix Labs CreditAttribution: Formatix Labs commentedIt seems an error in basic_cart_field_formatter_view(...) function at basic_cart.module.
On the line 326 it should be
instead of
$element is array, but not form itself.
Comment #3
cs_shadow CreditAttribution: cs_shadow commentedAs mentioned in #2, $element is indeed an array and hence
$element = drupal_get_form('basic_cart_add_to_cart_quantity_form', $entity->nid);
is wrong. Attaching a patch that uses$element[] = drupal_get_form()
instead.