Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter SMRogers

    (@smrogers)

    My apologies for not including my email template in my initial post. Of course, #img1# refers to image that is attached to my email. Here it is:

    status:future
    date: May 20, 2015 03:00:00

    :excerptstart
    Kindle Edition
    Genre: History
    Deal Price: $2.99
    Regular Price: $9.99

    Admiral David Farragut’s bold order at the Battle of Mobile Bay has served as a rallying cry for the United States Navy for a century. Described as “urbane” and “indomitable” by contemporaries, and lionized as an “American Viking” by the Northern press during the Civil War, Farragut was considered gallant, brilliant, and humane by friend and foe alike.
    :excerptend

    :start
    tags: Kindle
    “Damn the torpedoes. . . . Full speed ahead.”

    Admiral David Farragut’s bold order at the Battle of Mobile Bay has served as a rallying cry for the United States Navy for a century. Described as “urbane” and “indomitable” by contemporaries, and lionized as an “American Viking” by the Northern press during the Civil War, Farragut was considered gallant, brilliant, and humane by friend and foe alike.

    [pcustom name=”wpsdealstag” value=”Kindle”]
    [pcustom name=”_wps_deals_type” value=”affiliate”]
    [pcustom name=”_wps_deals_main_image” value=”#img1#”]
    [pcustom name=”_wps_deals_end_date” value=”29-05-15″]
    [pcustom name=”_wps_deals_normal_price” value=”9.99″]
    [pcustom name=”_wps_deals_sale_price” value=”2.99″]
    [pcustom name=”_wps_deals_purchase_link” value=”https://deallink.com
    “]
    [pcustom name=”_wps_deals_business_title” value=”This Deal is Courtesy of”]
    [pcustom name=”_wps_deals_business_logo” value=”https://amazonlogo.com”%5D
    :end

    Plugin Author Wayne Allen

    (@wayneallen-1)

    The Deal Tags field is a custom taxonomy as is Deal Category. I’m thinking about adding taxonomy support to the Shortcodes AddOn.

    The Deal Main Image is a custom field, but it is pretty complex. After going through the UI I see this in the _wps_deals_main_image field
    a:2:{s:2:"id";s:4:"7330";s:3:"src";s:68:"https://localhost/wp-content/uploads/2015/05/cs1_small33.jpg";}

    Thread Starter SMRogers

    (@smrogers)

    Thanks, Wayne. I know this doesn’t pertain to your plugin, but is there any way to set the Deal Main Image to be equal to the Featured Image so that Postie doesn’t have to deal with that field at all?

    Plugin Author Wayne Allen

    (@wayneallen-1)

    Unfortunately it is not so simple, but not super complex either.

    You just need to figure out what all the components of the field are:

    a:2:{s:2:"id";s:4:"7330";s:3:"src";s:68:"https://localhost/wp-content/uploads/2015/05/cs1_small33.jpg";}

    Looks to me like:

    $v= array("id"=>"7330", "src"=>"https://localhost/wp-content/uploads/2015/05/cs1_small33.jpg");
    add_post_meta($postid, "_wps_deals_main_image", serialize($v));

    Where 7330 is the ID of the image.

    Plugin Author Wayne Allen

    (@wayneallen-1)

    The Shortcodes AddOn now supports custom taxonomies

    [pterm taxonomy=wpsdealtags term=Kindle]

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Postie & Social Deals Engine’ is closed to new replies.