X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Adding a graphic (https://forum.x-cart.com/showthread.php?t=72168)

richardjknox 05-25-2015 03:00 PM

Adding a graphic
 
Hi

I'm new to all this, need to add a .jpg file to the bottom.tpl...

any help here would be greatly appreciated


thanks
rjk

totaltec 05-26-2015 02:21 AM

Re: Adding a graphic
 
Richard, you can upload the image to your skin directory or anywhere else on your site, and then reference the image in your template.

A good place to start learning would probably be some of my tutorials.

richardjknox 05-31-2015 05:23 AM

Re: Adding a graphic
 
1 Attachment(s)
Hi Mike

Thanks for that .. slowly getting there but could you please point me in the right direction, on another change I want to make.

All it is I want to do is change the color of the search bar ... firebug tells me it's in altskin .. but just can't find it .. appreciate it if you could help

cheers
Richard K

totaltec 06-02-2015 12:53 AM

Re: Adding a graphic
 
I'm assuming that you are using the ideal_responsive skin. look in skin/ideal_responsive/css/altskin.css

richardjknox 06-02-2015 10:26 PM

Re: Adding a graphic
 
1 Attachment(s)
Thanks for the input but I need a bit more of an A-Z of how to do it.

All I need is to add some logos etc the bottom .. I've included a screenshot of where they need to go

if anyone can help it would be much appreciated.

Many Thanks

cflsystems 06-03-2015 05:32 AM

Re: Adding a graphic
 
You will have to modify the css file to include the styling you need. Also customer/bottom.tpl file to add the images where you want them to show.
It is a combination of both. It will be hard for anyone to provide you with exact instruction of where and what to insert/change as all this depends on your site and how it is setup.

richardjknox 06-03-2015 08:29 AM

Re: Adding a graphic
 
It's just the standard Ideal Responsive template....

But thanks anyway

totaltec 06-07-2015 05:40 AM

Re: Adding a graphic
 
Richard,
Did my tutorials not help?
I have so many, surely one would be able to guide you through this task.

To add an image, you first need to find the correct template. Use Webmaster mode to figure out which template you need. I think the footer is customer/bottom.tpl or maybe customer/main/bottom.

Then you need to upload your image somewhere. I recommend skin/ideal_responsive/images if that is your template. Once the image is in that directory, you can reference it in the template like this:

<img src="{$AltImagesDir}/myImage.jpg" />

But if you want it to be responsive, it is best to also add a class( class="myImageClass"). Then you can add some CSS in your skin/ideal_responsive/css/altskin.css:
.myImageClass {
height: auto;
width: 100%;
max-width: 500px;
}

You can use the max-width to scale your image properly for the different screen sizes by including different values in each media query.

Of course, this is the tip of the iceberg. In order to accomplish this thing properly, you need to have a thorough understanding of the web in general, understand file paths, file types, image compression, encoding, permissions, how to unlock X-Cart (if you plan to use the built in editor), FTP or Cpanel, HTML, CSS and the list goes on. That is why I recommend watching tutorials and studying, or just hiring a professional.

neonrider 09-09-2017 09:28 AM

Re: Adding a graphic
 
I couldn't find this issue in your X-cart 4 tips. Does {$AltImagesDir} change depending on the directory name? My image location is /skin/ideal_responsive/images/custom/image.jpg

Thanks!

richardjknox 11-16-2017 11:41 AM

Re: Adding a graphic
 
Hi

I never got round to this ... I need to add some pictures to the right_bar.

Can find left_bar.tpl, but not the right_bar ... please could someone help and tell me which file I need to edit

Cheers
rjk

qualiteam 11-16-2017 08:35 PM

Re: Adding a graphic
 
What theme do you use? I believe all the built-in themes have no right sidebar, and a few pages that display blocks in the right sidebar just emulate it through CSS rules (like the "Bestsellers" block on the home page in our Ideal Responsive online demo).

richardjknox 11-16-2017 11:52 PM

Re: Adding a graphic
 
Hi Alex

Thanks for getting back to me

I'm using a 3rd Part clean look skin.

Is there any way of finding out the file I need to edit ? .. struggling on !

Cheers
rjk

ITVV 11-17-2017 12:46 AM

Re: Adding a graphic
 
Hi @richardjknox,

Which version of xcart are you using?

What is the skin called?

Kind regards

ITVV

richardjknox 11-17-2017 01:18 AM

Re: Adding a graphic
 
hi

4.6 and 7dana clean look wwww.pcdcomputers.co.uk

Just want to add some logos to the right hand side .. looks a bit bare.

Nice if you could help

Cheers
Richard Knox

pauldodman 11-17-2017 01:24 AM

Re: Adding a graphic
 
You would need to edit the file:
customer/right_bar.tpl
in your template folder.
Either add the images and code directly in there, or create a new template and call that from the right_bar.tpl template.

Finding the template to edit though is quite easy - just use Webmaster Mode from admin.

richardjknox 11-17-2017 01:28 AM

Re: Adding a graphic
 
hi
that's the problem it doesn't exist ...it's something to do with the CSS as mentioned by Alex above

Cheers
rjk

pauldodman 11-17-2017 01:34 AM

Re: Adding a graphic
 
At this stage, we are not dealing with css.
Css is just for the styles we want to apply.
Firstly you need to find and add the code that you might then style using css.

All templates exist in the common_files folder.
X-Cart first looks for templates in the custom template folder - if they don't exist there, then it uses the default ones in the common folder.
Templates only exist in the custom folders if they have been modified.

So if there is no right_bar template in the custom folder, it is using the default one in the common folder.

You can edit that there, or you can upload it yourself to the custom folder, and it will then take precedence over the file in the common folder.

Again, if you use Webmaster mode, you'll see both the template in question, and which folder it is in.

ITVV 11-17-2017 01:57 AM

Re: Adding a graphic
 
@richardjknox

Try having a look in: -

skin/customer/home.tpl

From memory I think that this file controls left and right data / images. It did in an older version anyway.

Hope that helps?

Regards

ITVV

ITVV 11-17-2017 02:02 AM

Re: Adding a graphic
 
UPDATE

Actually perhaps in: -

skin/common_files/customer/content.tpl

ITVV

richardjknox 11-17-2017 04:28 AM

Re: Adding a graphic
 
thanks Guys

I haven't got ftp access here at work ... so I'll have a look when I get back home tonight, and let you know how I get on

Cheers
rjk

pauldodman 11-17-2017 06:14 AM

Re: Adding a graphic
 
Yes, I would always prefer to work with ftp, but just an FYI, you can do this through admin with Webmaster mode, and Edit Templates.

richardjknox 11-17-2017 06:35 AM

Re: Adding a graphic
 
doh ... yes of course . .. thanks I'll have a look later
cheers

richardjknox 11-18-2017 05:13 AM

Re: Adding a graphic
 
hi

Thanks I can see how it works now ... and I can add images in.. but, need help on positioning.. eg this puts up a credit card image, but simply follows on from the last include ie best sellers.

<div style="text-align: center; margin: 25px 0 10px 0;">
<img src="{$AltImagesDir}/cards.gif" alt="We accept American Express, Visa, Master Card and Diners." />
</div>

Is there anyway of forcing it to be at a certain position .. ideally at the bottom of the right_bar.tpl ?

Cheers
rjk

ITVV 11-18-2017 08:24 AM

Re: Adding a graphic
 
Hi again,

Which .tpl file are you working in?

Regards

ITVV

richardjknox 11-18-2017 08:38 AM

Re: Adding a graphic
 
hi

Thanks for getting back to me ...it ended up being :-

skin/common_files/customer/right_bar.tpl

The problem for me it looks bare as it I don't have the affiliates etc where they would normally show.. so I want to stick in some logo's and images to brighten it up

thanks
rjk

ITVV 11-18-2017 08:55 AM

Re: Adding a graphic
 
Hi again,

I am using a different skin which is using all sorts of different includes / CSS.

However, here is a very basic version of what I use for Credit Card Logos. Perhaps try this in your skin/common_files/customer/right_bar.tpl and adjust via CSS?

{*right_bar.tpl*}
Code:

<div class="payment_logos_new">
<ul><li><img class="lazy" src="{$ImagesDir}/spacer.gif" width="48" height="30" data-src="{$AltImagesDir}/payment/paypal.png" alt"PayPal">&nbsp;</li>
        <li><img class="lazy" src="{$ImagesDir}/spacer.gif" width="48" height="30" data-src="{$AltImagesDir}/payment/amex.png" alt="Amex">&nbsp;</li>
        <li><img class="lazy" src="{$ImagesDir}/spacer.gif" width="48" height="30" data-src="{$AltImagesDir}/payment/mastercard.png" alt="MasterCard">&nbsp;</li>
        <li><img class="lazy" src="{$ImagesDir}/spacer.gif" width="48" height="30" data-src="{$AltImagesDir}/payment/maestro2.png" alt="Maestro">&nbsp;</li>
        <li><img class="lazy" src="{$ImagesDir}/spacer.gif" width="48" height="30" data-src="{$AltImagesDir}/payment/switch2.png" alt="Switch">&nbsp;</li>
        <li><img class="lazy" src="{$ImagesDir}/spacer.gif" width="48" height="30" data-src="{$AltImagesDir}/payment/visa.png" alt="Visa">&nbsp;</li>
        <li><img class="lazy" src="{$ImagesDir}/spacer.gif" width="48" height="30" data-src="{$AltImagesDir}/payment/visae.png" alt="Electron"></li>
</ul>
</div>


CSS
Code:

/* NEW PAYMENT LOGOS HEADER
-------------------------------*/
div.payment_logos_new ul { text-align: center; margin: 0; margin-top: 0px; margin-bottom: -10px; padding: 0; }
div.payment_logos_new ul li { display: inline-block; padding-right: 0px; padding-top: 6px; }
div.payment_logos_new ul li span { white-space: nowrap; text-indent: 9999em; overflow: hidden; }
div.payment_logos_new ul li img { min-width: 48px; min-height: 30px; border-radius: 0px; }


Hope it helps a little?

Kind regards

ITVV

richardjknox 11-19-2017 03:16 AM

Re: Adding a graphic
 
hi thanks

I can now insert the images into the RIGHT_BAR.TPL but what I really need to be able to do is to position it at the bottom of the box.

What happens now is that it just follows the include which is RECENTLY VIEWED. As a result images vary position depending on how the RECENTLY VIEWED has been filled.

Is it possible to define where an image can go ?

thanks
rjk

cherie 11-19-2017 12:46 PM

Re: Adding a graphic
 
Code:

#right-bar .payment_logos_new {
  position: absolute;
  bottom: 0;


ITVV 11-21-2017 09:39 PM

Re: Adding a graphic
 
Hi,

Did @cherie CSS do the trick for you?

Kind regards

ITVV

richardjknox 11-25-2017 05:19 AM

Re: Adding a graphic
 
Hi .. not really, I guess at the end of the day this is where you need to be a programmer .. which I'm not ....

But thanks for all the help anyway.

But the other (or major) problem I have is the import.php. You can set errors say = 100 but if there's one image that's wrong, then the whole thing stops, without importing anything, which is very frustrating, especially as we have 1000's of images to import !

There is a fix on here for v4.11, but I'm on v4.6, and the import.php code looks totally different.

I did buy the BCSEngineering import module for a whole lot of $$$, but they tell me it can't be installed, blaming my hosting company. So ended up being a waste of money, as I can't use it.

Any help on the import.php would be greatly appreciated

Thanks
rjk

pauldodman 11-28-2017 01:56 AM

Re: Adding a graphic
 
Indeed, the import function can be very frustrating, especially if you have to keep fixing images, 1 or 2 at a time and then re-run the import, fix the next 2 images, and so on.
What I would suggest is fixing it so that it shows lots or all the errors at once, so you can fix them all in one go.

To do that, edit the file:
include/import.php

and find
$max_errors = 2; // Max number of errors before break importing

and change the 2 to something larger.

richardjknox 11-28-2017 02:15 AM

Re: Adding a graphic
 
Hi Paul

Yes I've done that, and that is fine with all the other fields categories etc, but if any image is wrong, then the import stops at that point, irrespective of the max error no.

I've had it where I've imported 1000 records which takes ~ 3 hours and has stopped at record 999 !

I believe it's not the image at fault it seems to be a timeout over the internet

Xcart have quoted me $200 to fix it... so I might have to do that, as I'm not bothered about the time it takes, I just can't be done with it stopping after 2 or 3 hours of importing.

Cheers
RJK

pauldodman 11-28-2017 02:32 AM

Re: Adding a graphic
 
Yes, it's probably a timeout - but it shouldn't take 3 hours to import 1000 records!!
Something is wrong - other than the timeout.

Have you tried importing a smaller file to see - say just a couple, or 10 records?

richardjknox 11-28-2017 02:47 AM

Re: Adding a graphic
 
hi Paul

Yes that's the only way to do it ... cut it down in to batches of 100.

But it takes for ever.... it seems such a simple request .... modify the code so it ignores any errors ... but even Xcart are not sure if they can do it!

Cheers
rjk

pauldodman 11-28-2017 03:13 AM

Re: Adding a graphic
 
So it takes forever, even with 10 rows?

cflsystems 11-28-2017 06:04 AM

Re: Adding a graphic
 
Remove images from the import file. Import it. Then do another import with images only. At least you will have all the other fields already in. Images may take longer if the import has to copy them from remote location or url. Your disk speed, space, OS and overall server resources also play role.

richardjknox 11-28-2017 06:10 AM

Re: Adding a graphic
 
Hi Steve

That's exactly what I do ... Xcart have come back to me with a cost to modify the import.php @ $200 ... but it will be well worth it for me ... as I could set the import going overnight and not come down to it having failed in the morning meaning I've got to do it all over again !

It takes 8 hours to do 30k records !

I'll let you know how I get on

cheers
rjk

richardjknox 12-03-2017 10:49 AM

Re: Adding a graphic
 
Hi Paul

it pro rata ~ 3 secs / records so 10 rows no time at all ... it's just I've 30,000 !

pauldodman 12-04-2017 03:53 AM

Re: Adding a graphic
 
OK, that proves that the process itself is working at least, and also that your import file is correct, etc.

It's just a case of deciding if you are going to split it up into several files so it comes in under the timeout limit, or you split it into less data with no images for e.g. - or you get it fixed so it runs as is.


All times are GMT -8. The time now is 11:22 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.