Coupon QR generator?

  • Cara
    Cara
    Newbie 16 points
    August 19, 2013 at 6:55 pm

    Does anyone know how to add this qr generator to the coupon listing fields? It has a short code of [qrgen4allEditor] – if I add a qrcode to the coupon table will it save the image it generated to the listing or no go?

    QR Code Generator 4 All

    Any suggestions or guidance would be greatly appreciated be it modifying the template etc.

    thanks in advance.

  • Cara
    Cara
    Newbie 16 points
    August 20, 2013 at 4:03 pm

    Please pardon long post, hope I explained well enough…

    Ok, I want to create a hook in the functions file to parse shortcode for a plugin after I add a custom field in the add/edit listing area. How do you guys say to do it?

    RE:
    “The biggest change is from DP 7 is that the listings are NO LONGER REGULAR WORDPRESS posts they are now CUSTOM POSTS. This is a BIG DIFFERENCE and means that the existing listings in a DP 7 directory have to be changed to custom posts in the new Responsive Theme.”

    FYI – I watched version 7 videos (core, hooks, plugins, etc) using the functions.php file to add code instead of editing templates.

    I see code from the functions file can be placed into a plug in – is better way? I see bootstrap theme page section areas for hooks and filters are new for responsive templates

    wlt hooks

    1. Do I target add listing area, modify plugin to target the area you say or — also saw plugin that creates a new tab in admin listing area but this is for packages?) …

    Say I can create a custom field to add the shortcode to a qr generator plugin (or any plugin shortcodes for the sake of others) that gets parsed by a function and adds the interface to the bottom of the new listing submission page – or I add the code to the plugin to make it show up on the add listing page interface:

    2) custom field as shortcode ? == what should my key value pair be for the custom field on the listing submission page in pp admin/add coupon? In other words, how would you set up the custom field in pp admin/addcoupon, example please?

    3) Adding code for the custom field to the functions.php or plugin file just works to pull in the plugin functionality to the page area and saves the data for the custom post?

    Code snippets and research links I’ve explored to answer my own question:

    <?php
    echo apply_filters('the_content', get_post_meta($post->ID, 'your_field_name', true));
    ?>

    4) Should I add any of this code as well to the functions.php (pardon my lack of php knowledge)?


    $shortcode=get_post_meta($post->ID,'your_custom_field',true);
    echo do_shortcode($shortcode);

    is this the same thing as above and below or below referencing single.php?

    <?php
    if ( get_post_meta($post->ID, 'cfield', true) )
    echo do_shortcode(get_post_meta($post->ID, 'cfield', $single = true));
    ?>

    or simply use this link somewhere in the template page itself — I would like the data from the plugin to stay with the post ID…


    <?php echo do_shortcode("[shortcode]"); ?>

    Feel like I am almost there just not all clicking and some code is missing, any one know the answer for me?

    research links:
    Insert Shortcodes into Custom fields 1″

    Insert Shortcodes into Custom Fields 2

    Inset Custom Fields/shortcodes 3″

    (a little mystified by the second snippet shown from this link — thinking this applies to one post ID only or no?):
    Get custom field value with shortcode

    Using Shortcode in a template…

    Other thoughts I had was using the wlt plugin that adds a tab to the listing and adding plugin functionality to that tab or even adding a function to add plugin to the toolbox but I really do not know how either works yet, that is a whole new thing to explore…

    Thanks for any help/guidance in advance.

    caramiame

  • Richard Bonk
    Richard Bonk
    Super Guru 2,739 points
    August 20, 2013 at 8:08 pm

    I am not really sure what are you trying to achieve. You are asking questions which are very specific to you, but don’t mean anything to other people. If you explain more about what you want to do (and not how) we might be able to point you in the right direction.

    Kind regards,

    Richard
    _____________________________________________________________________
    Wide range of PremiumPress and WordPress Plugins and add-ons
    PremiumPress customisation services and Website Design
    Selection of PremiumPress Child Themes

  • Cara
    Cara
    Newbie 16 points
    August 20, 2013 at 10:44 pm

    Thanks for your reply Richard. I thought it might be a useful post for anyone wanting to associate an external active plugin’s shortcode to the coupon_type custom field with a key value pair… I’ve since started scrapped that one and am looking for alternative plugins that might play nicer then the one with a shortcode…

    I ran across this but am still looking around: “The plugin in question (linked below) can easily support custom post types. To add more post types, use the filter ‘wpaqr_post_types’.”

    Plugin in Question Now

    Kinda like embedding a youtube video or a captcha box on the add listing page but I don’t know the best way or how to do it… create custom field with key value pair is a step in the right direction, or no?

    Let me know if I am totally missing it here — sorry to take up your time, I know you guys are busy with the new themes.

    caramiame

  • Cara
    Cara
    Newbie 16 points
    August 20, 2013 at 10:45 pm

    making it work as an enhancement custom field would be even better….

  • Richard Bonk
    Richard Bonk
    Super Guru 2,739 points
    August 20, 2013 at 11:02 pm

    So if I understand correctly, you would like to display QR code in listing pages, or are you after something else?
    Because it seems you are trying to do it in a very complicated way.

  • Cara
    Cara
    Newbie 16 points
    August 20, 2013 at 11:30 pm

    Yes i think i am making it way too hard. know how to add the qr code as an enhancement on the listing packages? I am still looking at qr plugins out there — there are more that offer shortcodes to render an external plug in within a custom post type/custom field and also some offer color pickers, upload logo, tracking, etc — at the end of the day a qr generator as a package enhancement was my goal….

    i am not a php programmer in case you can’t tell

    thanks very much again Richard, for trying to help out. I appreciate it.

    caramiame

  • Mark Fail
    Mark Fail
    Super Guru 13,013 points
    August 21, 2013 at 4:12 am

    a new shortcode plugin would be enough, you wouldnt need to make it any more complicated that that.

  • Cara
    Cara
    Newbie 16 points
    August 21, 2013 at 3:29 pm

    wow — the wonders of wordpress… this is somewhat “”

    thanks very much for some direction, Mark.

  • Hemanta Chakladar
    Hemanta Chakladar
    Super Guru 1,710 points
    August 20, 2015 at 7:10 pm

    Hi, now you can use this plugin to generate QR code for your coupon, QR Code generator

  • Calvyn
    Calvyn
    Newbie 39 points
    September 10, 2015 at 2:35 pm

    my workaround solution is use this plugin – qrcode_wprhe

    create a field and manually bulk add [qr-code] to all listing via CSV import.

    I did not hard code this short code into the theme listing page yet as I not so good in coding.

  • Cara
    Cara
    Newbie 16 points
    September 10, 2015 at 11:00 pm

    thanks to both you guys!

  • Aaron
    Aaron
    Super Guru 920 points
    September 10, 2015 at 11:29 pm

    Google API works well for this – you can even output the contents of a field or wordpress title simply by passing it via the api:

    img src="https://chart.apis.google.com/chart?cht=qr&chs=100x100&chl=<?php the_permalink(); ?>" width="100" height="100"

  • Mark Fail
    Mark Fail
    Super Guru 13,013 points
    September 11, 2015 at 10:13 am

    thanks for sharing

Viewing 14 posts - 1 through 14 (of 14 total)

New Business Themes for WordPress 2020

Start your new website today!

View Business Themes