Zen Cart Logo

DUAL Pricing v2

Views: 363,327

Results 361 to 380 of 1,504
11 Nov 2008, 3:47 AM
#361
ewodzien avatar

ewodzien

New Zenner

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

DUAL Pricing v2

Hi There:

Thanks a million for this contribution... what a lifesaver.

I was wondering if you can tell me what I might be doing wrong. For some reason, I cannot seem to get the text to change depending on if the person logged in has a wholesale account or not.

I would like it to read "WholeSale Price" or "Retail Price" as it should be doing, but no matter what I do, it always reads Retail Price. I took a look at the code in tpl_product_info_display.php in the templates directory and it should work, but doesn't.

Here is the code from my template file:

//*********************************************************************************
//***Properly display price labeling when set to Whole sale and when not
//*********************************************************************************
if ($_SESSION['customers_whole'] && $_SESSION['customers_whole'] != '0' ) {
  echo  '<span id="whole">WholeSale Price: ';
  } else {
  echo '<span id="retail">Retail Price: ';
  } 
  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']);
  echo '</span>';
//*********************************************************************************
//***END Properly display price labeling when set to Whole sale and when not
//*********************************************************************************

I checked my database and there is an entry for "customers_whole" in the zen_customers table. Originally the file was marked "customer_whole", note the lack of the 's'. So I made the modification here. But it still doesn't work. Perhaps I don't understand how the $SESSION widget works to troubleshoot further.

Can you point me in a place to check?

Thanks,

Ed

11 Nov 2008, 7:00 AM
#362
madfastride avatar

madfastride

Zen Follower

Join Date:
Feb 2007
Location:
Earth
Posts:
115
Plugin Contributions:
0

Re: DUAL Pricing v2

ewodzien:

I checked my database and there is an entry for "customers_whole" in the zen_customers table. Originally the file was marked "customer_whole", note the lack of the 's'. So I made the modification here. But it still doesn't work. Perhaps I don't understand how the $SESSION widget works to troubleshoot further.

Ed, the table in the DB should be names "customers_whole" and the $_SESSION should be named "customer_whole" without the "s." This is just the difference in naming conventions Zen-Cart likes to keep plural table names so I stick to that for the DB. But in my writing it doesn't help me to stick to a plural $_SESSION name when I'm only referring to one customer. All right enough explanation there, but all in all the module will never work with the table named "customer_whole" change it back to "customers_whole."
Is the price changing according to the customer's login level? I'd check the includes/modules/pages/login/header_php.php file and see if it's uploaded correctly or properly saved. Next I'd log out of Zen Cart make sure your test customer is set to a whole sale level and then log back in and retest. Let me know if this helps.

Cheers,

11 Nov 2008, 11:28 PM
#363
ewodzien avatar

ewodzien

New Zenner

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

Re: DUAL Pricing v2

Thanks for your help.. you pointed me in the right direction and I was able to get it fixed!

I actually had two issues going on..

The first was that I somehow missed the file you mentioned to look at, header_php, I didn't update that file with your changes.

So, I did that, but when I did, I can into problem #2, which was I missed the database statement

$_SESSION['customer_whole'] = $check_customer->fields['customers_whole'];

in the file which loaded the test variable into the SESSION array.

The reason I missed it was because I am running on v1.37 and have the master password contribution installed, so the changes were not easy to spot.

Luckily with your help, I was able to zone in on the file causing the issue.

So.. THANK YOU!!! I'm all fixed up now.

-Ed

madfastride:

Ed, the table in the DB should be names "customers_whole" and the $_SESSION should be named "customer_whole" without the "s." This is just the difference in naming conventions Zen-Cart likes to keep plural table names so I stick to that for the DB. But in my writing it doesn't help me to stick to a plural $_SESSION name when I'm only referring to one customer. All right enough explanation there, but all in all the module will never work with the table named "customer_whole" change it back to "customers_whole."
Is the price changing according to the customer's login level? I'd check the includes/modules/pages/login/header_php.php file and see if it's uploaded correctly or properly saved. Next I'd log out of Zen Cart make sure your test customer is set to a whole sale level and then log back in and retest. Let me know if this helps.

Cheers,

16 Nov 2008, 4:42 PM
#364
yonghs avatar

yonghs

New Zenner

Join Date:
Jun 2008
Posts:
62
Plugin Contributions:
1

Re: DUAL Pricing v2

Just installed DP1.5 to Zen Cart 1.3.8a.

I tested by setting a customer wholesale level to 1 and set a few products product to have only one wholesale price level.

When I log in as the wholesale customer, I have a couple of problems:

  1. All prices shown on the front page and product info page are RETAIL price.

Only if I add the item to shopping cart, then the price in the shopping cart page will show wholesale price.

  1. If a product has discount(specials) for retail price AND wholesale price... the product added to shopping cart will follow the discounted RETAIL price, not the wholesale price.

Any ideas/suggestions what I did wrong?

17 Nov 2008, 5:20 AM
#365
madfastride avatar

madfastride

Zen Follower

Join Date:
Feb 2007
Location:
Earth
Posts:
115
Plugin Contributions:
0

Re: DUAL Pricing v2

yonghs:

  1. All prices shown on the front page and product info page are RETAIL price.

You should log out, and log back in. The new release uses session and the cart won't work properly without them. If that doesn't work read a few posts back and check the login/header_php.php file, make sure it's uploaded.

yonghs:

  1. If a product has discount(specials) for retail price AND wholesale price... the product added to shopping cart will follow the discounted RETAIL price, not the wholesale price.

I don't understand this. Can you explain more. I don't remember a way to add specials to the WS price. If the discount is below the WS price the special will show for WS customers, if it's above the WS price then it's shopping as usual.

24 Nov 2008, 2:22 AM
#366
ted_heople avatar

ted_heople

New Zenner

Join Date:
Nov 2008
Posts:
8
Plugin Contributions:
0

Re: DUAL Pricing v2

what had you done wrong? I don't have the wholesale box under the email address.

bluealice:

I installed the module, everything is in the right place, installed the SQL patches,
but i don't see the following (mentioned in the Read Me file):

Pick a customer and edit them.

You will see a new text box under the email address box.

I don't have this (a box under the email address.)

Any ideas what I've done wrong?

Was I supposed to install the earlier versions first and then add V.2?

PS: I'm not using group pricing.

24 Nov 2008, 3:25 AM
#367
ted_heople avatar

ted_heople

New Zenner

Join Date:
Nov 2008
Posts:
8
Plugin Contributions:
0

Re: DUAL Pricing v2

Not for lack of trying, I cannot make the wholesale price box show up in my admin/products. I can indicate customers as wholesale, but nothing in the products. I found similar posts, but everyone seems to figure it out on their own.

I have read every post in this whole thread which made for a crappy sunday, but I have exhausted myself. I have uninstalled and re-installed. So please pardon my stupidity - I need help.

Zen Cart 1.3.8a
DP 1.5

24 Nov 2008, 6:08 PM
#368
madfastride avatar

madfastride

Zen Follower

Join Date:
Feb 2007
Location:
Earth
Posts:
115
Plugin Contributions:
0

Re: DUAL Pricing v2

Ted_Heople:

Not for lack of trying, I cannot make the wholesale price box show up in my admin/products. I can indicate customers as wholesale, but nothing in the products. I found similar posts, but everyone seems to figure it out on their own.

I have read every post in this whole thread which made for a crappy sunday, but I have exhausted myself. I have uninstalled and re-installed. So please pardon my stupidity - I need help.

Zen Cart 1.3.8a
DP 1.5

It should be at the bottom of the light blue box. The field is labeled "Wholesale Price (Net)" It is controlled by "admin/includes/modules/products/colect_info.php" Make sure that the correct version of this file is uploaded.

24 Nov 2008, 11:01 PM
#369
ted_heople avatar

ted_heople

New Zenner

Join Date:
Nov 2008
Posts:
8
Plugin Contributions:
0

Re: DUAL Pricing v2

Thanks so much for that. The file in question was there and I had re-installed it a couple times. In retrospect I think that it may have been a corruption issue. The downloaded files including the text files were crashing me. So a corrupt download was probably the problem. I deleted the first download and re-downloaded it, re-copied the files over and what-do-you-know! Working!

4 Dec 2008, 3:33 PM
#370
yairoz avatar

yairoz

New Zenner

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

Re: DUAL Pricing v2

Hi there

I installed the latest version of Dual Pricing on zencart 1.38 and it works great besides one thing:
I can't make the attributes work!

I'm not using "Pricing By Attributes" (that means that the product's price doesn't matter - all the prices come from the attributes). Instead I do have a main price for the product and when the product has attributes the price is being adjusted to the right price (like +1.50$ or something like that).

I couldn't figure out how to make it work. Where and how do I put the wholesale price for attributes? at the attributes controller? I tried using commas(,) and dashes (-) but nothing works, it doesn't even save more than one price....

Did somebody got it work good with the attributes?

Thanks for this great module and i'll appreciate any help I can get.

Thanks

22 Dec 2008, 6:16 AM
#371
eist1 avatar

eist1

New Zenner

Join Date:
Sep 2006
Posts:
14
Plugin Contributions:
0

Re: DUAL Pricing v2

I have the Dual Pricing addon working fine, except I was wondering how to get rid of the "Starting at:" After the Retail Price: and Wholesale Price:? My Product Info page looks like this.

Retail Price: Starting at: $299.99
Wholesale Price: Starting at: $299.99

I went in and blanked out the Starting at: in the english.php file

define('TEXT_BASE_PRICE','Starting at: ');

So it does show up correctly, but was wondering how to fix the tpl_product_info_display.php file to get rid of the 'TEXT_BASE_PRICE' in the pricing. Please let me know. Thanks

22 Dec 2008, 7:17 PM
#372
doodlebuckets avatar

doodlebuckets

Totally Zenned

Join Date:
Jul 2005
Posts:
497
Plugin Contributions:
0

Re: DUAL Pricing v2

So if I am going to use Easy Populate to upload all my wholesale prices, what variable do I use in the header row? Ie, v_xxxx_xxxx

Thanks!

22 Dec 2008, 8:56 PM
#373
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: DUAL Pricing v2

What I like to do is create one product manually -- in this case, do the manual setup of the two prices -- then I download the data using EP and see what I got. This makes it foolproof (except that fools are getting better) to add your data into the right column.

Rob

23 Dec 2008, 3:37 PM
#374
madfastride avatar

madfastride

Zen Follower

Join Date:
Feb 2007
Location:
Earth
Posts:
115
Plugin Contributions:
0

Re: DUAL Pricing v2

eist1:

So it does show up correctly, but was wondering how to fix the tpl_product_info_display.php file to get rid of the 'TEXT_BASE_PRICE' in the pricing. Please let me know. Thanks

You don't need to modify any files. Go to Admin > Catalog > Product Types, The layout you probably want to change is "Product - General" go to edit layout and change "Show Starting At text on Price" to "0". That will remove it.

23 Dec 2008, 3:41 PM
#375
madfastride avatar

madfastride

Zen Follower

Join Date:
Feb 2007
Location:
Earth
Posts:
115
Plugin Contributions:
0

Re: DUAL Pricing v2

YairOz:

I installed the latest version of Dual Pricing on zencart 1.38 and it works great besides one thing:
I can't make the attributes work!

YairOz, sorry but I can't really help. I just rolled all the Attribute functions over, I really don't like this aspect of ZC and do everything I can to avoid it. So I'm not to familiar with what's going on there.

The one thing I've noticed supporting this though is that 95% of functionality problems is do to FTP transfers not working properly. Double and triple check all your files.

2 Jan 2009, 11:13 PM
#376
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,769
Plugin Contributions:
20

Re: DUAL Pricing v2

hy everyone!

i can't seem to find the answer in previous posts so...

how do i set up my site so that all customers after registration automatically get Wholesale pricing level 1?

BTW, great mod, saved me... BIG thanx to the author!

3 Jan 2009, 1:40 AM
#377
madfastride avatar

madfastride

Zen Follower

Join Date:
Feb 2007
Location:
Earth
Posts:
115
Plugin Contributions:
0

Re: DUAL Pricing v2

balihr:

how do i set up my site so that all customers after registration automatically get Wholesale pricing level 1?

The easiest way I can think to set that up would be to change the default entry in the MySQL data base, that way a customer will receive Pricing level 1 automatically.

*** Backup your database!!!! ***
**
Use this line to delete the current SQL formatting:**
ALTER TABLE customers DROP customers_whole ;
**
Use this to re-insert the column with the new setting:**
ALTER TABLE products ADD products_price_w VARCHAR( 150 ) DEFAULT '1' AFTER products_price;

3 Jan 2009, 9:53 AM
#378
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,769
Plugin Contributions:
20

Re: DUAL Pricing v2

it doesn't work. I get an error trying to log in. Unfortunately, i wasn't thinking because i had 17 customers online when it crashed and restored my db before i got to copy the error message... :frusty:

anyway, there was something like an error in db field regarding customers. SORRY... :blush:

any other ideas, maybe?

4 Jan 2009, 6:19 AM
#379
madfastride avatar

madfastride

Zen Follower

Join Date:
Feb 2007
Location:
Earth
Posts:
115
Plugin Contributions:
0

Re: DUAL Pricing v2

balihr:

it doesn't work. I get an error trying to log in. Unfortunately, i wasn't thinking because i had 17 customers online when it crashed and restored my db before i got to copy the error message... :frusty:

anyway, there was something like an error in db field regarding customers. SORRY... :blush:

any other ideas, maybe?

Okay, should have worked... I tested it on a cart but no big deal... Remember it's always best to have a development cart as a backup... That way your site doesn't go down like that. Try modifying your includes/modules/create_account.php file on lines 256-257 Add a new line so it looks like this:

        
'customers_authorization' => (int)CUSTOMERS_APPROVAL_AUTHORIZATION,
                            'customers_whole' => 1
    );

This will automatically add the value into the DB upon account creation... Go back and manually update all your customers.

4 Jan 2009, 11:57 AM
#380
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,769
Plugin Contributions:
20

Re: DUAL Pricing v2

I know i should have a development cart and i used to have one, but... I accidentally erased it from my server and didn't have the time to set it up again.

Anyway, this code still doesn't work. i did what you said and registered myself as a new user, but in admin i have Wholesale = 0. I still have to set it manually to 1.

Maybe there's a problem with using a template? I'm using gloss_black.

I you want to check for yourself, the site is www.bali.hr