Forums / Built-in Shipping and Payment Modules / Remove price, add to cart text and units

Remove price, add to cart text and units

Views: 3,715

Results 1 to 19 of 19
8 May 2012, 7:47 PM
#1
karishon avatar

karishon

New Zenner

Join Date:
May 2012
Posts:
9
Plugin Contributions:
0

Remove price, add to cart text and units

HELP !

Tried to find a post with an answer to my problem and no success.

I'm trying to remove the price next to this item, change the add to cart text to something else and remove the units: 0.01

What im trying to to is to have my customers pay their invoice on this site i created. I priced the Item for 1$ and I would like them to put the any amount and make a payment.
Everything on the product general option page is set to 0.

https://baradinc.com/payment/index.php?main_page=product_info&cPath=1&products_id=3

Help will be very much appreciated.

Thanks

9 May 2012, 8:52 AM
#2
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Remove price, add to cart text and units

You are trying to get zencart to perform a function for which it is not designed to do. Why don't you just use proper accounting software? I am sure there must be OpenSource programs out there that will generate invoices, allow online payment, and write the result to a database that is configured to manage accounts.

Zencart MIGHT be made to work this way, but it would require quite a bit of custom coding.

9 May 2012, 4:05 PM
#3
ajeh avatar

ajeh

Oba-san

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

Re: Remove price, add to cart text and units

You could customize the function:
/includes/functions/functions_prices.php

around line 394 with the code in RED:

