How to edit the Checkout button to Order Now - php

I need to change the text of the checkout button which is viewed once hovered on the cart if any product is their in the cart, I need to rename it as Order Now instead of Checkout.
Please do suggest me the answer...
Below is the link to the image...
Click here to view the screenshot

Since you want to update Checkout word to Order Now ONLY in the Header Cart => Mini Cart, do the following:
Assuming you are using the RWD theme, navigate to app/design/frontend/rwd/default/template/checkout/cart/minicart/items.phtml
Line no: 94 & 95 From:
<a title="<?php echo $this->quoteEscape($this->__('Checkout')) ?>" class="button checkout-button" href="<?php echo $this->getCheckoutUrl() ?>">
<?php echo $this->__('Checkout') ?>
</a>
Update to:
<a title="<?php echo $this->quoteEscape($this->__('Order Now')) ?>" class="button checkout-button" href="<?php echo $this->getCheckoutUrl() ?>">
<?php echo $this->__('Order Now') ?>
</a>
Screenshot:
Let me know if this helps.
Happy Coding...

you can simply locate the template of that block and change the text. You can locate the template by using template path hints under
system->configuration->developer and set show template path hints to yes
and than on front-end you will be able to see the template file path on browser and you can easily change the text than.
thanks and let me know if there is any issues.

You can change simply by admin go to this path
Admin->system->configuration->developer->( click )Translate Inline and yes in ' Enabled for Frontend' save config
Refres your frontend and change your text then submit
Solve your problem......

Related

php woocommerce ID Custom Field displaying in URL

Pasted Custom Field code into Woo commerce template to display a Custom Field Link.
Code used is:
<a href="<?php the_field('datasheet',the_ID()); ?>" >Download File</a>
But in the front end it adds the Product ID into the url.
it ends up looking like this:
Download Datasheet
Any ideas?
<a href="<?php the_field('datasheet',the_ID()); ?>" >Download File</a>
<a href="<?php the_field('datasheet',the_ID()); ?>" >Download File</a>
The purpose of the_ID() is to display the post id, meaning it will echo it.
You want get_the_ID() here, which only returns the id, but does not directly output it.

Joomla 3.7.1 - Adding Links and title tags to article intro images

Hi guys wondering how I can manually add a link from Joomla intro article images to their corresponding article and also add a title tag to the link.
Ideally the way I want to do this is to for example wrap an achor tag around the image reference in the blog-item.php file (also want to achieve this for generic articles). And then within the anchor tag capture the related image alt tag and populate the title tag with that value.
Below is where I'm at. It's not currently working, not sure why as it should be pretty straight forward. I'm not a php developer, wondering what i'm missing.
Also already cleared both browser and joomla caches after my changes.
Any help would be appreciated, cheers guys
<a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)); ?>" title="<?php echo htmlspecialchars($images->image_intro_alt); ?>">
<img
src="<?php echo htmlspecialchars($images->image_intro); ?>"
alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>"/>
</a>
To make your code work, add just before your code.
<?php $images = json_decode($this->item->images); ?>
and your code will start working.
Already tested and it worked.

Adding #id to the_permalink()

I cant seem to figure out the code for this. im currently in the functions.php of my child theme.
i'm trying to have an image link to the comments section of the post. I already have a button that links to the post itself.
the code looks like
<a href="<?php the_permalink(); #reply-title ?>">
<img src="http://trueidconference.com/wowministriesblogs/wp-content/images/JOINimg.png" alt="Mountain View" style="margin-left:12px;"></a>
when I try it, it just doesn't show up. if I use it shows up, but of course doesn't link to the post, then to the id.
I have tried different variations even using echo to get it to work.
But I just cant seem to figure out how to add #reply-title to whatever the current permalink is.
the reason it is in the functions.php is because i needed to add this link to the bottom of every post.
Try:
<a href="<?php echo get_the_permalink(); ?>#reply-title">
If I understand correct you need this:
<a href="<?php the_permalink(); ?>/#reply-title">
<img src="http://trueidconference.com/wowministriesblogs/wp-content/images/JOINimg.png" alt="Mountain View" style="margin-left:12px;">
</a>

Linking to wordpress posts for a particular location using a tag "name" attribute

I am linking a wordpress post by using the below code.
<a href="<?php echo get_permalink( 15 ); ?>"
Which renders as below
http://mydomainname.com/?p=15
But when the users click, it should open up on a specific location, so I have used a tag with the attribute name to show that area directly.
Below is my HTML code.
<a name="fi"></a>
So the rendered URL would be like the below.
http://mydomainname.com/?p=15#fi
When I manually type like the below, it opens up perfectly on the location that I want it to open, but I do not know how to make changes to <a href="<?php echo get_permalink( 15 ); ?>" to achieve what I am looking for.
Adding #fi after the php code will achieve this:
Some link
that will print out to http://mydomainname.com/?p=15#fi

Customize Magento template

I've installed some theme, which has header logo defined in header.phtml like this:
<img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" />
I don't really want to alter this template, also in that .phtml file it says not to edit it. How can I override this getLogoSrc most efficiently?
In the web admin, go to System>Configuration>Design and scroll down to Header>Logo Image Src. Insert the filename that you have saved in /skin/frontend/default/new_theme/images/ and click Save.
Go to your template's images folder e.g.: /skin/frontend/default/new_theme/images/
and replace the logo image in that folder with your new Logo

Categories