Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Reading contents of shopping cart and changing the shipping method display accordingl

Reading contents of shopping cart and changing the shipping method display accordingl

Locked

Started by lamajlooc on 14 May 2007, 8:58 AM · Views: 1,685

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
14 May 2007, 8:58 AM
#1
lamajlooc avatar

lamajlooc

New Zenner

Join Date:
May 2007
Posts:
17
Plugin Contributions:
0

Post #1 by lamajlooc

Hi,
I posted this last week and unfortunately I've not made much progress, nor have I received a satisfactory reply. Can anyone help? Thanks a million in advance


Hi. So here's my problem. I have a client that wants to change the text that freeshipper.php displays during the checkout process.

Here's the rub: They want the text to change depending on what items or group of items is ordered. So for example, if someone orders a DVD they want it to read, "Free UPS Ground Shipping!" but if someone orders a tea set they want it to read, "Free USPS Priority Mail!", etc.

I know where the language file is located and I know where to change the text, but to make it adaptable I have to do some database querying, which I also know how to do.

What I don't know is how ZC stores the contents of the basket being checked out. What I figure is that I'll have to read the contents of the basket (by product ID, I'm guessing) and then have different text printed depending on what's in the cart.

I know it's a dumb idea of theirs, but they're adamant and I'm stumped.

14 May 2007, 1:27 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #2 by ajeh

This would require quite a bit of customization ...

What if the order contains a DVD and another product?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

15 May 2007, 12:25 PM
#3
lamajlooc avatar

lamajlooc

New Zenner

Join Date:
May 2007
Posts:
17
Plugin Contributions:
0

Post #3 by lamajlooc

Thanks for responding.

They have two categories:

  1. samples
  2. non-samples

Orders with only samples are shipped USPS Priority Mail. Orders with non-samples are shipped UPS Ground. Mixed orders are shipped UPS Ground.

Am I right in assuming that ZC doesn't check categories on checkout/shopping cart, but only product id's?

Thanks again.

15 May 2007, 1:37 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #4 by ajeh

Do the Samples all use the same master_categories_id or have some other indicator or flag that they are samples?

By using a flag or field or something along that line you can test if the whole order is made up of "only samples" and if so, put a conditional statement on UPS not to show ... and if a mixed order, put a conditional statement on USPS to not show ...

This is not hard to do, you just need to think through the conditions to test the cart and validate it for you shipping methods similar to how the Free Shipping test is done on the shipping modules ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

16 May 2007, 11:03 AM
#5
lamajlooc avatar

lamajlooc

New Zenner

Join Date:
May 2007
Posts:
17
Plugin Contributions:
0

Post #5 by lamajlooc

Yeah. The guy who originally set up their ZC install put everything in one category, so I had the idea that I'd check the product names (all samples have "sample" in their name, so it's kind of like what you describe). I guess my problem is that I can't tell where ZC stores or how it references the shopping cart. Database? Cookie? Global variables?

If needed I'll reorganize their shop along the lines you suggest (they don't have that many products, so it's no biggy) but I guess my biggest challenge is figuring out HOW to check the order before it's finalized and placed in the DB.

This is my first big ZC project, but I've done a lot with SQL and server-side scripting languages in the past.

Thanks again for responding.