Code Monkey home page Code Monkey logo

Comments (2)

toasty avatar toasty commented on August 19, 2024

Often this is Magento's javascript breaking when you've removed one of the price blocks that it expects to find, but it's hard to say without more info. If it's still a problem you can email/pm me a link and i'll take a quick look.

from magento-configurable-simple.

toasty avatar toasty commented on August 19, 2024

To summarise this one for future reference:

Magento’s Product.js javascript can break if you’ve removed the main price block on the product page.

Usually there are 2 price blocks on the product page, one that's up near the product name/stock/etc, and another that's nearer the quantity and add to cart button. The Magento js expects to find the one near the product name. If you've removed it, the js will break, causing SCP's javascript to break too, which usually has the result of changing the displayed product price to £0.00.

Specifically, the second of these blocks is a span with id something like ‘product-price-7564_clone’ (the id changes with the product) and the former is similar but without the '_clone', i.e. 'product-price-7564'. It's the former than needs to exist for the js to work.

So either reinstate the other price block, or rename the second one to remove the ‘ _clone’ bit and the Magento js will update the prices.

If you don't want to reinstate the main price block, to remove the _clone part of the id on the second price block you can change:

<?php echo $this->getPriceHtml($_product, false, '_clone') ?>

to
getPriceHtml($_product, false) ?>

in
app/design/frontend/base/default/template/catalog/product/view/price_clone.phtml

from magento-configurable-simple.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.