If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / Built-in Shipping and Payment Modules / Have pickup show store address not customers address

Have pickup show store address not customers address

Locked

Started by jchaters on 9 Aug 2006, 5:59 PM · Views: 6,378

Results 1 to 17 of 17
This thread is locked. New replies are disabled.
9 Aug 2006, 5:59 PM
#1
jchaters avatar

jchaters

New Zenner

Join Date:
Jul 2006
Posts:
15
Plugin Contributions:
0

Post #1 by jchaters

Hello I am using the pickup module as well as a shipping module. The problem is that when a client selects pickup I still recieva a ship to address on my order. Is there a way to have my store address, or the word PICKUP show in place of the shipping address? ThankYou in advance. Jim

10 Aug 2006, 7:38 AM
#2
drbyte avatar

drbyte

Sensei

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

Post #2 by drbyte

To show the "Store Pickup" notice on the order page under the shipping address in larger bold text, do this:

/admin/orders.php
line 321 contains:html <td class="main"><?php echo zen_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'); ?></td> replace it with:```html
<td class="main"><?php echo zen_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'); ?><?php echo ($order->info['shipping_module_code'] == 'flat') ? '<br /><h2>Store Pickup</h2>' : ''; ?></td>

.
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.

10 Aug 2006, 8:02 PM
#3
ajeh avatar

ajeh

Oba-san

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

Post #3 by ajeh

cough might make that 'flat' read 'storepickup' ... cough ... :smartass:

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!

10 Aug 2006, 9:13 PM
#4
jchaters avatar

jchaters

New Zenner

Join Date:
Jul 2006
Posts:
15
Plugin Contributions:
0

Post #4 by jchaters

Well now I am confused, what do you mean by flat?

11 Aug 2006, 12:09 AM
#5
jchaters avatar

jchaters

New Zenner

Join Date:
Jul 2006
Posts:
15
Plugin Contributions:
0

Post #5 by jchaters

Dr. Byte I did as you mentioned with no success. Do you know what "Flat" as in the next reply by Ajeh means? Am I in the wrong file? Thank You for all your help

11 Aug 2006, 12:47 AM
#6
jchaters avatar

jchaters

New Zenner

Join Date:
Jul 2006
Posts:
15
Plugin Contributions:
0

Post #6 by jchaters

Thank you all for your help, I got it to work, not sure how but it works. Thank You

11 Aug 2006, 12:51 AM
#7
jchaters avatar

jchaters

New Zenner

Join Date:
Jul 2006
Posts:
15
Plugin Contributions:
0

Post #7 by jchaters

Would it be possable to have store pickup show on the invoice and packing slip? Thanks Jim

11 Aug 2006, 3:52 AM
#8
ajeh avatar

ajeh

Oba-san

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

Post #8 by ajeh

The flat was referred to in:
$order->info['shipping_module_code'] == 'flat'

You mentioned you wanted this for 'storepickup'

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!

11 Aug 2006, 9:50 AM
#9
drbyte avatar

drbyte

Sensei

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

Post #9 by drbyte

Ajeh is so much smarter than I.... yes ... I had put 'flat' in there for testing when I meant 'storepickup'

To do it on the invoice and packing slip, you would do the same thing underneath the desired address display in the 2 files driving it:
/admin/invoice.php
/admin/packingslip.php

.
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.

11 Aug 2006, 9:35 PM
#10
ajeh avatar

ajeh

Oba-san

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

Post #10 by ajeh

/me makes such a good syntax checker ... :smartass:

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!

1 Aug 2007, 4:20 AM
#11
japanophyle avatar

japanophyle

New Zenner

Join Date:
Apr 2005
Location:
Minnesota
Posts:
67
Plugin Contributions:
0

Post #11 by japanophyle

I am hoping to do the same thing with the emails that are generated and sent to customer and admin. I would like some indication of storepickup there, of the contents of the define MODULE_SHIPPING_STOREPICKUP_TEXT_TITLE be printed under Delivery Address in these emails.

I have tried to find where these emails are formatted, but my php is minimal and I am wandering around blindly. any help is appreciated.

:blush:

Carly
Sambu Kyuguten
https://www.sambu-kyugu.com

29 Aug 2007, 11:00 AM
#12
joshlfisher avatar

joshlfisher

New Zenner

Join Date:
Jul 2006
Posts:
93
Plugin Contributions:
0

Post #12 by joshlfisher

In the root of your Zen-Cart install, there is a folder called 'email'. Inside this folder are some HTML files that serve as the email templates. Edit these to edit your emails.

30 Aug 2007, 2:59 PM
#13
fwed avatar

fwed

New Zenner

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

Post #13 by fwed

joshlfisher:

In the root of your Zen-Cart install, there is a folder called 'email'. Inside this folder are some HTML files that serve as the email templates. Edit these to edit your emails.

I have succeeded in adding the store pickup info in the Admin/Invoice/Packing slip :clap: !

