Magento
  • Personalization for Magento
  • Installing
  • Disconnecting
  • Uninstalling
  • Getting Started
  • Configuring
  • Guides
    • Varnish & Full-Page Caches
    • Advanced User Guide
    • Managing Blocks
    • Overriding or Extending Functionalities
      • Overriding Product Data
        • Excluding Products
        • Customising Pricing
        • Resizing Images
      • Overriding Customer Data
      • Overriding Line Item Data
    • Bulk Product Updates
    • Console Commands
  • Features
    • Variations (Configurable Products)
    • Add to Cart
    • Indexer
    • Customer Group Pricing
    • Supplier Cost & Inventory Level
    • Restore Cart Link
    • Ratings & Reviews
    • Multi Currency (Exchange Rates)
    • Marketing permission and GDPR compatibility
    • Catalog Price Rules
  • Integrations
    • Using Yotpo
    • Using Klarna
  • FAQ
  • Developing & Contributing
  • Visit Nosto
  • Issues
  • Releases
Powered by GitBook
On this page

Was this helpful?

  1. Guides
  2. Overriding or Extending Functionalities
  3. Overriding Product Data

Customising Pricing

PreviousExcluding ProductsNextResizing Images

Last updated 3 years ago

Was this helpful?

If your store uses customized price handling or 3rd party module for product prices you might need to amend the custom price handling to Nosto module as well. Start by reading and .

Note: In order to use custom pricing in Nosto, you must amend the prices to Nosto's product model and handle the correct active variation. Please note that when using customized pricing you should disable the multi-currency method from the Nosto module's setting in Magento.

File app/code/local/My/Nosto/Model/Meta/Product.php

<?php

/**
 * Overridden product meta data model.
 * This model is used as the data source when generating the tagging elements
 * on the product page, and when making server-to-server API calls to Nosto.
 */
class My_Nosto_Model_Meta_Product extends Nosto_Tagging_Model_Meta_Product
{
    /**
     * @inheritdoc
     */
    public function loadData(Mage_Catalog_Model_Product $product, Mage_Core_Model_Store $store = null)
    {
        parent::loadData($product, $store);

        $this->setPrice(111.11);
        $this->setListPrice(222.22);

        return true;
    }
}
how to extend Nosto module
how to alter Nosto product data