Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.

DUAL Pricing v2

Started by chrome_orange on 12 May 2006, 7:03 PM · Views: 364,184

Results 181 to 200 of 1,504
12 Mar 2008, 4:18 AM
#181
madfastride avatar

madfastride

Zen Follower

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

Post #181 by madfastride

Can someone lead me in the right direction or link that shows how I can have an area for each?

The mod is located at
http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=166

Consult this forum for any snags in the install.

Template Cascade: A Zen Cart Design Blog

Discussing Zen Cart design, Modules and functionality...

2 Apr 2008, 2:39 PM
#182
adoy avatar

adoy

New Zenner

Join Date:
Feb 2008
Posts:
45
Plugin Contributions:
0

Post #182 by adoy

hello! need help!

dual pricing mod works for me. i've edited customer set to level 2 and added 2 levels for wholesale pricing by attributes: 30,25

the prices is correctly displayed in product info: 25 but it displays 30 in shopping cart. my /includes/classes/shopping_cart.php was already modified before dual pricing was installed.

anyone can help me what are the specific files and/or lines edited just like how COWOA being installed. thankz a lot!

2 Apr 2008, 3:28 PM
#183
adoy avatar

adoy

New Zenner

Join Date:
Feb 2008
Posts:
45
Plugin Contributions:
0

Post #183 by adoy

adoy:

hello! need help!

dual pricing mod works for me. i've edited customer set to level 2 and added 2 levels for wholesale pricing by attributes: 30,25

the prices is correctly displayed in product info: 25 but it displays 30 in shopping cart. my /includes/classes/shopping_cart.php was already modified before dual pricing was installed.

anyone can help me what are the specific files and/or lines edited just like how COWOA being installed. thankz a lot!

i manage to merge dual pricing codes to my existing files using WinMerge... but it's still the same. the wholesale price doesn't show in shopping cart. but it properly working in product info.

pls help

2 Apr 2008, 8:15 PM
#184
craftzombie avatar

craftzombie

Zen Follower

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

Post #184 by craftzombie

adoy:

hello! need help!

dual pricing mod works for me. i've edited customer set to level 2 and added 2 levels for wholesale pricing by attributes: 30,25

the prices is correctly displayed in product info: 25 but it displays 30 in shopping cart. my /includes/classes/shopping_cart.php was already modified before dual pricing was installed.

anyone can help me what are the specific files and/or lines edited just like how COWOA being installed. thankz a lot!

I believe, with the newest version of this mod, you have to have your wholesale prices set up like this: 1.00-2.00-3.00-4.00 instead of 1.00,2.00,3.00,4.00. I remember when I updated to the new version, I had to change all of my products to the style with the dashes and then it worked. Hopefully it works for you because I have no other solutions!! :smile:

3 Apr 2008, 1:47 AM
#185
adoy avatar

adoy

New Zenner

Join Date:
Feb 2008
Posts:
45
Plugin Contributions:
0

Post #185 by adoy

craftzombie:

I believe, with the newest version of this mod, you have to have your wholesale prices set up like this: 1.00-2.00-3.00-4.00 instead of 1.00,2.00,3.00,4.00. I remember when I updated to the new version, I had to change all of my products to the style with the dashes and then it worked. Hopefully it works for you because I have no other solutions!! :smile:

Im using the latest mod version ( http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=166 )

using 1.00-2.00-3.00-4.00 in the attribute won't display the price

my setup is like this:

Wholesale pricing level: 2
Product is priced by attributes
Retail/Wholesale: 0.0000 / 0.00-0.00-0.00-0.00
Attribute 1: Prefix Price: 395.00
Prefix Wholesale: 0.00,296.25,0.00,0.00
The attribute price is added to the base price (0.00)

On the product info page, Wholesale price (296.25) of the attribute is correctly displayed. But when added to cart, it displays the prefix price (395.00)...

Please help. thankz!

Note: The wholesale pricing is properly working when the product is NOT priced by attributes.

3 Apr 2008, 5:57 AM
#186
lilshopofsecrets avatar

lilshopofsecrets

New Zenner

Join Date:
Mar 2008
Posts:
25
Plugin Contributions:
0

Post #186 by lilshopofsecrets

I just installed this mod today (love it, thank you!) but I have run accross something. I have the Rewards Points Module installed as well (found here: http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_60&products_id=911) and it seems that a customer who is logged in as a wholesale customer will be getting points based on the retail price of the product, rather than the discounted wholesale price.

