lat9 / one_page_checkout

One-Page Checkout for Zen Carts v1.5.7a and later.
GNU General Public License v2.0
15 stars 11 forks source link

zc158: Use built-in function to gather country-specific zones #333

Open proseLA opened 2 years ago

proseLA commented 2 years ago

hi cindy,

this section of code:

https://github.com/lat9/one_page_checkout/blob/b67b1cbaae1be0ba4dd68eae0840805b927218d5/includes/classes/OnePageCheckout.php#L1181-L1208

looks very much like this section:

https://github.com/zencart/zencart/blob/2160f2936ce2f466495a4acdfed65e826588adbc/includes/templates/template_default/jscript/zen_addr_pulldowns.php#L26-L54

i think if we could move the ZC to a function (the horror), we could then make use of it here.

thoughts?

i would not be opposed to doing the PR on the zc if you think we can make use of it here.

lat9 commented 2 years ago

Using a base zen-cart function is the way to go, but since that function's present in zc158 and later, I'd prefer to wait until such time that OPC is updated for zc158 and later.