= form_open("ecommerce/addCart", ['method' => 'post']) ?>
= form_hidden("product_uid", $entity->getPrimaryKey()) ?>
"구매수량 선택"];
for ($i = 1; $i <= $entity->getStock(); $i++) {
$quantityOptions[$i] = $i . "개";
}
?>
구매 수량 : = form_dropdown('quantity', $quantityOptions, 1, ['onChange' => "cal_price(this.options[this.selectedIndex].value)"]); ?>
구매 금액 : = number_format(($entity->getPrice() - $entity->getSale()) * 1) ?>원
= form_submit('', '최소:1 ~ 최대:' . $entity->getStock(), array("class" => "btn btn-outline btn-primary")); ?>
= form_close(); ?>