So this is resulting in an overpayment of rewards points to my wholesale customers. I do want them to be able to earn the points, but I need those points based on the wholesale price.

I do not know coding. Is there an easy fix for this that anyone can think of? Or am I just going to have to decide between the two mods? I am charging my wholesale customers a monthly fee to have access to wholesale pricing, so I guess as a last resort I can up that fee a little to cover the extra points they will be earning.. but I'd hate to do that!

Any ideas would be greatly appreciated. Thank you!!!

3 Apr 2008, 5:13 PM
#187
madfastride avatar

madfastride

Zen Follower

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

Post #187 by madfastride

@ Adoy :
I have a copy of this running on my test cart and the problem you are describing is not happening for me. What version of Zen cart are you using? As you said it might be the previously modified shopping cart page. Did you use WinMerge to merge them? if you could post a copy of your old shopping cart page that might be helpful.
@ lilshopofsecrets :
There will be some code that needs to be modified within the pages of your RP module. Basically it will check to see if a customer is WS and produce the right price for that customer based on the WS price. If you can wait a couple days I can look into this for you but right now I can't provide anymore help since I haven't worked with that module before. But you shouldn't have to worry as it should be possible.

Template Cascade: A Zen Cart Design Blog

Discussing Zen Cart design, Modules and functionality...

3 Apr 2008, 9:21 PM
#188
cntgifts avatar

cntgifts

Totally Zenned

Join Date:
Sep 2005
Posts:
836
Plugin Contributions:
0

Post #188 by cntgifts

I was wondering if theres a sql query or something that can be run to change one of the wholesale pricing levels

I wish to charge 5% less on one of my wholesale levels.

Is this possible or am i gonna have to edit all my producst one by one

3 Apr 2008, 10:25 PM
#189
craftzombie avatar

craftzombie

Zen Follower

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

Post #189 by craftzombie

CnTGifts:

I was wondering if theres a sql query or something that can be run to change one of the wholesale pricing levels

I wish to charge 5% less on one of my wholesale levels.

Is this possible or am i gonna have to edit all my producst one by one

I had to change 2000 products once. I used the Quick Updates mod. It took longer than a sql trick (which I didn't and still don't know how to do) and was faster than doing it one at a time.

3 Apr 2008, 11:48 PM
#190
cntgifts avatar

cntgifts

Totally Zenned

Join Date:
Sep 2005
Posts:
836
Plugin Contributions:
0

Post #190 by cntgifts

is there a way to get that to display the wholesale level pricing too?

3 Apr 2008, 11:52 PM
#191
cntgifts avatar

cntgifts

Totally Zenned

Join Date:
Sep 2005
Posts:
836
Plugin Contributions:
0

Post #191 by cntgifts

found out its built into the quick updates file

3 Apr 2008, 11:55 PM
#192
madfastride avatar

madfastride

Zen Follower

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

Post #192 by madfastride

CnTGifts:

I was wondering if theres a sql query or something that can be run to change one of the wholesale pricing levels

I wish to charge 5% less on one of my wholesale levels.

Is this possible or am i gonna have to edit all my producst one by one

CnTGifts, if you haven't heard this before, please back up your DB before doing this... ;)

Next log into your PHPMyadmin and access your DataBase. Click on the tab "SQL" in the text box copy and paste this code. Modify "products" to match your prefix. Example if you used zen_ you need to modify "products" to "zen_products"

UPDATE products SET products_price_w=products_price * .95

This is assuming you've installed the SQL patch for Dual pricing already. if not do that first...

you should now be golden....

Template Cascade: A Zen Cart Design Blog

Discussing Zen Cart design, Modules and functionality...

4 Apr 2008, 1:06 AM
#193
cntgifts avatar

cntgifts

Totally Zenned

Join Date:
Sep 2005
Posts:
836
Plugin Contributions:
0

Post #193 by cntgifts

will that do, all the wholesale levels. i currently have 2 different wholesale levels set

4 Apr 2008, 1:36 AM
#194
craftzombie avatar

craftzombie

Zen Follower

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

Post #194 by craftzombie

CnTGifts:

found out its built into the quick updates file

Yes, and for anyone else that may need to know this:

in
admin/includes/extra_configures/quick_updates.php

find:

// change to 'true' to enable wholesale price updates
define('QUICKUPDATES_MODIFY_WHOLESALE_PRICE', 'false');

and change it to:

