WordPress.org

Forums

Cart66 Lite :: WordPress Ecommerce
Dynamic message based on order id (5 posts)

  1. edd.pastafarian
    Member
    Posted 2 years ago #

    How would I go about displaying a dynamic message based on the order ID? I know very little php but I can follow directions quite well. :)

    http://wordpress.org/extend/plugins/cart66-lite/

  2. oomskaap
    Member
    Posted 2 years ago #

    which means your dynamic message will just show once, because each order ID is unique and just used once. Why not just write the message on the post itself? You can have messages when its in a specific category etc.. but i'm not quite sure what you mean by order ID.

  3. edd.pastafarian
    Member
    Posted 2 years ago #

    That's exactly what I want. I'll have a database full of unique messages, each associated with one order and one order only.

    For example, Visitor 1 makes a purchase and upon checkout receives the message, "Message the first." The first order in the Cart66 database gets the first message in the message database.

    Visitor 2 gets this message upon checkout: "Thank you for this purchase." which is message #2. The second order, the one with an ID of 2 in the orders database, receives the message with ID of 2 in the message database.

    Order 3 gets message #3, "This is another unique message." etc.

    The messages will actually each have a unique string of text that will correspond with something completely unrelated to this wordpress install but is not random.

  4. oomskaap
    Member
    Posted 2 years ago #

    To have ID2 (product 2) show a message "Thank you for this purchase." , is ab it odd, what about people who buy product 1 (ID1), they dont get that warming message?. I think what you're trying to do is way beyond my expertise, but if i was in your position where i want each cart ID to show a specific message, i'de think of it this way:

    each ID is linked to an Item Number and product. So if ID1 is linked to a product "orange". So then you go and find the wordpress post id of "orange", and then when people add orange to their cart, and checkout, you can modify the checkout page itself with some php rule like "if post id= orange, then echo this message "thanks for buying an orange".

    But anyway, if u want anything to show at the checkout, you're going to have to add the code to your Pages > Checkout page and install a wordpress plugin that lets you execute PHP code in pages/posts.

  5. edd.pastafarian
    Member
    Posted 2 years ago #

    Thanks for your effort, oomskaap.

    The example messages I gave were just an attempt to show that they weren't generated but pre-written.

    I can add the php code, I can upload the messages, and I can isolate the id's; what I can't do is pull a specific unique message for each order. What the buyer should see is, "Thank you for your purchase. Here is your code to enter at site XYZ: 123ABC456" where the code is pulled only once from a list that I've come up with independently.

    Does that make more sense?

    I realize this isn't as easy as one would think. I've searched for hours and can find no solution that doesn't require me learning to do some pretty intensive programming or paying someone to do it for me.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic