product-attributes.phtml 700 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * @version 7.5
  4. */
  5. /* @var \Ppb\Db\Table\Row\Listing $listing */
  6. $form = new \Listings\Form\Purchase($listing, null, 'buy');
  7. $form->setData(
  8. $this->request()->getRequest()->getParams());
  9. /** @var \Cube\Form\Element $element */
  10. foreach ($form->getElements() as $element) {
  11. $name = $element->getName();
  12. if (strstr($name, 'product_attributes')) {
  13. $element->setRequired(false);
  14. $this->script()->addBodyCode($element->getBodyCode());
  15. ?>
  16. <div class="form-group product-attribute-element">
  17. <label><?php echo $element->getLabel(); ?></label>
  18. <?php echo $element->render(); ?>
  19. </div>
  20. <?php
  21. }
  22. }