Subdomain Discount coupon help popup incorrectly uses main domain link and coupon ID.
I have two websites. The first is "main-domain-retail.com" and the second is "subdomain-dealers.com". Both use discount coupons.
The information which displays in the popup_coupon_help for the subdomain-dealers.com incorrectly shows information from the main-domain-retail.com discount coupon of the same coupon ID.
What needs to be done to display the correct information from the subdomain? I made several attempts to revise ot_coupons.php in the subdomain but was unsuccessful.
Thanks for your help.
Re: Subdomain Discount coupon help popup incorrectly uses main domain link and coupon
Re: Subdomain Discount coupon help popup incorrectly uses main domain link and coupon
as far as I can tell, it only uses the HTTP_SERVER and DIR_WS_CATALOG settings to produce the links, so either you've got something busted in your configure.php files or you've hard-coded something to a specific URL someplace that's overriding normal built-in behavior.
https://www.zen-cart.com/tutorials/index.php?article=38
https://www.zen-cart.com/tutorials/index.php?article=39
http://www.zen-cart.com/wiki/index.p...Obscure_Issues
And ... you should be upgrading to the latest version since there are some well-published ugly security holes in the old version you're running.
Re: Subdomain Discount coupon help popup incorrectly uses main domain link and coupon
The original description given for the site organization is not correct. The main domain "main-domain-retail.com" is in the root directory. The dealer site is a subdirectory of the main domain and is located by "www.main-domain-retail.com/dealersite/". It is not a separate domain but a subdirectory of the main store. The dealersite is a separate Zencart download that functions independently of the main store.
The settings in dealersite of the two items you mentioned are currently
define('HTTP_SERVER', 'http://www.main-domain-retail.com')
define('DIR_WS_CATALOG', '/dealersite/')
Is this format correct? (the site names are not actual names)
So far the only thing that seems to not be working properly in the dealersite is the contents of popup_coupon_help. The information being displayed is taken from corresponding coupon ID's used in the main-domain-retail.com not the dealersite. The base href is going to www.main-domain-retail.com. Using the developers tool kit, I have not found hardcoding for the main domain.
I apologize for the incorrect description in the original post.
If there is no good way to resolve this issue, the help popup is not required on dealersite. What can be done to deactivate the help popup?
Thanks.
Re: Subdomain Discount coupon help popup incorrectly uses main domain link and coupon
Quote:
Originally Posted by
GTHENRY
The settings in dealersite of the two items you mentioned are currently
define('HTTP_SERVER', 'http://www.main-domain-retail.com')
define('DIR_WS_CATALOG', '/dealersite/')
Is this format correct? (the site names are not actual names)
Without specifics, it "looks" fine.
Quote:
Originally Posted by
GTHENRY
So far the only thing that seems to not be working properly in the dealersite is the contents of popup_coupon_help. The information being displayed is taken from corresponding coupon ID's used in the main-domain-retail.com not the dealersite. The base href is going to
www.main-domain-retail.com.
I can't see any reason why that would happen based on original core code in order.php and ot_coupon.php, since they both use zen_href_link() properly to generate the link using the HTTP_SERVER and DIR_WS_CATALOG entries as I indicated earlier.
I'm not clear about "what link" you're clicking on that's taking you to the wrong site. THAT is likely more of an indicator of the problem.
Quote:
Originally Posted by
GTHENRY
If there is no good way to resolve this issue, the help popup is not required on dealersite. What can be done to deactivate the help popup?
Again, it really depends WHAT link on WHAT page is showing incorrectly.
Re: Subdomain Discount coupon help popup incorrectly uses main domain link and coupon
The problem was happening only in the admin side, not the customer side. The link is found on the customer order page and on the Invoice page.
The problem may be solved. I found in the dealersite admin configure.php that these were set to the main root directory
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');
but should probably be
define('DIR_WS_CATALOG', '/dealersite/');
define('DIR_WS_HTTPS_CATALOG', '/dealersite/');
Is this correct?
Thanks for you help.
Re: Subdomain Discount coupon help popup incorrectly uses main domain link and coupon
Yes, that sounds like a likely cause.