Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Tour/Activity Reservations - Can I make it easier?

Tour/Activity Reservations - Can I make it easier?

Views: 3,434

Results 21 to 28 of 28
15 Jan 2014, 06:01
#21
mike_d_1 avatar

mike_d_1

New Zenner

Join Date:
Sep 2013
Location:
Honolulu, HI
Posts:
88
Plugin Contributions:
0

Tour/Activity Reservations - Can I make it easier?

OK, so I've went and defined $products_id as $listing->fields['products_id'] and the id appears to be firing the way I want it to.

Thank you guys so much for your continued support and do give me a shout if you come to Hawaii, I can help you plan your trip or at the very least give you cost on a dolphin swim or something.

15 Jan 2014, 13:42
#22
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Tour/Activity Reservations - Can I make it easier?

Mike D:

OK, so I've went and defined $products_id as $listing->fields['products_id'] and the id appears to be firing the way I want it to.

Thank you guys so much for your continued support and do give me a shout if you come to Hawaii, I can help you plan your trip or at the very least give you cost on a dolphin swim or something.

OK, so now you have it working, you can probably tidy the code up a little bit and get rid of the intermediate processing. :

$lc_price =  '<span class="price" id=price"'. $listing->fields['products_id'] . '">' . zen_get_products_display_price($listing->fields['products_id']) . '</span><br />';  

It will/should function just the same (as long as I haven't made a mistake), but it'll save a few nanoseconds of processing a few bytes of memory. :)

Cheers
RodG

15 Jan 2014, 21:41
#23
mike_d_1 avatar

mike_d_1

New Zenner

Join Date:
Sep 2013
Location:
Honolulu, HI
Posts:
88
Plugin Contributions:
0

Re: Tour/Activity Reservations - Can I make it easier?

Ooh yeah, don't want to squander any precious nanoseconds! Your recommended change works great, I just dropped the quotations so they wouldn't appear in the id.

Almost there! If I could just ask another question :)

I've tried to follow the guide at http://www.zen-cart.com/wiki/index.php/Customisation_-_Templates_-_Javascript to get a javascript to load for a specific page, but I'm either naming the file wrong or putting it in the wrong place. I'd like to target specific category pages so I can load the javascript file that changes the prices on those pages.

For one of my category pages (http://www.shakatourshonolulu.com/zencart/index.php?main_page=index&cPath=67) I've tried creating directories in includes/modules/pages (index_67, main_page_67, etc.) and renaming the file but I don't appear to be hitting the correct answer. What am I missing?

15 Jan 2014, 23:37
#24
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Tour/Activity Reservations - Can I make it easier?

All category/product listing pages are "index", no subtypes exist. You would need to change the file to jscript_whatever.php, and wrap a PHP test around the script so it only runs when those categories are displayed.
Something like```php

<?php if ($cPath == 5 or $cPath == 23 or $cPath == 7_52) { ?>

your javascript code

<?php } ?>
21 Jan 2014, 04:38
#25
mike_d_1 avatar

mike_d_1

New Zenner

Join Date:
Sep 2013
Location:
Honolulu, HI
Posts:
88
Plugin Contributions:
0

Re: Tour/Activity Reservations - Can I make it easier?

gjh42:

All category/product listing pages are "index", no subtypes exist. You would need to change the file to jscript_whatever.php, and wrap a PHP test around the script so it only runs when those categories are displayed.
Something like```php

<?php if ($cPath == 5 or $cPath == 23 or $cPath == 7_52) { ?>

your javascript code

<?php } ?>

I've been racking my brain the last four days trying to get this to work because I knew it should.  Then today I found an apostrophe missing in my tpl_main_page that was stopping my onload function from shooting and now I'm good to go.

Thanks for all the help, I really appreciate it!
02 Feb 2014, 02:53
#26
mike_d_1 avatar

mike_d_1

New Zenner

Join Date:
Sep 2013
Location:
Honolulu, HI
Posts:
88
Plugin Contributions:
0

Re: Tour/Activity Reservations - Can I make it easier?

Alright, so I'm up and running (thanks again!) with just a few minor issues that I should be able to tackle one by one as I go (Units showing on category pages, etc.) but there's one I might need to pay more attention to.

There's a 'comments' section on receipts that are emailed from our payment processor that lists the products purchased and a 'qty' in parentheses right next to it which, because I'm using the quantity to calculate the price, reflects the price and not the quantity. Is there a way to change that qty to something else through zen cart? Or should I be asking my processor?

02 Feb 2014, 20:04
#27
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Tour/Activity Reservations - Can I make it easier?

That depends on how the output is displayed. If it is your payment processor's file, you may need to have them alter it (if they will). If they supply information to you which Zen Cart files output, you can probably edit that yourself, though we would have to see the code in question to be able to advise. If you have any other payment methods, you might need to add code to distinguish the source before altering the output.

If the e-mails are sent by your payment processor, I would think it highly unlikely that they would or could alter their system for your particular situation.

03 Feb 2014, 09:34
#28
mike_d_1 avatar

mike_d_1

New Zenner

Join Date:
Sep 2013
Location:
Honolulu, HI
Posts:
88
Plugin Contributions:
0

Re: Tour/Activity Reservations - Can I make it easier?

gjh42:

If the e-mails are sent by your payment processor, I would think it highly unlikely that they would or could alter their system for your particular situation.

I may be able to live with it. The receipts are being sent to us right now so I guess I could always just forward them to the customer and just change the one part to not say "qty".

I just noticed that Google Analytics reflects the large quantities as well. Same deal there - better/easier to just live with it?