WordPress.org

Support

Support » Plugins and Hacks » DukaPress » [Resolved] dukapress where to paste php echo in page templates

[Resolved] dukapress where to paste php echo in page templates

  • Hello All,

    I am trying to copy and paste the followings php codes but where exactly in page templates to paste it i don’t know. Meanwhile, i was able to edit the category.php but for page.php i appreciate if any can help me. thanks

    Use this to make the Checkout Page

    <?php echo (do_shortcode('[dpsc_checkout]')); ?>

    Use this to make the Thank You Page

    <?php echo (do_shortcode('[dpsc_thank_you_page]')); ?>

    Use either of these to display the product in a single page/post

    <?php echo (do_shortcode('[dpsc_display_product]')); ?> //shows "Add to Cart" button
    <?php echo (do_shortcode('[dpsc_display_product buy_now="yes"]')); ?>//shows "Buy Now"

    Use this shortcode to generate an order log

    <?php echo (do_shortcode('[dp_order_log]')); ?>

    Use this to display products in a Grid layout

    <?php echo (do_shortcode('[dpsc_grid_display]')); ?>

    [Please post code snippets between backticks or use the code button.]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author moshthepitt

    @moshthepitt

    Please put the above code where you want them to show up.

    In most cases, this will be in the place where the template file displays the content.

    Hi Moshthepitt,

    I tried paste it in page.php and post.php but it did not work, I am using suffusion-child and I wish you could tell me exactly where to paste it? for example, I was able to paste and delete the categories shortcodes in category.php cos of the directives below Thanks:

    Sebastian
    March 2, 2011 at 8:22 am

    Hello there,

    I’m really noob programmer and i’d love to know where the heck to put that code 😛

    Sorry for being such an idiot and thanks for your help!
    Reply

    Kelvin
    March 2, 2011 at 11:29 am

    Hey Sebastian!

    Most themes have either: archive.php, category.php, or index.php. You need to take one of these files (back up 😛 ) and then look at the code, you will notice that generally there is a php “while” statement, followed by “if” and “else if”. These are where the theme is calling the loop to display the category contents.

    Somewhere, you will notice something like the_content or the_excerpt inside a php statement. This is where a post;c content is displayed. So delete the php there and put in all the code above instead.

    Then go through the rest of the file and delete all the other php while and if statements. make sure to leave all the “div” statements in tact.

    If you do this, then rename your file “category.php” and you’ll be done.

    I have generalised things because of the sheer number of themes and all their different approaches, but its the basic procedure.

    So, I don’t know if I need to delete any line or just to paste the codes at the right place. Also, can the label name: “Tax” in the shopping cart be replace? Thanks once again

    Hi, I don’t know if I should open another topic for my now problem: My Basic Shop Settings can’t be save, after editing the fields then I clink save-settings but if I went back to the settings it was not saved everything went out please help

    Plugin Author moshthepitt

    @moshthepitt

    I have sent you an email regarding this.

    Also:
    1. Why are you using page templates instead of shortcodes? What do you want to achieve?
    2. Which theme are you suing?

    Hi,

    Sorry for the delay. I am using suffusion-child but I have decided to for go the template issue, I think I misunderstood the directives about short-codes and templates.

    However, I would be more glad if you would have some time to answer the following questions, Thanks

    1) Is there anyway to change label name “Tax” in the shopping cart (checkout page) with something like fee?
    2) to enter payment methods label names like bank, mobile etc…? there is only check points and one wouldn’t know which is which.
    3) to edit the Order invoice send in mail to customer to have link back to the product page and arranged the looks well?
    4) I import Using Sample Data; which of the photo gallery plugin do I need to edit the images? I was not able to edit or upload same with my wp photo gallery.
    5) What is difference between lightbox plus, lightbox2, simple lightbox plugins and which is better?
    Finally, apart from Quick Cache which is better for a site with dukapress plugin, wp super cache or W3 total cache?

    Best regards

    Rossi

    Plugin Author moshthepitt

    @moshthepitt

    I replied to this via email:

    Here are my other answers:
    1. You have to either change the code and write “fee” instead of Tax or use the language file to achieve the same thing.

    2. I dont understand what you mean. Could you say that again?

    3. You’ll also need to edit the code in dp-cart.php

    4. I do not know if you can edit the images using any WordPress plugin. Why do you want to edit?

    5. I do not know about the lightbox plugins, could you please contact the plugin authors?

    6.I prefer Quick Cache and do not know much about the others so i cannot recommend.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] dukapress where to paste php echo in page templates’ is closed to new replies.
Skip to toolbar