Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / "Call for shipping price" question

"Call for shipping price" question

Locked

Views: 2,668

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
15 Oct 2007, 2:46 PM
#1
lotii10396 avatar

lotii10396

New Zenner

Join Date:
Sep 2007
Posts:
48
Plugin Contributions:
0

"Call for shipping price" question

In simplest terms I am setting up a shop where some products [A] are small (shipping easy to calculate) AND other products [B] are large/heavy (where automated shipping calculation is impossible - believe me:lookaroun). So what I need is when a customer adds ANY [B] product in their cart, the automatic shipping module (in my case Auspost) DOES NOT show and an option to "Contact for Price" is displayed. The way I have done the "contact for price" function is to use the maximum weight flag in the FREEOPTIONS module to 1000 and then set each [B] product to 1000 (modified the text of course). My dilemma is that this works perfectly for mixed orders [A + B] UNTIL you start modifying and deleting/adding products from the cart - even though the "new" total weight is now below or above the threshold (and is calculating and displaying properly) the shipping module filtering is no longer correct. I tried adding some if statements to the php code (I'm knowledgeable enough to do this) ie in freeoptions module
if (MODULE_SHIPPING_AUSTPOST_STATUS == 'True') { $this->enabled = false; }

and vice-versa, but I can't get a consistent shipping display under these "modified" shopping cart examples. It is almost like these module true/falsevariables are being cached/set at the first checkout display therefore corrupting subsequent returns to the code.........so does anyone:

  1. have a different working solution for this shipping problem?
  2. have any thoughts as to where I should start digging?

Ta.

1 Nov 2007, 3:04 PM
#2
lotii10396 avatar

lotii10396

New Zenner

Join Date:
Sep 2007
Posts:
48
Plugin Contributions:
0

Re: "Call for shipping price" question

I must admit I'm kinda surprised/disappointed that no-one on the forum seems to have any technical understanding of how these variables are being set/read. The forum was one of the main reasons I chose Zen Cart so that I hopefully wouldn't need to go through the code myself....sigh:no::

Oh well, it doesn't look that complicated, just reverse engineering the paths and error-checking changes is the time-consuming part.

Hopefully I've maybe just posted this question in the wrong section.....

4 Nov 2007, 7:21 AM
#3
lotii10396 avatar

lotii10396

New Zenner

Join Date:
Sep 2007
Posts:
48
Plugin Contributions:
0

Re: "Call for shipping price" question

OK - it looks like the content for the shopping cart checkout module HTML is set the first time (into an array) the checkout code processes, subsequently it **IS NOT **being properly reset by the total cart weight option when products are then added or deleted. Bit of a missed error check I would have thought.

So what I have done is when the code loops through the array I then additionally compare the module title (the text variables) with the cart weight (which does correctly update) and then choose whether to display modules based on this.

This seems to work OK - however there are obviously other error checks required if I were to NOT use these specific modules. But I can't see any obvious flaws with this mod because:

  • I know the variables I'm comparing are there
  • I know that the modules are active

Any one got any thoughts on other issues that I need to check?