Configurable Option going berserk on Product Page in Magento - magento

I am a novice in Magento and kinda stuck badly here.
My Theme is ready in Magento and I needed a Size selection on my Product Page. So I searched and found out that it is done by having Configurable Product. I did all the steps mentioned here http://www.magentocommerce.com/knowledge-base/entry/creating-a-configurable-product
Few minutes later, I did create a Size dropdown which made me felt that I am not a useless hobo after all; but then reality hit me. The dropdown somehow is showing itself at a very odd position and I don't know how to fix it.
This picture shows it all:-
You can see that it's gone below the image whereas I want it right next to the image. The fact that I am not even able to fix the CSS or front end makes me feel worse.
Hence my question is, how can I bring it back to senses or do some code fixes so that it is shown at the right place.

Magento has a strange way of rendering configurable options on a product page. Basically, when you create a configurable product, you have the option of selecting whether the options fall in container1 or container2 (great naming, eh?) You can adjust this in the product edit screen under Design > Display Product Options In.
However, a much easier solution is to move container2 above container1 in your catalog/product/view.phtml file as all configurable products default to Block After Info Column.
This is the code you're looking to move if you're using CE:
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
<?php echo $this->getChildChildHtml('container2', '', true, true) ?>
<?php endif;?>

Related

Keep the fix price for configurable Product while choosing the attribute also but change for second place

In my site i am using configurable product and Price is showing at two different place in Product page. One is near product and one is at bottom of all details and i am giving label as "new subtotal". And the both price is changing based on what attribute i am selecting but what i want is to change price at one place only at bottom "New subtotal" label and i want to keep top price is fix even changing the attribute. I tried by doing some changes in view.phtml file to get price using getPrice() but it giving me the fix price at both places. Can anyone please help me.
If you are using magento default code in view.phtml then there will be code <?php echo $this->getTierPriceHtml() ?> which display price with html.
In stead of above, just use $_product->getPrice() to display price without default magento html.
Hop this will help.

product prices not updating in configurable products

I am looking at creating a configurable product that has various prices.
Having looked at this, it seems that when you select an option, that has another price, the price field of the product options section does not update.
I have provided an image below:
Image
You can see that I have selected a product option, Oxygen, which is £273. I was expecting the product price of the option to update to match this, but it doesn't.
Under the Associated Products section, I have added a fixed price for the associated products, but this still does not update the price.
I cannot believe that this isn't available out-of-the-box with Magento.
Has anyone ever noticed this before?
I have found This link
Which seems to suggest that it has been noticed before.
Does Simple Configurable Products fix this problem?
Many thanks
SCP will solve your problem - it takes the price from the child product. Unfortunately, this will not work too well if you are also using Custom Product Options with price differentials.
Depending on the complexity of your products you may want to go with normal Magento and a script to work out what the price variants are for the super attribute options. The array for the super attribute price options can be iterated over, master and child products checked against the attribute(s) that change, e.g. colours, and a new attribute array written out. It is a bit of code you will have to write yourself, but here is an article that covers the basics:
http://www.ayasoftware.com/content/magento-update-fly-super-product-attributes-configuration
worse, scp does not allow the customer to edit the choice. My Client insisted he could edit his choice so we had to develop for this using the JSON encoded script on the product view page instead.
<?php $_helper = $this->helper('catalog/output'); ?>
<?php $_product = $this->getProduct(); ?>
<?php $jason = $this->getJsonConfig(); ?>
<?php $uJason = json_decode($jason); ?>
<?php
if ($_product->getMsrp() > 0) {
$uJason->productMsrp = sprintf("%01.2f", $_product->getMsrp());
}
$jason = json_encode($uJason);
?>
<script type="text/javascript">
var optionsPrice = new Product.OptionsPrice(<?php echo $jason ?>);
</script>
I think we had to change the code elsewhere but the above change allowed the msrp to update as well as the price.

Magento Store View - Incorrect Currency Displayed

I've gone through and set up an additional store view for our Magento store. The purpose of this view is to allow the display of different currency (for now) with future plans to allow language, content, etc based on store view.
Everything seems pretty normal. When I go to www.example.com/au - I get the standard version of the site with $AU as the currency.
When I navigate to www.example.com/us - The proper currency conversion is happening, showing in $US, but only in the mini-cart and checkout. The category and product view pages are still displaying the $AU value.
Those template files were completed by a different developer, and so I'm assuming they used the wrong function to grab the price of each item. They used:
<?php echo number_format($_product->getPrice(), 2) ?>
I'm thinking I need to toss in the proper function that grabs the price based on store view id, but I'm having difficulty tracking this down.
Any help, of course, and as always, much appreciated.
Update:
I ended up using this, and it works how I wanted:
$this->getPriceHtml($_product, true)
I know this is old but I came across this while looking for an answer the same question.
You can use:
Mage::helper('core')->currency($_product->getPrice())
This formats the price (removes trailing zeros) and converts to the correct currency. Also works if the user changes their currency.
Try
<?php echo $_product->getFormatedPrice(); ?>
it will format price according current store currency rules (see Mage_Directory_Model_Currency::format() for more info).

Listing Categories in Magento

I'm having a problem and getting an understanding of this will help me figure out Magento a bit more. I have a CMS page using 1column.phtml. I actually creating a vertical navigation system using 1column.phtml itself, not the CMS. The CMS portion of things is just being used to show some images. The design of the site dictates the layout which is why I am using a 1 column and putting the sidebar in there and not using the left.phtml file. Anyway, that's not the problem. I am trying to pull the main categories and don't quite get how to do that. I'd rather just put the code in the phtml file and not mess with the XML, but when I add the code I'm not getting anything back.
<?php foreach ($this->getStoreCategories() as $_category): ?>
<?php echo $this->drawItem($_category) ?>
<?php endforeach ?>
So I get nothing back. I also don't understand scope of these, so once I get this working, how would I pull only top level categories? Thanks!
I would try to get a collection of categories and see where that takes you.
$categories = Mage::getModel('catalog/category')
->getCollection();
This code will give you every single category. You can use addAttributeToSelect and addAttributeToFilter functions to furter narrow down your categories.
From there you can foreach through the categories to display them or what whatever you want to do with it.

Magento configurable product -> floating/sliding cart

we have a pc configurator, actually its not a "configured product" but a product with "custom options".
we want to have a "cartbox" that shows the selected attributes plus price that slides with the movement of the page down untill the user has viewed all options.
any ideas?
i am pretty sure that there is no ready module.
thanx for any help
This is a theming question for the product page template, but with some frontend programming thrown in for good measure...
You have to know a little bit about Prototype to tackle this 'purely in frontend javascript' but I think it can be done.
I am assuming you have a 'div' that is styled up to be 'position: fixed' so that it always stays to the right of the screen, no matter how you scroll down the page. Then in this div is a table (or more divs) that summarises all of your options. All of those table options are marked up with ids.
In your template code for the custom product options you can have some php code to detect the attribute-set for 'custom pc' and write out some extra front-end javascript. This is then able to listen to the changes to the custom options and update your extra summary information in the fixed position div.
Unless you are really good at Prototype you may want to give yourself 2-3 days to get the code in there, the same again for testing and putting in a modest amount of products.

Resources