// change to 'true' to enable wholesale price updates
define('QUICKUPDATES_MODIFY_WHOLESALE_PRICE', 'true');

4 Apr 2008, 4:06 AM
#195
cntgifts avatar

cntgifts

Totally Zenned

Join Date:
Sep 2005
Posts:
836
Plugin Contributions:
0

Post #195 by cntgifts

That sql query didnt come close to working

Here is what i had in my wholesale price Retail Price 14.95 6.60-5.21

Here is what i have now 14.202500

What that did was take 5% off my retail price

4 Apr 2008, 2:21 PM
#196
madfastride avatar

madfastride

Zen Follower

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

Post #196 by madfastride

Sorry my bad that's what I thought you wanted to do... I don't know of an SQL query that would work then... But so I understand you have 14.95 6.60-5.21 and you want to modify one of the whole sale pricing levels to 95% of it's current level... You'd need a PHP script to query the DB then explode the array, modify and then SET your fields again... But it does sounds like craftzombie has a solution for you. Sorry for any inconvenience by misreading your statement.

Template Cascade: A Zen Cart Design Blog

Discussing Zen Cart design, Modules and functionality...

5 Apr 2008, 9:28 AM
#197
adoy avatar

adoy

New Zenner

Join Date:
Feb 2008
Posts:
45
Plugin Contributions:
0

Post #197 by adoy

madfastride:

@ Adoy :
I have a copy of this running on my test cart and the problem you are describing is not happening for me. What version of Zen cart are you using? As you said it might be the previously modified shopping cart page. Did you use WinMerge to merge them? if you could post a copy of your old shopping cart page that might be helpful.

Zen Cart v1.3.8a/v1.3.8
Yes, I've used WinMerge

here's the shopping cart page after i merge the mod Product with attribute stock

[CODE]
<?php
/**
 * shopping_cart header_php.php
 *
 * @package page
 * @copyright Copyright 2003-2007 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: header_php.php 7171 2007-10-05 08:42:24Z drbyte $
 */

// This should be first line of the script:
$zco_notifier->notify('NOTIFY_HEADER_START_SHOPPING_CART');

require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
$breadcrumb->add(NAVBAR_TITLE);

// Validate Cart for checkout
$_SESSION['valid_to_checkout'] = true;
$_SESSION['cart_errors'] = '';
$_SESSION['cart']->get_products(true);

if (!$_SESSION['valid_to_checkout']) {
  $messageStack->add('shopping_cart', ERROR_CART_UPDATE . $_SESSION['cart_errors'] , 'caution');
}

// build shipping with Tare included
$shipping_weight = $_SESSION['cart']->show_weight();
/*
  $shipping_weight = 0;
  require(DIR_WS_CLASSES . 'order.php');
  $order = new order;
  require_once('includes/classes/http_client.php'); // shipping in basket
  $total_weight = $_SESSION['cart']->show_weight();
  $total_count = $_SESSION['cart']->count_contents();
  require(DIR_WS_CLASSES . 'shipping.php');
  $shipping_modules = new shipping;
  $quotes = $shipping_modules->quote();
*/
$totalsDisplay = '';
switch (true) {
  case (SHOW_TOTALS_IN_CART == '1'):
  $totalsDisplay = TEXT_TOTAL_ITEMS . $_SESSION['cart']->count_contents() . TEXT_TOTAL_WEIGHT . $shipping_weight . TEXT_PRODUCT_WEIGHT_UNIT . TEXT_TOTAL_AMOUNT . $currencies->format($_SESSION['cart']->show_total());
  break;
  case (SHOW_TOTALS_IN_CART == '2'):
  $totalsDisplay = TEXT_TOTAL_ITEMS . $_SESSION['cart']->count_contents() . ($shipping_weight > 0 ? TEXT_TOTAL_WEIGHT . $shipping_weight . TEXT_PRODUCT_WEIGHT_UNIT : '') . TEXT_TOTAL_AMOUNT . $currencies->format($_SESSION['cart']->show_total());
  break;
  case (SHOW_TOTALS_IN_CART == '3'):
  $totalsDisplay = TEXT_TOTAL_ITEMS . $_SESSION['cart']->count_contents() . TEXT_TOTAL_AMOUNT . $currencies->format($_SESSION['cart']->show_total());
  break;
}

// testing/debugging
//  require(DIR_WS_MODULES . 'debug_blocks/shopping_cart_contents.php');

