Zen Cart Logo
Forums / Addon Sideboxes / Sidebox Anywhere mod - Please Help

Sidebox Anywhere mod - Please Help

Views: 13,781

Results 21 to 40 of 64
8 Jan 2008, 10:49 AM
#21
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Sidebox Anywhere mod - Please Help

For the styling:

Add this to the very bottom of the single_sidebox.php file (after the closing ?> line):```

<style type="text/css"> @import "/includes/templates/tjrwatches/css/stylesheet.css"; </style>

You may have to even make that an entire URL:```
<style type="text/css"> @import "http://www.tjrstores.com/includes/templates/tjrwatches/css/stylesheet.css"; </style>
8 Jan 2008, 10:51 AM
#22
tjr_stores avatar

tjr_stores

New Zenner

Join Date:
Aug 2007
Location:
UK
Posts:
66
Plugin Contributions:
0

Re: Sidebox Anywhere mod - Please Help

DrByte:

Hmmm ... your tjrstores site is different from your iwacstores site.
They need to be on the same server ... and ideally on the same hosting account.

ahh just seen this replay.

sorry for previous posts.

So I can't actually have this anywhere.

Is there a way to get this working so i can have this on any website?

8 Jan 2008, 10:53 AM
#23
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Sidebox Anywhere mod - Please Help

For the images ... this gets more challenging ...
You can try adding the following define() into your index.php file that calls single_sidebox:

<?php $zcSBmodule='whats_new.php'; **define('DIR_WS_IMAGES' , 'http://www.tjrstores.com/images/');** require('/path/to/single_sidebox.php'); ?>
8 Jan 2008, 10:55 AM
#24
tjr_stores avatar

tjr_stores

New Zenner

Join Date:
Aug 2007
Location:
UK
Posts:
66
Plugin Contributions:
0

Re: Sidebox Anywhere mod - Please Help

hahahaha

you read my mind..

/*
 * Determine working directory
 */
  $startingDir = getcwd();
  $zcDir = realpath(dirname(__FILE__));
  chdir($zcDir);
	define('STRICT_ERROR_REPORTING', false);
/*
 * Set default image dir, which overrides the usual Zen Cart settings in case the working dir is not the same
 */
//  define('DIR_WS_IMAGES', $zcDir . '/images/');

You just gave me the code to sort the images.

What is this bit for?

/**
 * Load common library stuff 
 */
  require('includes/application_top.php');
8 Jan 2008, 10:57 AM
#25
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Sidebox Anywhere mod - Please Help

TJR Stores:

What is this bit for?

/**

  • Load common library stuff
    */
    require('includes/application_top.php');

That part of the code, and all the way to the end, is what runs the Zen Cart core and reads data and builds appropriate output based on the module selected.
8 Jan 2008, 11:01 AM
#26
tjr_stores avatar

tjr_stores

New Zenner

Join Date:
Aug 2007
Location:
UK
Posts:
66
Plugin Contributions:
0

Re: Sidebox Anywhere mod - Please Help

DrByte:

For the images ... this gets more challenging ...
You can try adding the following define() into your index.php file that calls single_sidebox:

<?php $zcSBmodule='whats_new.php'; **define('DIR_WS_IMAGES' , 'http://www.tjrstores.com/images/');** require('/path/to/single_sidebox.php'); ?>

OK. I have added the piece of code into every file that is relevant to what we are trying to do here and still no images showing.

8 Jan 2008, 11:07 AM
#27
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Sidebox Anywhere mod - Please Help

It's still trying to use the default of 'images/'

ie:
<img src="images/img4622040.jpg" alt= ...

I'm not sure if that's a result of the files being on separate domains/accounts, or if the change just wasn't uploaded to the server completely.

It's probably the separate domains issue :cry:

Did you do the stylesheet part too?

8 Jan 2008, 11:12 AM
#28
tjr_stores avatar

tjr_stores

New Zenner

Join Date:
Aug 2007
Location:
UK
Posts:
66
Plugin Contributions:
0

Re: Sidebox Anywhere mod - Please Help

It could well be. Which is a real shame because if we could get this working so it will work on separate server sites etc then it would be of great use for a lot of things in the future.

Alot of members on IWAC Stores have Zen Carts and this woudl be a great tool for them to use to cross promote etc.

8 Jan 2008, 11:13 AM
#29
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Sidebox Anywhere mod - Please Help

Hmmm ... I just did the DIR_WS_IMAGES thing, using a full URL, and it seems to pull the images from the other domain just fine ... and they're on servers on opposite sides of the continent.

So that makes me wonder if the new line got uploaded right.

8 Jan 2008, 11:17 AM
#30
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Sidebox Anywhere mod - Please Help

You've got it working, with full URL for images, on your new_stock.php script, but not on the iwac site.

What's the code look like now, on the server, for the iwac site's setup?

8 Jan 2008, 11:20 AM
#31
tjr_stores avatar

tjr_stores

New Zenner

Join Date:
Aug 2007
Location:
UK
Posts:
66
Plugin Contributions:
0

Re: Sidebox Anywhere mod - Please Help

DrByte:

You've got it working, with full URL for images, on your new_stock.php script, but not on the iwac site.

What's the code look like now, on the server, for the iwac site's setup?

This is what is in the page where i want the side box to show.

<?php
  $zcSBmodule = 'whats_new.php';
  $zcSBlayout = 'left';
  define('DIR_WS_IMAGES', 'http://www.tjrstores.com/images/');
  require ("http://www.tjrstores.com/single_sidebox.php");