I am now trying to edit the order conformation email. in /email/email_template_checkout.html, i have replaced (line 76) :

 
<td class="address">$ADDRESS_DELIVERY_DETAIL</td>

by :

 
<td class="address">
 <?php
if ($SHIPPING_MODULE_CODE == 'storepickup') { 
 $SHIPPING_METHOD_DETAIL;
} 
else {
 $ADDRESS_DELIVERY_DETAIL;
}
?> 
 </td>

but obvisously it is not working (I'm a newbie in php, and I suppose that php does not get along with email ...).

Furthermore, I have also tried to edit the order confirmation page (step 3 of customer checkout).
in \template_default\templates\tpl_checkout_confirmation_default.php,
after (line 70) :

<address><?php echo zen_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br />'); ?></address>

I have added :

 
<?php if ($order->info['shipping_module_code'] == 'storepickup') { ?>
<strong><font color=green><?php echo $order->info['shipping_method']; ?></strong></font>
<?php } ?>

but, with no success. I am desperate, and don't know how to handle this. Could please anyone help ?

Fred

3 Sep 2007, 6:41 PM
#14
bazzxr avatar

bazzxr

New Zenner

Join Date:
Aug 2007
Posts:
10
Plugin Contributions:
0

Post #14 by bazzxr

I would also like to display "store pickup" as the delivery address in both the invoice and packing slip, is it possible for zencart to automatically insert this data as delivery address if a customer selects store pickup? at present it displays the customers normal delivery details!

5 Sep 2007, 1:55 AM
#15
japanophyle avatar

japanophyle

New Zenner

Join Date:
Apr 2005
Location:
Minnesota
Posts:
67
Plugin Contributions:
0

Post #15 by japanophyle

joshlfisher:

In the root of your Zen-Cart install, there is a folder called 'email'. Inside this folder are some HTML files that serve as the email templates. Edit these to edit your emails.

What if you use plain text emails? Does editing these files format those as well?

Carly
Sambu Kyuguten
https://www.sambu-kyugu.com

22 Aug 2008, 12:09 PM
#16
hangman avatar

hangman

New Zenner

Join Date:
Jul 2008
Posts:
2
Plugin Contributions:
0

Post #16 by hangman

Old topic I know, but I found it whilst I was looking to do something similar.

You don't want to edit the template, you want to edit: includes/classes/order.php

Something like:

if($this->info['shipping_module_code'] == 'storepickup_storepickup') {
    $html_msg['ADDRESS_DELIVERY_TITLE']     = EMAIL_TEXT_PICKUP_ADDRESS;
    $html_msg['ADDRESS_DELIVERY_DETAIL']    = nl2br(STORE_NAME_ADDRESS);
} else {
    $html_msg['ADDRESS_DELIVERY_TITLE']     = EMAIL_TEXT_DELIVERY_ADDRESS;
    $html_msg['ADDRESS_DELIVERY_DETAIL']    = ($this->content_type != 'virtual') ? zen_address_label($_SESSION['customer_id'], $_SESSION['sendto'], true, '', "<br />") : 'n/a';
}

EMAIL_TEXT_PICKUP_ADDRESS doesn't exist so you would need to add that to your language files as well. This way instead of delivery address - customers address, you get pickup address - store address.

For text emails you would need to change just below:

if($this->info['shipping_module_code'] == 'storepickup_storepickup')
      $email_order .= "\n" . EMAIL_TEXT_PICKUP_ADDRESS . "\n" .
      EMAIL_SEPARATOR . "\n" .
      STORE_NAME_ADDRESS . "\n";
else
      $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" .
      EMAIL_SEPARATOR . "\n" .
      zen_address_label($_SESSION['customer_id'], $_SESSION['sendto'], 0, '', "\n") . "\n";

In both cases search for and replace the "else" code.

includes/languages/english/checkout_process.php:

define('EMAIL_TEXT_PICKUP_ADDRESS', 'Pickup Address');
22 Aug 2008, 12:38 PM
#17
hangman avatar

hangman

New Zenner

Join Date:
Jul 2008
Posts:
2
Plugin Contributions:
0

Post #17 by hangman

For admin/orders.php,packingslip.php,invoice.php you would want something like:

<?php echo ($order->info['shipping_module_code'] == 'storepickup') ? '<strong>Store Pickup</strong>' : zen_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>'); ?>

Instead of:

<?php echo zen_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>'); ?>

Basically the same as first suggested, but replacing the address.

For includes/templates/your_template/templates/tpl_checkout_confirmation_default.php (copy over from default if it doesn't exist):

<?php echo ($order->info['shipping_module_code'] == 'storepickup_storepickup') ? ' ' : zen_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br />'); ?>

Same as above, just used a space since you don't need Store Pickup, then: shiping method: store pickup.

So with the above changes, you get:
Store Pickup/store address in emails instead of shipping address.
"Store Pickup" instead of an address in admin invoices/orders/packing slips.
Just the shipping method under "Delivery/Shipping Information" in checkout confirmation.