Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Author « Topic »  

James
Starting Member

13 Posts

Pre-sales questions only
(More Details...)

Posted - 04/17/2020 :  09:52:56  
I am in the process of moving my old Dreamweaver template site to a Wordpress site. The files are in a directory which is redirected to the root. I set the redirect up in WP and it works fine for WP.

I set up several cart pages for the menu and they all have url's from the root but if I click on a link on one of the pages, the url goes back to the directory where the files are.

An example, if I click on the Categories menu item it opens as texsales.com/categories.php but when I click on a sub category it opens up as texsales.com/wordpress/categories.php?cat=Owners+Manuals

The product detail pages all open in the wordpress directory such as texsales.com/wordpress/proddetail.php?prod=SM2420 but If I manually remove the wordpress in the browser bar the product still displays fine as texsales.com/proddetail.php?prod=SM2420

I tried my best to follow all of the instructions, both ect and wp and in fact, everything works including the cart and checkout but I really would like my product url's to remain the same.

Any help or ideas would be greatly appreciated.

Vince
Administrator

42451 Posts

Posted - 04/17/2020 :  13:19:20  
Hi James
The reason that the links are directing to the wordpress directory is because there is a "base href" tag in the head set to...
texsales DOT com/wordpress/
This means that all links are relative to that directory. The reason this statement is there is to make sure that SEO links like...
/products/my_product
...get redirected properly. But this is really happening because your wordpress site URL isn't really the site URL. I think if this is a temporary measure then maybe the way around it is to edit the file...
wp-content/themes/<THEMENAME>/header.php
...and remove the line...
<?php echo '<base href="' . site_url('/') . '" />'; ?>
Then put that line back when you put things in the correct location.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

James
Starting Member

13 Posts

Pre-sales questions only
(More Details...)

Posted - 04/17/2020 :  16:20:04  
Vince,

That worked for the category page but not for the product detail pages.

James

Vince
Administrator

42451 Posts

Posted - 04/18/2020 :  01:31:16  
Hi James
> The files are in a directory which is redirected to the root.
Well that is the reason for this I guess as the cart is generating the correct links for its location even though the eventual URL is rewritten. But then thinking about it, why not just actually put the files in the root?

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

James
Starting Member

13 Posts

Pre-sales questions only
(More Details...)

Posted - 04/18/2020 :  10:34:16  
Thanks Andy, I moved all of the files to the root this morning and after crashing and burning the whole site a couple of times, I finally got everything lined up right and the site is working like it should. Just a few cosmetic issues left to deal with.

One quick question. I added magic thumb to the site but ect is not calling the magic css. I am using css layouts on the proddetail page so I can't put the style link in the proddetail.php file like the instructions say. How do I link the magic css to my css based detail pages?.

Vince
Administrator

42451 Posts

Posted - 04/18/2020 :  10:56:31  
Hi James
Have you set the...
$GLOBALS['magictoolbox']="MagicThumb";
...parameter in your include.php file? There are more details here...
https://www.ecommercetemplates.com/help/magictoolbox.asp

Well done on getting the site sorted!

Vince (Not Andy)

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

James
Starting Member

13 Posts

Pre-sales questions only
(More Details...)

Posted - 04/18/2020 :  10:59:05  
Yes, I did set $GLOBALS['magictoolbox']="MagicThumb"; in the includes but that didn't work. I just now added <link href="<?php print site_url('/') ?>magicthumb/magicthumb.css" rel="stylesheet" type="text/css" /> to my WP child theme and that did the trick.

Vince
Administrator

42451 Posts

Posted - 04/18/2020 :  12:17:07  
Sorry for that oversight James and I've added code to the Child Theme headers so the Magic Toolbox CSS is automatically included if the parameter is set.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.02 seconds. Snitz Forums 2000