WordPress.org

Ready to get started?Download WordPress

Forums

Magento WordPress Integration
Calling custom magento block (4 posts)

  1. hodyhong
    Member
    Posted 1 year ago #

    Hi there, I have created a custom block and have declared it in page.xml. I was trying to use the plugin to call the block in WP with the declared name. It did not work, it returns that the block cannot be found. Can you please let me know how I may call a custom block? Thanks a lot.

    Hody

    http://wordpress.org/extend/plugins/magento-wordpress-integration/

  2. jamesckemp
    Member
    Plugin Author

    Posted 1 year ago #

    Could you show me the code you used in page.xml, and the code you used to try and call the block?

  3. hodyhong
    Member
    Posted 1 year ago #

    Here is what I have in page.xml:

    <block type="core/template" name="givoni.mybag" as="givoniMybag" template="givoni/mybag.phtml"/>

    And here is the code in WP template I was trying to call:

    <?php the_block("givoni.mybag"); ?>

    Do I need to do anything extra?

    Also I have found that if I have custom code in my own templates, eg for the block "top.link" , when I call that block in WP, it will just return the base template instead of my custom template.

    Let me know. Thanks a lot for the help.

    Cheers

    Hody

    [ Please do not bump, that's not permitted here. ]

  4. razoredgelabs
    Member
    Posted 1 year ago #

    I am having the same problem as above.

    Also I have found that if I have custom code in my own templates, eg for the block "top.link" , when I call that block in WP, it will just return the base template instead of my custom template.

    Any idea why this is happening?

    Thx,
    Jared

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.