1

Many products need to have the same or partly the same description, in order to be able to edit them all at once it would come in handy to make use of the magento custom variables. They work in CMS blocks but I was not able to make them show their contend in product descriptions. Is there a way to achieve this without reinventing the wheel?

2
  • I'm afraid not, although, if many products contain same description, I'd suggest moving that part into static block and calling that block in view.
    – Prateek
    Commented Oct 7, 2015 at 8:46
  • Hi, thanks for the suggestion. I found this and will check it out: stackoverflow.com/questions/20508731/…
    – Sparc
    Commented Oct 8, 2015 at 2:33

2 Answers 2

3

If i understood your question right. First of all create one custom variable called "panel-width" fill all the details in variable.

Now you've to call this variable in product view page ..catalog/product/view.phtml and call below code wherever you want to implement.

<!-- get custom variables -->
<?php $panelWidth = Mage::getModel('core/variable')->loadByCode('panel-width')->getValue('plain'); ?>

Here $panel-widht is vaiable code. Simple use variable $panelWidth to display your content. Use this example with your custom variable values and need.

1
  • Hi, I looks like with this method I will be only able to use variable "panel-width" in all products. What I was looking for was a method to use different variables for different types of products, where I can call the variable from within the product description field in back end.
    – Sparc
    Commented Oct 8, 2015 at 2:31
0

I found a solution. After some more searching I came across this little extension:

http://www.magentocommerce.com/magento-connect/catalog/product/view/id/13663/

We are using 1.9.0.1 it and it works.

1
  • 1
    If the extension works for you, that's great, but it contains unnecessary class rewrites and might conflict with other product related extensions. I wrote a similar module, using only an observer for catalog_controller_product_view that applies the CMS filter on description and other product attributes before they are displayed. Not published (yet), I'm just saying it's possible ;) Commented Mar 20, 2016 at 19:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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