How to add Store Name in the default Order Confirmation email sent to the cucstomer

I would like to add the following text code to the default Order Confimation email sent out to each customer, in each and every new sub site creation:

The sub store name (Site Title).

I see the plugin provides following codes: CUSTOMERNAME, ORDERID, ORDERINFO, SHIPPINGINFO, PAYMENTINFO, TOTAL, TRACKINGURL

Just wondering how to add the sub site “Site Title” there in the default setup which will automatically go to each sub site as the default message.

Such as:

Thank you for your order CUSTOMERNAME at SITE-TITLE-HERE!…

(I know each sub site can manually add this in the message tab, and I am just trying to see if there is any way this can be added in the default message in the installation package when creating a new sub site).

Thank you:slight_smile:

  • DavidM
    • DEV MAN’s Mascot

    Hi winning,

    From what I gather, you’d like to have the Order Confirmation message always default to a particular message when creating new sub-sites, is that correct?

    If so, the only way I could see doing that currently would be to edit the MarketPress core, not something we’d advise doing, as updates will overwrite that.

    If you’d like to go that route you’ll find the relevant default order text on line 226 of marketpress.php. Though you’d still have to add in a new constant for the sub-site title on line 3583 of that same file.

    Hope that helps!

    -David

  • winning
    • The Incredible Code Injector

    Thank you David for all the detailed instructions.

    Is it like this to add the new constant ‘SUBSITETITLE’ (to be used in the default order text):

    //setup filters

    $search = array(‘CUSTOMERNAME’, ‘ORDERID’, ‘ORDERINFO’, ‘SHIPPINGINFO’, ‘PAYMENTINFO’, ‘TOTAL’, ‘TRACKINGURL’, ‘SUBSITETITLE’:wink:;

    $replace = array($order->mp_shipping_info, $order->post_title, $order_info, $shipping_info, $payment_info, $order_total, $tracking_url, $blog_title);

    $blog_title can be used to fetch the sub sites’ title, right?

    Thanks :slight_smile:

  • Philip John
    • DEV MAN’s Apprentice

    Hiya,

    Just checking if it was eventually resolved in another thread? Or by yourself separately to us? Or by us over email with you? Or using our live support?

    If so, no need to reply, that’s great news.

    If not, could you let us know by re-opening this topic, and we’ll get onto it and helping you out asap!

    Otherwise, happy days, glad you got it sorted :slight_smile:

    Thanks!

    Phil

  • winning
    • The Incredible Code Injector

    Hi Phil,

    About “add in a new constant for the sub-site title on line 3583 “

    Can the following code do it?

    Is it like this to add the new constant ‘SUBSITETITLE’ (to be used in the default order text):

    //setup filters

    $search = array(‘CUSTOMERNAME’, ‘ORDERID’, ‘ORDERINFO’, ‘SHIPPINGINFO’, ‘PAYMENTINFO’, ‘TOTAL’, ‘TRACKINGURL’, ‘SUBSITETITLE’:wink:;

    $replace = array($order->mp_shipping_info, $order->post_title, $order_info, $shipping_info, $payment_info, $order_total, $tracking_url, $blog_title);

    $blog_title can be used to fetch the sub sites’ title, right?

    Or I need get_bloginfo(“name”:wink: to set the SUBSITETITLE seperately?

    Thanks :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.