0

the "weight" attribute usually has a 'global' scope. That's why it can't display, say, 2 different values depending on the Magento website or storeview. That's what I have understood so far.

Does anybody here know a way around this limitation?

Reason behind this is: with the 'weight' value, we can display the shipping cost directly at the articles detail-page in the frontend, which is very conveniend for the customer.

That implies, of course, that the values of 'weight' are NOT actually grams or kilograms, but are the amounts of Euros for the shipping. (We don't use UPS or Hermes or any of these services.)

Now as we want to send our articles to our neighbouring countries, we would like to display slightly raised costs for these storeviews/websites. And here we go having the problem to give different values to 'weight' according to the destination, i.e. storeviews/websites.

=> We of course use the table-rates for shipping to different countries. But that applies only when the check-out process is met by the customer. We however would like to display the shipping-cost already before when displaying the article.

I hope this was described clear enough for you to get the issue. Any help or hint is greatly apprechiated!

  • You can try hacking around and make'weight' attribute to have a 'Store' scope. – brainReader Jul 11 '14 at 10:11
  • Hi Ajay, thanks for the quick reply. Do you have any idea how to change that scope for the attribute? From within the Magento administration this is not possible /at least for us). – Johannes Jul 11 '14 at 10:29
  • You'll have to write custom module for it. I had to write a custom module to allow multiple currencies at 'Product' scope. – brainReader Jul 11 '14 at 10:33
  • Ok, thanks for the advice. Is any other solution possible? – Johannes Jul 11 '14 at 10:48
2

Before answering I suggest that you remember 1999 when Mars Climate Orbiter burned up in Martian atmosphere, because european software used universal metric system (newtons) while Lockheed-Martin built hardware expected pounds. NEVER mix units of measure.

What you could do however is to add an attribute which contains weight display unit. Kilos, pounds, carats, grams, ounces, tons -- they all can be converted from base weight units, whatever they are.

  • that imperial system though ... – Julien Lachal Aug 11 '14 at 7:25
0

I don't know whether this helps or not....
Put this in config.xml...

<?xml version="1.0"?>
<config>
    <modules>
        <MyModules_XMLoverrides>
            <version>0.1.0</version>
        </MyModules_XMLoverrides>
    </modules>
</config>

Put this in systems.xml...

<?xml version="1.0"?>
<config>
    <sections>
        <carriers>
            <groups>
                <ups>
                    <fields>
                        <unit_of_measure>
                            <show_in_store>1</show_in_store>
                        </unit_of_measure>
                    </fields>
                </ups>
            </groups>
        </carriers>
    </sections>
</config>  

Put this in MyModules_XMLoverrides.xml

<?xml version="1.0"?>
<config>
    <modules>
        <MyModules_XMLoverrides>
            <active>true</active>
            <codePool>local</codePool>
        </MyModules_XMLoverrides>
    </modules>
</config>  

This might set the scope at store level.
Not tested. Try at your own risk :)

  • I don't think this is appropriate at all. Although this hack may potentially change the scope of the weight field, really the figure is just that and should be converted from one measurement to another correctly as suggested by Pronto. – ash Aug 11 '14 at 8:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.