?>
8 Jan 2008, 11:25 AM
#32
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Sidebox Anywhere mod - Please Help

May have to stuff that DIR_WS_IMAGES define into the single_sidebox.php file, above the line that calls application_top (remove the // from the beginning of the existing line, and set the URL in it.)

It could be that the separate-server issue is causing the define to not carry over.

What's most puzzling, is that if your tjrstores/new_stock.php file is calling the same single_sidebox.php file as your iwac testsite/index.php, why isn't the iwac one also pulling the stylesheet reference?
It just seems like your iwac code isn't getting any updates.

8 Jan 2008, 12:07 PM
#33
tjr_stores avatar

tjr_stores

New Zenner

Join Date:
Aug 2007
Location:
UK
Posts:
66
Plugin Contributions:
0

Re: Sidebox Anywhere mod - Please Help

OK to clarify..

you want me to put this code...

define('DIR_WS_IMAGES', 'http://www.tjrstores.com/images/');

in place of this code...

//  define('DIR_WS_IMAGES', $zcDir . '/images/');

on my single_sidebox.php file on my tjr store server?

Its all getting confusing now lol :shocking:

8 Jan 2008, 12:18 PM
#34
tjr_stores avatar

tjr_stores

New Zenner

Join Date:
Aug 2007
Location:
UK
Posts:
66
Plugin Contributions:
0

Re: Sidebox Anywhere mod - Please Help

Forget my last post.

It worked. :clap::clap::clap:

http://www.iwacstores.com/testsite/index.php

Now to be a real PITA..

Is it possible to do something similar but for a HTML editor?

Example..

http://iwacstores.com/testsite/shop.php?name=TEST-STORE&username=Test&user_id=100003

See the 'Store Description here...' that is added in by the user through a HTML editor or WSYGY thing :blush:

So all the user would need to do is add a piece of code and it displays.

Or is it just too much of a headache to try it that way?

8 Jan 2008, 5:10 PM
#35
berserker avatar

berserker

Totally Zenned

Join Date:
May 2006
Posts:
712
Plugin Contributions:
0

Re: Sidebox Anywhere mod - Please Help

Hello,

Will this mod work just like on this site?http://www.solarbatshades.com/index.php

I want to have something similar to "Cards we accept" sidebox that is outside the main content so that I could turn off the right column.

If this is not possible with this mod, is there other mods or scripts that I can use?

Thank you

8 Jan 2008, 10:08 PM
#36
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Sidebox Anywhere mod - Please Help

Berserker:

Hello,

Will this mod work just like on this site?http://www.solarbatshades.com/index.php

I want to have something similar to "Cards we accept" sidebox that is outside the main content so that I could turn off the right column.

If this is not possible with this mod, is there other mods or scripts that I can use?

Thank you

This "sidebox anywhere" mod is intended to display Zen Cart content on non-Zen-Cart sites.
If you're wanting to display logos of credit cards on your Zen Cart store, use one of the various sideboxes in the downloads area intended for that purpose.

8 Jan 2008, 10:09 PM
#37
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Sidebox Anywhere mod - Please Help

TJR Stores:

Now to be a real PITA..

Is it possible to do something similar but for a HTML editor?

Example..

http://iwacstores.com/testsite/shop.php?name=TEST-STORE&username=Test&user_id=100003

See the 'Store Description here...' that is added in by the user through a HTML editor or WSYGY thing :blush:

So all the user would need to do is add a piece of code and it displays.

Or is it just too much of a headache to try it that way?
Are you asking whether you can install an HTML editor?
Or are you asking to display certain HTML content from your Zen Cart store's database in that space?

8 Jan 2008, 10:23 PM
#38
berserker avatar

berserker

Totally Zenned

Join Date:
May 2006
Posts:
712
Plugin Contributions:
0

Re: Sidebox Anywhere mod - Please Help

DrByte:

This "sidebox anywhere" mod is intended to display Zen Cart content on non-Zen-Cart sites.
If you're wanting to display logos of credit cards on your Zen Cart store, use one of the various sideboxes in the downloads area intended for that purpose.

Hi,

Im not going to use it to display credit card logos as I know I can get one from the downloads section. Im going to use it for something else and the reason I need one is so that I could turn off the right column but still have what is supposed to be in this column in the sidebox just like in the site I have given.

Regards

8 Jan 2008, 10:49 PM
#39
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Sidebox Anywhere mod - Please Help

Berserker:

Hi,

Im not going to use it to display credit card logos as I know I can get one from the downloads section. Im going to use it for something else and the reason I need one is so that I could turn off the right column but still have what is supposed to be in this column in the sidebox just like in the site I have given.

Regards

Sorry, I must be dumb today. I don't understand what you want.
You have a right column with logos and promo info in it.
You said you want to turn it off.
But then you said you want what's supposed to be in the column just like the sidebox.

I think you're only painting half the picture or something. Somehow I'm not getting what you're after.

9 Jan 2008, 12:40 AM
#40
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Sidebox Anywhere mod - Please Help

Will this mod work just like on this site? http://www.solarbatshades.com/index.php

No. What you want is the 'Blank Sidebox' module (from the downloads section) and someone to do some customzing for you.

DrByte, in the example URL given and looking at the code, page bottom, you can see where the customization was done to turn OFF the Right column and use the BS mod to make it look like there is one. Kinda orginal actually as the BS mod by being taken outside the main Table and put in the Copyright Div, giving the Template a somewhat different look.