Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Products with custom options over multiple websites
 
oMIKEo
Jr. Member
 
Total Posts:  8
Joined:  2008-02-18
 

Hi guys,

I’ve got 2 websites set up and working from one install of magento 1.4.1.1. I can change the price of a product per website but the problem is if a product has custom options I cant make them website specific. Is there an option to do this?

E.g;

Site A - Product 123 - Price £1.99 - No custom options
Site B - Product 123 - Price £0 - Custom options, length 100 £2.99, length 200 £3.99

This isn’t possible from what I can see.

Thanks for any help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
robin2160
Moderator
 
Avatar
Total Posts:  1046
Joined:  2009-02-15
Berlin / Germany
 

It’s a very old magento bug.
The solution you can see here

http://www.magentocommerce.com/boards/viewthread/53494/

Regards
Stefan

 
Magento Community Magento Community
Magento Community
Magento Community
 
oMIKEo
Jr. Member
 
Total Posts:  8
Joined:  2008-02-18
 

Thanks Stefan,

Just have another questions as I can’t seem to get that to work:

I’ve edited the section of script in:

/public_html/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Option/Value.php

with:

$storeId=$object->getStoreId();
                        if (
$object->getPriceType() == 'fixed'{
                            $storeCurrency 
Mage::app()->getStore($storeId)->getBaseCurrencyCode();
                            
$rate Mage::getModel('directory/currency')->load($baseCurrency)->getRate($storeCurrency);
                            if (!
$rate{
                                $rate
=1;
                            
}
                            $newPrice 
$object->getPrice() * $rate;
                        
else {
                            $newPrice 
$object->getPrice();
                        
}
                        $statement 
$this->_getReadAdapter()->select()
                            ->
from($priceTable)
                            ->
where('option_id = '.$object->getId().' AND store_id = ?'$storeId);

                        if (
$this->_getReadAdapter()->fetchOne($statement)) {
                            $this
->_getWriteAdapter()->update(
                                
$priceTable,
                                array(
                                    
'price' => $newPrice,
                                    
'price_type' => $object->getPriceType()
                                ),
                                
$this->_getWriteAdapter()->quoteInto('option_id = '.$object->getId().' AND store_id = ?'$storeId)
                            );
                        
else {
                            $this
->_getWriteAdapter()->insert(
                                
$priceTable,
                                array(
                                    
'option_id' => $object->getId(),
                                    
'store_id' => $storeId,
                                    
'price' => $newPrice,
                                    
'price_type' => $object->getPriceType()
                                )
                            );
                        
}

But get this error:

SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘option_id’ in ‘where clause’

Someone then suggested changing option_id with option_type_id which removes the error but still shows the custom options for both websites?

Am I missing something?

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
oMIKEo
Jr. Member
 
Total Posts:  8
Joined:  2008-02-18
 

Does anyone have any idea about this issue?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top