////
// Return a products quantity minimum and units display
  function zen_get_products_quantity_min_units_display($product_id, $include_break = true, $shopping_cart_msg = false) {
// bof: do not show for products_id 3
    if ($product_id == 3) {
      return '';
    }
// eof: do not show for products_id 3
    $check_min = zen_get_products_quantity_order_min($product_id);

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!

9 May 2012, 7:12 PM
#4
karishon avatar

karishon

New Zenner

Join Date:
May 2012
Posts:
9
Plugin Contributions:
0

Re: Remove price, add to cart text and units

Tried that, no change.

////
// Return a products quantity minimum and units display
function zen_get_products_quantity_min_units_display($product_id, $include_break = true, $shopping_cart_msg = false) {
// bof: do not show for products_id 3
if ($product_id == 3) {
return '';
}
// eof: do not show for products_id 3
$check_min = zen_get_products_quantity_order_min($product_id);
$check_units = zen_get_products_quantity_order_units($product_id);

9 May 2012, 10:45 PM
#5
ajeh avatar

ajeh

Oba-san

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

Re: Remove price, add to cart text and units

Sorry, thought you meant remove the minimum/units from this product ...

You would need to customize your templates and overrides file for:
/includes/templates/your_template_dir/templates/tpl_product_info_display.php

and customize it to not show the price by surrounding this code:

<!--bof Product Price block -->
<h2 id="productPrices" class="productGeneral">
<?php
// base price
  if ($show_onetime_charges_description == 'true') {
    $one_time = '<span >' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br />';
  } else {
    $one_time = '';
  }
  echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']);
?></h2>
<!--eof Product Price block -->

with a similar IF ... something like:

if ((int)$_GET['products_id'] !== 3) {
 // do not show code here
} else {
  // code here
}

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!

9 May 2012, 11:34 PM
#6
karishon avatar

karishon

New Zenner

Join Date:
May 2012
Posts:
9
Plugin Contributions:
0

Re: Remove price, add to cart text and units

Ajeh,
I owe you 2 cups of coffee. Unit is not shown and also got rid of the price next to the item on the info page.
I can still see the price on this page https://baradinc.com/payment/ any way I can get rid of it there ? and 1 more question, how can I change the add to cart text next to the check out button ?
where do I change the default amount to not display in the add to cart window (now showing 0.01).

Im so zanned

You Zenned me big time with your codes.

Thanks AGAIN

10 May 2012, 2:00 AM
#7
ajeh avatar

ajeh

Oba-san

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

Re: Remove price, add to cart text and units

I do not know what that page is or how it is generating the price on there ...

That looks like the New Product centerbox ...

Do you not have other Products on your site?

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 May 2012, 3:33 AM
#8
karishon avatar

karishon

New Zenner

Join Date:
May 2012
Posts:
9
Plugin Contributions:
0

Re: Remove price, add to cart text and units

You got it right, it came from centerbox which I got rid of - that makes it 3 cups of coffee now that I owe you.
Almost done and if you don't mind have 2 more little questions.

  1. Is it possible to get rid of the add to cart text and box on this page : https://baradinc.com/payment/index.php?main_page=product_info&cPath=1&products_id=3
  2. Is it possible to get rid of the total items text on this page and also change the table headers - qty. and get rid of the word unit. https://baradinc.com/payment/index.php?main_page=shopping_cart

Thanks again,
Zanning is fun

11 May 2012, 12:52 PM
#9
ajeh avatar

ajeh

Oba-san

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

Re: Remove price, add to cart text and units

Is this the only Product you will ever have or is this something you need done just for this products_id 3 ... :unsure:

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 May 2012, 3:24 PM
#10
karishon avatar

karishon

New Zenner

Join Date:
May 2012
Posts:
9
Plugin Contributions:
0

Re: Remove price, add to cart text and units

Just this product Ajeh

11 May 2012, 3:42 PM
#11
ajeh avatar

ajeh

Oba-san

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

Re: Remove price, add to cart text and units

To change the Add to Cart: to something else, using your templates and overrides you change the language file:
/includes/languages/english.php

and set the:

define('PRODUCTS_ORDER_QTY_TEXT','Add to Cart: ');

to read something else ...

To change the shopping_cart display ... you would again use your templates and overrides to customize the file:
/includes/templates/templates_default/templates/tpl_shopping_cart_default.php

and change the parts you do not wish to see ...

To change the checkout_confirmation ... you would again use your templates and overrides to customize the file:
/includes/templates/templates_default/templates/tpl_checkout_confirmation_default.php

and change the things you do not want to see ...

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!

12 May 2012, 4:50 AM
#12
karishon avatar

karishon

New Zenner

Join Date:
May 2012
Posts:
9
Plugin Contributions:
0

Re: Remove price, add to cart text and units

Got rid of the add to card text , but I can't figure out HOW to change the table headings on the shopping cart page https://baradinc.com/payment/index.php?main_page=shopping_cart. I would like to change the word "Qty." with "Amount" and remove the unit from the table.

If you can guide me with the line or the possible code. Once this is done, I will be good to go.

Thanks a have a great weekend.

your help is Zenormous.

Karish

12 May 2012, 12:35 PM
#13
ajeh avatar

ajeh

Oba-san

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

Re: Remove price, add to cart text and units

Qty. would be in the language file for:
/includes/languages/english/shopping_cart.php

Change the define statements as you need them using your templates and overrides ...

Change the define for Unit to just be blank with two '' for it ...

To remove the number of Units, using your templates and overrides on the file:
/includes/templates/your_template_dir/templates/tpl_shopping_cart_default.php

Change the line:

       <td class="cartUnitDisplay"><?php echo $product['productsPriceEach']; ?></td>

to read:

       <td class="cartUnitDisplay"><?php // echo $product['productsPriceEach']; ?></td>

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!

12 May 2012, 5:07 PM
#14
karishon avatar

karishon

New Zenner

Join Date:
May 2012
Posts:
9
Plugin Contributions:
0

Re: Remove price, add to cart text and units

Almost there...
https://baradinc.com/payment/index.php?main_page=shopping_cart
I got rid of "unit" but for some reason I can't change "Qty." to something else.

define('NAVBAR_TITLE', 'Make a payment');
define('HEADING_TITLE', '');
define('HEADING_TITLE_EMPTY', 'Your Shopping Cart');
define('TEXT_INFORMATION', 'Please enter the dollar amount in the qty box and and click on the red refresh button.');
define('TABLE_HEADING_REMOVE', 'Remove');
define('TABLE_HEADING_QUANTITY', 'Qty.');
define('TABLE_HEADING_MODEL', 'Model');
define('TABLE_HEADING_PRICE','');
define('TEXT_CART_EMPTY', 'Baradinc.com');
define('SUB_TITLE_SUB_TOTAL', 'Sub-Total:');
define('SUB_TITLE_TOTAL', 'Total:');

How can make the qty (1) and the amount (1$) on top of the table go away ?

Thanks for all your help,

Karish

12 May 2012, 5:29 PM
#15
ajeh avatar

ajeh

Oba-san

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

Re: Remove price, add to cart text and units

Did you try changing:

define('TABLE_HEADING_QUANTITY', 'Qty.');

to read:

define('TABLE_HEADING_QUANTITY', 'Amount');

To turn off the headings go to Configuration ... Layout Settings ...

Shopping Cart - Show Totals
Show Totals Above Shopping Cart?
0= off
1= on: Items Weight Amount
2= on: Items Weight Amount, but no weight when 0
3= on: Items Amount

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!

12 May 2012, 8:25 PM
#16
karishon avatar

karishon

New Zenner

Join Date:
May 2012
Posts:
9
Plugin Contributions:
0

Re: Remove price, add to cart text and units

Yes Master Ajeh, I did change it earlier but it didn't change. See below
It's still showing Qty. (That Is strange since removing "unit" worked fine).

This is what I have now

define('NAVBAR_TITLE', 'Make a payment');
define('HEADING_TITLE', '');
define('HEADING_TITLE_EMPTY', 'Your Shopping Cart');
define('TEXT_INFORMATION', 'Please enter the dollar amount in the qty box and and click on the red refresh button.');
define('TABLE_HEADING_REMOVE', 'Remove');
define('TABLE_HEADING_QUANTITY', 'Amount');
define('TABLE_HEADING_MODEL', 'Model');
define('TABLE_HEADING_PRICE','');
define('TEXT_CART_EMPTY', 'Baradinc.com');
define('SUB_TITLE_SUB_TOTAL', 'Sub-Total:');
define('SUB_TITLE_TOTAL', 'Total:');

Thanks

Karish
Site looks Zen times better now

12 May 2012, 10:46 PM
#17
ajeh avatar

ajeh

Oba-san

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

Re: Remove price, add to cart text and units

Looking at your site, it looks fixed on the shopping_cart ...

Now if you want it fixed on the checkout_confirmation, look in the language file for that page and use your templates and overrides to change it ...

This should be in the file:
/includes/languages/english/english.php

and you need that in your templates and overrides file for:
/includes/languages/english/your_template_dir/english.php

and change the define for:

  define('TABLE_HEADING_QUANTITY', 'Qty.');

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!

13 May 2012, 1:37 AM
#18
karishon avatar

karishon

New Zenner

Join Date:
May 2012
Posts:
9
Plugin Contributions:
0

Re: Remove price, add to cart text and units

Done !

I just wish I used this great forum earlier.

Thanks again for all your help Ajeh.

got Zenned !

Karish

13 May 2012, 2:29 AM
#19
ajeh avatar

ajeh

Oba-san

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

Re: Remove price, add to cart text and units

Thanks for the update that all is now working for you ... :smile:

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!