$flagHasCartContents = ($_SESSION['cart']->count_contents() > 0);
$cartShowTotal = $currencies->format($_SESSION['cart']->show_total());

$flagAnyOutOfStock = false;
$products = $_SESSION['cart']->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
  if (($i/2) == floor($i/2)) {
    $rowClass="rowEven";
  } else {
    $rowClass="rowOdd";
  }
  switch (true) {
    case (SHOW_SHOPPING_CART_DELETE == 1):
    $buttonDelete = true;
    $checkBoxDelete = false;
    break;
    case (SHOW_SHOPPING_CART_DELETE == 2):
    $buttonDelete = false;
    $checkBoxDelete = true;
    break;
    default:
    $buttonDelete = true;
    $checkBoxDelete = true;
    break;
    $cur_row++;
  } // end switch
  $attributeHiddenField = "";
  $attrArray = false;
  $productsName = $products[$i]['name'];
  // Push all attributes information in an array
  if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
    if (PRODUCTS_OPTIONS_SORT_ORDER=='0') {
      $options_order_by= ' ORDER BY LPAD(popt.products_options_sort_order,11,"0")';
    } else {
      $options_order_by= ' ORDER BY popt.products_options_name';
    }
    foreach ($products[$i]['attributes'] as $option => $value) {
      $attributes = "SELECT popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix
                     FROM " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa
                     WHERE pa.products_id = :productsID
                     AND pa.options_id = :optionsID
                     AND pa.options_id = popt.products_options_id
                     AND pa.options_values_id = :optionsValuesID
                     AND pa.options_values_id = poval.products_options_values_id
                     AND popt.language_id = :languageID
                     AND poval.language_id = :languageID " . $options_order_by;

      $attributes = $db->bindVars($attributes, ':productsID', $products[$i]['id'], 'integer');
      $attributes = $db->bindVars($attributes, ':optionsID', $option, 'integer');
      $attributes = $db->bindVars($attributes, ':optionsValuesID', $value, 'integer');
      $attributes = $db->bindVars($attributes, ':languageID', $_SESSION['languages_id'], 'integer');
      $attributes_values = $db->Execute($attributes);
      //clr 030714 determine if attribute is a text attribute and assign to $attr_value temporarily
      if ($value == PRODUCTS_OPTIONS_VALUES_TEXT_ID) {
        $attributeHiddenField .= zen_draw_hidden_field('id[' . $products[$i]['id'] . '][' . TEXT_PREFIX . $option . ']',  $products[$i]['attributes_values'][$option]);
        $attr_value = $products[$i]['attributes_values'][$option];
      } else {
        $attributeHiddenField .= zen_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value);
        $attr_value = $attributes_values->fields['products_options_values_name'];
      }

      $attrArray[$option]['products_options_name'] = $attributes_values->fields['products_options_name'];
      $attrArray[$option]['options_values_id'] = $value;
      $attrArray[$option]['products_options_values_name'] = zen_output_string_protected($attr_value) ;
      $attrArray[$option]['options_values_price'] = $attributes_values->fields['options_values_price'];
      $attrArray[$option]['price_prefix'] = $attributes_values->fields['price_prefix'];
    }
  } //end foreach [attributes]
  if (STOCK_CHECK == 'true') {
    $flagStockCheck = zen_check_stock($products[$i]['id'], $products[$i]['quantity']);
    if ($flagStockCheck == true) {
      $flagAnyOutOfStock = true;
    }
  }
  $linkProductsImage = zen_href_link(zen_get_info_page($products[$i]['id']), 'products_id=' . $products[$i]['id']);
  $linkProductsName = zen_href_link(zen_get_info_page($products[$i]['id']), 'products_id=' . $products[$i]['id']);
  $productsImage = (IMAGE_SHOPPING_CART_STATUS == 1 ? zen_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], IMAGE_SHOPPING_CART_WIDTH, IMAGE_SHOPPING_CART_HEIGHT) : '');
  $show_products_quantity_max = zen_get_products_quantity_order_max($products[$i]['id']);
  $showFixedQuantity = (($show_products_quantity_max == 1 or zen_get_products_qty_box_status($products[$i]['id']) == 0) ? true : false);
