{"id":257,"date":"2020-02-28T16:02:24","date_gmt":"2020-02-28T16:02:24","guid":{"rendered":"http:\/\/wiki2.plumserver.com\/knowledge-base\/magento-call-for-price-v1-x-developers-guide-and-api-reference"},"modified":"2021-07-23T07:13:21","modified_gmt":"2021-07-23T11:13:21","slug":"magento-1-call-for-price-v1-developer-guide","status":"publish","type":"post","link":"https:\/\/plumrocket.com\/docs\/magento-1-call-for-price\/v1\/devguide","title":{"rendered":"Magento 1 Call For Price v1.x Developer Guide and API Reference"},"content":{"rendered":"\n<p>In this developer documentation for the\u00a0<a href=\"\/magento-1-call-for-price\">Magento Call For Price Extension<\/a>, you will find step-by-step instructions, sample code, and API references to fully customize your plugin.<\/p>\n\n\n\n<h2 id=\"add-call-for-price-button-code-to-magento-templates\">Add &#8220;Call For Price&#8221; Button Code to Magento Templates<\/h2>\n\n\n\n<h3><i>Code for displaying &#8220;Call For Price&#8221; button on Product List page<\/i><\/h3>\n\n\n\n<p>In order to have the &#8220;Call For Price&#8221; buttons display on your product list, please do the following minor code changes:First, find the file that can be reached at this access path on your server:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-\">\/app\/design\/frontend\/THEME_NAME\/default\/template\/catalog\/product\/list.phtml<\/code><\/pre><\/div>\n\n\n\n<p>where THEME_NAME is the name of the theme you are using.<\/p>\n\n\n\n<p>Find the following code:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-php\">&lt;p class=\"action\">&lt;button type=\"button\"\n    title=\"&lt;?php echo $this->quoteEscape($this->__('Add to Cart')) ?>\" \n    class=\"button btn-cart\" \n    onclick=\"setLocation('&lt;?php echo $this->getAddToCartUrl($_product) ?>')\">\n        &lt;span>&lt;span>&lt;?php echo $this->__('Add to Cart') ?>&lt;\/span>&lt;\/span>&lt;\/button>\n&lt;\/p><\/code><\/pre><\/div>\n\n\n\n<p>and replace it with this one:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-php\">&lt;?php if ($rule = Mage::helper('plumrocket_callforprice')\n        ->getCallForPriceRule($_product)) : ?>\n            &lt;div>\n                &lt;?php if($label = Mage::helper('plumrocket_callforprice')\n                        ->getCfpLabel($rule->getProductListText())) : ?>\n                            &lt;div class=\"plumrocket-callforprice-text-label\">\n                                &lt;?php echo $label; ?>&lt;\/div>&lt;br>\n                &lt;?php endif; ?>\n                &lt;button class=\"plumrocket-callforprice-btn button\"\n                    onclick=\"plumrocketCallForPrice\n                        .getForm(&lt;?php echo $_product->getId(); ?>);\">\n                            &lt;?php echo Mage::helper('plumrocket_callforprice')\n                                    ->getButtonLabel(); ?>&lt;\/button>\n            &lt;\/div>\n&lt;?php else: ?>\n    &lt;p class=\"action\">&lt;button type=\"button\"\n        title=\"&lt;?php echo $this->quoteEscape($this->__('Add to Cart')) ?>\"\n        class=\"button btn-cart\"\n        onclick=\"setLocation('&lt;?php echo $this->getAddToCartUrl($_product) ?>')\">\n             &lt;span>&lt;span>&lt;?php echo $this->__('Add to Cart') ?>&lt;\/span>&lt;\/span>&lt;\/button>\n    &lt;\/p>\n&lt;?php endif; ?><\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this developer documentation for the\u00a0Magento Call For Price Extension, you will find step-by-step instructions, sample code, and API references to fully customize your plugin. Add &#8220;Call For Price&#8221; Button Code to Magento Templates Code for displaying &#8220;Call For Price&#8221; button on Product List page In order to have the &#8220;Call For Price&#8221; buttons display &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/plumrocket.com\/docs\/magento-1-call-for-price\/v1\/devguide\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Magento 1 Call For Price v1.x Developer Guide and API Reference&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[232],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v17.2 (Yoast SEO v17.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Magento Call For Price v1.x Developer Guide and API Reference - Plumrocket Documentation<\/title>\n<meta name=\"description\" content=\"In this developer documentation for the\u00a0Magento Call For Price Extension, you will find step-by-step instructions, sample code, and API references to\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/plumrocket.com\/docs\/magento-1-call-for-price\/v1\/devguide\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Magento 1 Call For Price v1.x Developer Guide and API Reference\" \/>\n<meta property=\"og:description\" content=\"In this developer documentation for the\u00a0Magento Call For Price Extension, you will find step-by-step instructions, sample code, and API references to\" \/>\n<meta property=\"og:url\" content=\"https:\/\/plumrocket.com\/docs\/magento-1-call-for-price\/v1\/devguide\" \/>\n<meta property=\"og:site_name\" content=\"Plumrocket Documentation\" \/>\n<meta property=\"article:published_time\" content=\"2020-02-28T16:02:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-23T11:13:21+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Plumrocket\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Magento Call For Price v1.x Developer Guide and API Reference - Plumrocket Documentation","description":"In this developer documentation for the\u00a0Magento Call For Price Extension, you will find step-by-step instructions, sample code, and API references to","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/plumrocket.com\/docs\/magento-1-call-for-price\/v1\/devguide","og_locale":"en_US","og_type":"article","og_title":"Magento 1 Call For Price v1.x Developer Guide and API Reference","og_description":"In this developer documentation for the\u00a0Magento Call For Price Extension, you will find step-by-step instructions, sample code, and API references to","og_url":"https:\/\/plumrocket.com\/docs\/magento-1-call-for-price\/v1\/devguide","og_site_name":"Plumrocket Documentation","article_published_time":"2020-02-28T16:02:24+00:00","article_modified_time":"2021-07-23T11:13:21+00:00","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Plumrocket","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/plumrocket.com\/docs\/#website","url":"https:\/\/plumrocket.com\/docs\/","name":"Plumrocket Documentation","description":"Extensions docs, troubleshootings etc.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/plumrocket.com\/docs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/plumrocket.com\/docs\/magento-1-call-for-price\/v1\/devguide#webpage","url":"https:\/\/plumrocket.com\/docs\/magento-1-call-for-price\/v1\/devguide","name":"Magento 1 Call For Price v1.x Developer Guide and API Reference - Plumrocket Documentation","isPartOf":{"@id":"https:\/\/plumrocket.com\/docs\/#website"},"datePublished":"2020-02-28T16:02:24+00:00","dateModified":"2021-07-23T11:13:21+00:00","author":{"@id":"https:\/\/plumrocket.com\/docs\/#\/schema\/person\/38b360639b934d6c984ee4f3ffce7d20"},"description":"In this developer documentation for the\u00a0Magento Call For Price Extension, you will find step-by-step instructions, sample code, and API references to","breadcrumb":{"@id":"https:\/\/plumrocket.com\/docs\/magento-1-call-for-price\/v1\/devguide#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/plumrocket.com\/docs\/magento-1-call-for-price\/v1\/devguide"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/plumrocket.com\/docs\/magento-1-call-for-price\/v1\/devguide#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Magento Extensions","item":"https:\/\/plumrocket.com\/magento-1-extensions"},{"@type":"ListItem","position":2,"name":"Magento Call For Price","item":"https:\/\/plumrocket.com\/magento-1-call-for-price"},{"@type":"ListItem","position":3,"name":"Documentation","item":"https:\/\/plumrocket.com\/docs\/magento-1-call-for-price"},{"@type":"ListItem","position":4,"name":"v1","item":"https:\/\/plumrocket.com\/docs\/magento-1-call-for-price\/v1"},{"@type":"ListItem","position":5,"name":"Developer Guide"}]},{"@type":"Person","@id":"https:\/\/plumrocket.com\/docs\/#\/schema\/person\/38b360639b934d6c984ee4f3ffce7d20","name":"Plumrocket","image":{"@type":"ImageObject","@id":"https:\/\/plumrocket.com\/docs\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/72392a92ae750c66560be284502b6676?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/72392a92ae750c66560be284502b6676?s=96&d=mm&r=g","caption":"Plumrocket"},"sameAs":["https:\/\/plumrocket.com\/docs"]}]}},"_links":{"self":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/257"}],"collection":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/comments?post=257"}],"version-history":[{"count":1,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/257\/revisions"}],"predecessor-version":[{"id":22574,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/257\/revisions\/22574"}],"wp:attachment":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/media?parent=257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/categories?post=257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/tags?post=257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}