Jump to content

New to PHP, looking for a couple basic fixes


dd4814
Go to solution Solved by QuickOldCar,

Recommended Posts

I'm working with a payment module for a zencart template. The files are in PHP and I know some HMTL over the years, but never touched PHP coding.

 

Here are three lines of text in my PHP....


define('MODULE_PAYMENT_DOLLARS_TEXT_TITLE', 'Pay with dollars!');
define('MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_TXT', 'Checkout with PayPal.');
define('MODULE_PAYMENT_PAYPALEC_MARK_BUTTON_IMG', 'https://www.paypalobjects.com/en_US/i/logo/PayPal_mark_37x23.gif');
On my site in the shopping cart checkout, there are two radio buttons and you can select either "pay with dollars" or "checkout with paypal".

Question #1 - Is it possible to make the text bold for the option "checkout with paypal"? how would i do it?
 
Question #2 - line #3 shows an image next to the paypal text, but its somehow showing the image based on another php file. I dont quite understand it, but my question would be... is there an easier way to show an image next to my text? I can use the "echo" command...
 
echo "<image src='https://www.anywebsite.com/myimage.png' />";
...which will show the image but it show it at the top left of my website :) not next to the "checkout with paypal" text. Any easy fixes for a noob?

Much appreciated! Ive been trying to hack my way around this coding, mostly with html knowledge, and have been totally unsuccessful.
Link to comment
Share on other sites

  • Solution

A lot of what you want seems to be more style related like css.

Your module most likely has css file you can edit.

 

Is piles of css tutorials and examples on the net.

 

You can use style right there if wanted to though.

define('MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_TXT', "<b>Checkout with PayPal.</b>");

Can't you just replace the image with yours?

define('MODULE_PAYMENT_PAYPALEC_MARK_BUTTON_IMG', 'https://www.anywebsite.com/myimage.png');

Really you should place that image inside a divider or span, if it already is then make a class for it for style

Just an example, no idea how need this styled or positioned.

echo "<div style='position:relative;top:200px;right:50px;margin:0;padding:2px;border:0;'><image width='70px' src='https://www.anywebsite.com/myimage.png' /></div>";
Edited by QuickOldCar
Link to comment
Share on other sites

WOW, I cant believe I missed it. I put the <b>  </b> and it worked. Working all day trying to find an answer and i must have been doing something so simple that was wrong. Because I know I tried that a few different ways. I then tried inserting an image just like the bold and that worked also. 

Problem solved! Thanks for opening my eyes!

 

 

define('MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_TXT', "<b>Checkout with PayPal.</b>");
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.