最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Magento: Javascript error on bundled product - Stack Overflow

programmeradmin3浏览0评论

I just created a bundled product and the price is ing out as

Price as configured: £0.00

Even though the product list item shows the correct price.

I think I've managed to track it down to a piece of javascript in

app/design/frontend/default/optimise/template/bundle/catalog/product/view/price.phtml

I'm getting the error Uncaught ReferenceError: bundle is not defined on this code:

<script type="text/javascript">
    bundle.reloadPrice();
</script>

There's no other reference to bundle in that file so I'm not sure where it's supposed to have been made.

Has anyone see this before?

Magento ver. 1.5.1.0

I just created a bundled product and the price is ing out as

Price as configured: £0.00

Even though the product list item shows the correct price.

I think I've managed to track it down to a piece of javascript in

app/design/frontend/default/optimise/template/bundle/catalog/product/view/price.phtml

I'm getting the error Uncaught ReferenceError: bundle is not defined on this code:

<script type="text/javascript">
    bundle.reloadPrice();
</script>

There's no other reference to bundle in that file so I'm not sure where it's supposed to have been made.

Has anyone see this before?

Magento ver. 1.5.1.0

Share Improve this question asked Jan 31, 2012 at 11:56 iamjonesyiamjonesy 25.1k42 gold badges144 silver badges206 bronze badges
Add a ment  | 

4 Answers 4

Reset to default 5

I had this problem as well.

I fixed it by adding <?php echo $this->getChildHtml('product_type_data') ?> to my product\view.phtml file, likely due to what iegik mentions in his answer.

The issue we were having was a conflict with jQuery. At some point I had added some embed code from MailChimp (which used jQuery).

Once I removed the mailchimp code. All was better

the bundle variable should be added to html if it was not added before. This is a Product.Bundle - prototype`s model.

var config = <?php echo $this->getJsonConfig() ?>,
    bundle = new Product.Bundle(config)

See https://gist.github./4203712 will help you to get know about methods like getJson, getJsonConfig...

Realised that I had mented out some code on the view.phtml page. Things I thought that I wouldn't need but it seems that certain JS scripts or elements were missing because of that.

发布评论

评论列表(0)

  1. 暂无评论