<div class="am-ss-product-wrapper">
    <div class="am-ss-product" id="am-ss-product-<?php p($product->pk()) ?>">
    <form method="post" class="am-ss-add-form" data-product_title="<?php p($product->title) ?>" data-product_id="<?php p($product->pk()) ?>" data-product_credits="<?php p($product->credits) ?>">
        <div class="am-ss-product-title">
        <h2><?php __e($product->title) ?></h2>
        </div>
        <div class="am-ss-product-desc">
            <?php if(isset($product->img) && $product->img): ?>
            <div class="am-ss-product-desc-img-wrapper">
                <img class="am-ss-product-desc-img"
                      src="<?php echo $this->url("data/public/{$product->img_path}") ?>"
                      alt="<?php p($product->title) ?>"
                      title="<?php p($product->title) ?>" />
            </div>
            <?php endif ?>
            <?php __e($product->description) ?>
        </div>
        <div class="am-ss-product-add-container">
            <div class="am-ss-product-terms">
                <div><?php __e('Credits') ?>: <?php p($product->credits) ?></div>
            </div>
            <div class="am-ss-product-buttons">
                <?php if ($balance >= $product->credits) : ?>
                <input type="hidden" name="product_id" value="<?php p($product->pk()) ?>" />
                <input type="submit" name="_submit" value="<?php __e('Order with credits') ?>" class="am-cta-ss" />
                <?php else: ?>
                <em><?php __e("Insufficient credits") ?></em>
                <?php endif; ?>
            </div>
        </div>
    </form>
    </div>
</div>