//  $showFixedQuantityAmount = $products[$i]['quantity'] . zen_draw_hidden_field('products_id[]', $products[$i]['id']) . zen_draw_hidden_field('cart_quantity[]', 1);
//  $showFixedQuantityAmount = $products[$i]['quantity'] . zen_draw_hidden_field('cart_quantity[]', 1);
  $showFixedQuantityAmount = $products[$i]['quantity'] . zen_draw_hidden_field('cart_quantity[]', $products[$i]['quantity']);
  $showMinUnits = zen_get_products_quantity_min_units_display($products[$i]['id']);
  $quantityField = zen_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"');
  $buttonUpdate = ((SHOW_SHOPPING_CART_UPDATE == 1 or SHOW_SHOPPING_CART_UPDATE == 3) ? zen_image_submit(ICON_IMAGE_UPDATE, ICON_UPDATE_ALT) : '') . zen_draw_hidden_field('products_id[]', $products[$i]['id']);
  $productsPrice = $currencies->display_price($products[$i]['final_price'], zen_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . ($products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->display_price($products[$i]['onetime_charges'], zen_get_tax_rate($products[$i]['tax_class_id']), 1) : '');
  $productsPriceEach = $currencies->display_price($products[$i]['final_price'], zen_get_tax_rate($products[$i]['tax_class_id']), 1) . ($products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->display_price($products[$i]['onetime_charges'], zen_get_tax_rate($products[$i]['tax_class_id']), 1) : '');
  $productArray[$i] = array('attributeHiddenField'=>$attributeHiddenField,
                            'flagStockCheck'=>$flagStockCheck,
                            'flagShowFixedQuantity'=>$showFixedQuantity,
                            'linkProductsImage'=>$linkProductsImage,
                            'linkProductsName'=>$linkProductsName,
                            'productsImage'=>$productsImage,
                            'productsName'=>$productsName,
                            'showFixedQuantity'=>$showFixedQuantity,
                            'showFixedQuantityAmount'=>$showFixedQuantityAmount,
                            'showMinUnits'=>$showMinUnits,
                            'quantityField'=>$quantityField,
                            'buttonUpdate'=>$buttonUpdate,
                            'productsPrice'=>$productsPrice,
                            'productsPriceEach'=>$productsPriceEach,
                            'rowClass'=>$rowClass,
                            'buttonDelete'=>$buttonDelete,
                            'checkBoxDelete'=>$checkBoxDelete,
                            'id'=>$products[$i]['id'],
                            'attributes'=>$attrArray);
} // end FOR loop


// This should be last line of the script:
$zco_notifier->notify('NOTIFY_HEADER_END_SHOPPING_CART');
?>

[/CODE]

8 Apr 2008, 2:28 AM
#198
adoy avatar

adoy

New Zenner

Join Date:
Feb 2008
Posts:
45
Plugin Contributions:
0

Post #198 by adoy

anybody can help with my issue please... thankz a lot!

15 Apr 2008, 5:26 PM
#199
nuitari avatar

nuitari

New Zenner

Join Date:
Apr 2008
Posts:
1
Plugin Contributions:
0

Post #199 by nuitari

1054 Unknown column 'c.COWOA_account' in 'field list'
in:
[select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, c.customers_group_pricing, a.entry_country_id, a.entry_company, ci.customers_info_date_of_last_logon, ci.customers_info_date_account_created , c.customers_telephone, a.entry_company, a.entry_street_address, a.entry_city, a.entry_postcode, c.customers_authorization, c.customers_referral, c.COWOA_account from customers c left join customers_info ci on c.customers_id= ci.customers_info_id left join address_book a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id order by ci.customers_info_date_account_created DESC limit 0, 20]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

any clue how to fix this?

15 Apr 2008, 10:56 PM
#200
craftzombie avatar

craftzombie

Zen Follower

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

Post #200 by craftzombie

Nuitari:

1054 Unknown column 'c.COWOA_account' in 'field list'
in:
[select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, c.customers_group_pricing, a.entry_country_id, a.entry_company, ci.customers_info_date_of_last_logon, ci.customers_info_date_account_created , c.customers_telephone, a.entry_company, a.entry_street_address, a.entry_city, a.entry_postcode, c.customers_authorization, c.customers_referral, c.COWOA_account from customers c left join customers_info ci on c.customers_id= ci.customers_info_id left join address_book a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id order by ci.customers_info_date_account_created DESC limit 0, 20]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

> 
> any clue how to fix this?

Read through this thread and find out which download does not contain the COWOA mod with it and then re-install. There are two new versions of Dual Pricing, one with the COWOA mod included. You want the one without it. I just can remember whose version does not have it. It is somewhere on this thread though.