Back to Magento & WordPress Integration Course

Bonus Magento Product Shortcodes Layouts

 

“Access expert led videos & answers for less than £1 a day, with a 30 days money-back guarantee”

Howdy,

This is a Premium tutorial and available to Premium members only.

As a Premium member you’ll gain access to all the tutorials and courses like this one which go those extra steps.

Also being a Premium member gives you these extra perks:

  • Access to over 400 step-by-step video tutorials
  • Learn how to build a fully-responsive, mobile friendly Magento website for just $99
  • Access to WidgetChimp.com for free saving you up to £29.99 per month
  • Access to Premium Webinars & the Webinar Library
  • Talk with peers in the premium members only lounge in the forums

UnderstandingE Premium is now available. Click here to join.

Matt & Dave.

14 replies

Comments are only availaible for registered members.


  1. Andrew Gadsden
    Andrew Gadsden says:

    If you copy/paste the shortcode in this para:

    “Add the template file to the single product shortcode which you added in the previous tutorial. In this case, it would be [product id=”1397″ template=“wordpress/shortcode/product-list.phtml”].”

    Edit the quotation marks because otherwise nothing will show up.

    Confused me for a few minutes and might save someone else wondering what they’ve done wrong!

    Reply
  2. Dimitri
    Dimitri says:

    Matt / Dave,

    code on lines 108-110 in product gallery file causes fatal error after upgrading ultimo

    function remove_linebreaks($str) {
    return str_replace(array(“\r”, “\n”, “\t”, ” “), ”, $str);
    }

    Fatal error: Cannot redeclare remove_linebreaks() (previously declared in /home/XXXXX/public_html/app/design/frontend/ultimo/child/template/wordpress/shortcode/product-gallery.phtml:108) in /home/XXXXX/public_html/app/design/frontend/ultimo/child/template/wordpress/shortcode/product-gallery.phtml on line 110

    Reply
    • Andrew Gadsden
      Andrew Gadsden says:

      In app/design/frontend/ultimo/child/template/wordpress/shortcode/product-gallery.phtml:

      Find (at or near line 107):

      // Added function to strip new lines
      function remove_linebreaks($str) {
      return str_replace(array(“\r”, “\n”, “\t”, ” “), ”, $str);
      }
      }

      Replace with:

      // Added function to strip new lines if not already declared
      if(!function_exists(‘remove_linebreaks’)) {
      function remove_linebreaks($str) {
      return str_replace(array(“\r”, “\n”, “\t”, ” “), ”, $str);
      }
      }

      Reply
      • Dimitri
        Dimitri says:

        Hi Andrew, thanks. After adding

        if(!function_exists(‘remove_linebreaks’)) {

        i get the following msg: Parse error: syntax error, unexpected end of file in /home/XXXXX/public_html/app/design/frontend/ultimo/child/template/wordpress/shortcode/product-gallery.phtml on line 189

        line 189 is the very last line in the file and reads

        Reply
      • Dimitri
        Dimitri says:

        Hi Andrew, thanks. After adding

        if(!function_exists(‘remove_linebreaks’)) {

        i get the following msg: Parse error: syntax error, unexpected end of file in /home/XXXXX/public_html/app/design/frontend/ultimo/child/template/wordpress/shortcode/product-gallery.phtml on line 189

        line 189 is the very last line in the file and reads

        perhaps we need to add smth to close the code?

        Reply
  3. David P
    David P says:

    I’m not sure if I’m just having a moment… but where are the short codes?
    I also couldn’t find them on the previous video but as they were short it wasn’t a problem to copy them.

    Reply
  4. nickfessi
    nickfessi says:

    On the list view Matt in your video, Where is the text coming from under the prduct title? short description?

    If it is i cant use that as i am using the bullet points and if i put in a short description, it appears on my product page under the bullets, whch i don’t want. Could we get the bullets in there instead? would that work or would it look a bit naff?

    I can still use it with just the product titles, just asking the question

    Reply
    • Matthew Ogborne
      Matthew Ogborne says:

      Howdy Nick,

      This is definitely possible :)

      If you re-download the layouts using the link above, a 3rd file has been added.

      You would use it by using this template:

      template="wordpress/shortcode/product-bullets.phtml"

      A couple of notes around this new file:

      1. It has some dirty CSS in it that would ideally need to be cut out and put into your custom.css file (without the style tags)

      2. Change the att_bullet1 codes as needed on the right-most side if they do not match your bullet attributes

      3. If you want the short description as well, I have left to code for that on line 10, cut that line out and past wherever you want the short description to appear.

      And finally you can see a working example here: http://guides.understandinge.com/setup/blog/first-blog-post/

      Matt

      Reply
  5. catgirl
    catgirl says:

    I’m getting an error with the gallery view:
    Fatal error: Call to a member function getStoreLabel() on a non-object in public_html/app/design/frontend/base/default/template/catalog/product/price.phtml on line 53

    I have uploaded the template files twice?

    Reply
    • Matthew Ogborne
      Matthew Ogborne says:

      Morning Sam,

      Dale pinged me with the same message, so we must have a version issue at hand.

      I’ll look at that now and also fix the product keywords in the article above quickly too.

      Matt

      Reply
    • Matthew Ogborne
      Matthew Ogborne says:

      Hi Sam,

      I’ve added a new section, video and copy & paste code to the tutorial above.

      The video is rendering at this very moment, so if you’re reading this comment within 5 minutes of me posting it, the video is being processed by vimeo and will appear in a few minutes.

      Let me know how you get on :)

      Matt

      Reply
          • Adam Cowles
            Adam Cowles says:

            Hi Matt,
            I have a similar error but in a different file: Fatal error: Cannot redeclare remove_linebreaks() (previously declared in /home/poolproc/public_html/app/design/frontend/ultimo/child/template/wordpress/shortcode/product-gallery.phtml:108) in /home/poolproc/public_html/app/design/frontend/ultimo/child/template/wordpress/shortcode/product-gallery.phtml on line 110