Code Monkey home page Code Monkey logo

Comments (5)

toasty avatar toasty commented on August 19, 2024

Yeah that's intended behaviour. Well. In most cases. It depends where you mean exactly. Let me elaborate :)

To work out which associated product prices to show when the pages load (i.e. the 'price from' price) SCP does:

  1. Find the product with the lowest price (either special or normal, whichever's lowest) from the associated products
  2. Show normal price for that product
  3. Show special price for that product, if lower than its normal price.

It purposefully doesn't do:

  1. Find lowest normal price from the associated products and show it
    then independently
  2. Find lowest special price from the associated products and show it
    Because then as you say you can have an offer price higher than the normal price and things like that.

I don't think it would be terrible whichever way it works, but I went with what made most sense to me. I think this bit is ok.

However there's still a bug on product pages as mentioned in the readme here: http://github.com/organicinternet/magento-configurable-simple/ which is:

Open Bugs
* If an associated product has a special price, but another product associated to the same configurable product is cheaper yet doesn't have a special price, then on the product page the 'special price' html will not be displayed when the associated product with the special price is chosen.

I've not gotten round to fixing that yet.

It's because the 'price from' price (determined using the logic above) finds the associated product with the cheapest price, but this product doesn't have a special price so 'Special Price: blah' or whatever isn't displayed. That's fine. The bug is that on the Product page, when you pick your attributes such that a different associated product is matched, and that product does have a special price, SCP doesn't add the 'Special Price: blah' html. At the moment it can only show it if it was there when the page loaded, that is, if the original lowest priced 'price from' product had a special price too. Quite a silly bug really.

Matt

from magento-configurable-simple.

Sorcy avatar Sorcy commented on August 19, 2024

Ah, yeah, that is in fact what I was talking about, sorry for not being specific enough.

from magento-configurable-simple.

Sorcy avatar Sorcy commented on August 19, 2024

Just FYI: I solved this problem in a very roundabout way buy writing a javascript that checks if there is a span that could contain the special-price. If there is not it basically rewrites the complete price-box with the version where special-price and old price are included and from there on out it works beautifully.

Surely not the most sophisticated solution, but as a part time cludge it works just fine.

from magento-configurable-simple.

toasty avatar toasty commented on August 19, 2024

Cheers for letting me know. I think i'll have to do something similar, or force the special-price span to always be rendered by the php. I doubt it'll be anything very elegant either way :)

Did you have to do anything tricky to get it to work well? If so do you mind sharing the code?

from magento-configurable-simple.

zuiko avatar zuiko commented on August 19, 2024

Hi,
I don't really know if I face to the same issue:

  • My Magento is 1.4.1.0
  • I tried SCP 0.74 and 0.82

I have a configurable product which simples have each the same price and the same special price.
In the product list (grid), no problem for this product, the price and the special price are both displayed.
In the product page only the special price is displayed but without the words "Special Price:"

To find the issue I put some traces on app/design/frontend/default/default/template/catalog/product/price.phtml
and I found that for the product (alone) page the test
if ($_finalPrice == $_price)
is wrongly OK

I found also that in \app\code\community\OrganicInternet\SimpleConfigurableProducts\Catalog\Model\Product\Type\Configurable\Price.php
the public function getPrice($product) does not give the same result in the 2 cases.
When it works (in product list or grid)
$price = $product->getIndexedPrice();
gives a not null result and this result is used.
When it does not work (in the product page) the same instruction gives a null result thus the rest of the function is used
and gives a wrong result where $_finalPrice == $_price in the phtml

If someone has an idea to fix this I would be very glad ;-)

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.