Forums / General Questions / Subdomain Discount coupon help popup incorrectly uses main domain link and coupon ID.

Subdomain Discount coupon help popup incorrectly uses main domain link and coupon ID.

Started by gthenry on 17 Jun 2011, 4:38 PM · Views: 3,163

Results 1 to 7 of 7
17 Jun 2011, 4:38 PM
#1
gthenry avatar

gthenry

New Zenner

Join Date:
Oct 2007
Location:
Northeast Georgia, USA
Posts:
36
Plugin Contributions:
0

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.

17 Jun 2011, 6:22 PM
#2
gthenry avatar

gthenry

New Zenner

Join Date:
Oct 2007
Location:
Northeast Georgia, USA
Posts:
36
Plugin Contributions:
0

Re: Subdomain Discount coupon help popup incorrectly uses main domain link and coupon ID.

Version 1.3.8a

17 Jun 2011, 6:33 PM
#3
drbyte avatar

drbyte

Sensei

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

Re: Subdomain Discount coupon help popup incorrectly uses main domain link and coupon ID.

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.php/Troubleshoot_-_Diagnosing_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.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

18 Jun 2011, 4:06 PM
#4
gthenry avatar

gthenry

New Zenner

Join Date:
Oct 2007
Location:
Northeast Georgia, USA
Posts:
36
Plugin Contributions:
0

Re: Subdomain Discount coupon help popup incorrectly uses main domain link and coupon ID.

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 https://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.

18 Jun 2011, 5:59 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: Subdomain Discount coupon help popup incorrectly uses main domain link and coupon ID.

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.
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 https://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.

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.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

18 Jun 2011, 9:26 PM
#6
gthenry avatar

gthenry

New Zenner

Join Date:
Oct 2007
Location:
Northeast Georgia, USA
Posts:
36
Plugin Contributions:
0

Re: Subdomain Discount coupon help popup incorrectly uses main domain link and coupon ID.

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.

19 Jun 2011, 6:06 AM
#7
drbyte avatar

drbyte

Sensei

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

Re: Subdomain Discount coupon help popup incorrectly uses main domain link and coupon ID.

Yes, that sounds like a likely cause.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.