Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Seperate Pricing Per Customer v3.5


scendent

Recommended Posts

I found one issue with an other contribution, the disable categories/product contribution.

 

Can anyone help me out with the code, so both contributions work together?

 

// BOF Enable & Disable Categories

if ($random_product = tep_random_select("select distinct p.products_id, p.products_image, p.products_tax_class_id, p.products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_status=1 and p.products_id = p2c.products_id and c.categories_id = p2c.categories_id and c.categories_status=1 order by p.products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) {

// EOF Enable & Disable Categories

 

Needs to be replaced with:

 

if ($random_product = tep_random_select("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id order by p.products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) {

Link to comment
Share on other sites

I found one issue with an other contribution, the disable categories/product contribution.

 

Can anyone help me out with the code, so both contributions work together?

 

// BOF Enable & Disable Categories

if ($random_product = tep_random_select("select distinct p.products_id, p.products_image, p.products_tax_class_id, p.products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_status=1 and p.products_id = p2c.products_id and c.categories_id = p2c.categories_id and c.categories_status=1 order by p.products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) {

// EOF Enable & Disable Categories

 

Needs to be replaced with:

 

if ($random_product = tep_random_select("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id order by p.products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) {

 

Best option would be to add some more code includes/products_new.php (I assume this is where the code is found because you don't mention that) to query the table products_description for the product names and then you can use the queries from Enable & Disable categories.

 

The other option is to use the query fom and make the (2nd) commented line further on uncommented again:

 

// getting products_name added to the $new_products_query above so we can skip this
//    $new_products[$x]['products_name'] = tep_get_products_name($new_products[$x]['products_id']);

Link to comment
Share on other sites

It didnt work out for me, to many errors and complications. So after 5 hours editing files, i give up.

 

Thanx for the quick support though. Hope addons like this will be preinstalled in next versions of osc in the future :-)

Link to comment
Share on other sites

Actually, i just need a sipmle contribution, that gives different discounts on different manufacturers. It can be in percent, and in can be as simple as it just gives the discount in shopping cart.... Any suggestions of other sollutions for me?

Link to comment
Share on other sites

Everything seems to check out fine except index.php page

At the bottom of the page I have "New Products For September" - this area no images is displayed (missing new products images)and product path when clicked = http://localhost/shop/product_info.php?products_id=&osCsid=sessionid

products_id is empty so indeed there is some code error somewhere. Actually you should use http: // 127.0.0.1 instead of http: // localhost in your configure.php files (catalog and admin) to avoid issues with cookies.

 

Also using pcpro creator addon(working) - when I build a product I get error " 1136 - Column count doesn't match value count at row 1

 

insert into products_attributes values (NULL, '490', '244', '362', '0', '+')

Your missing the last column: attributes_hide_from_group which could be set as null or '' in that insert.

Link to comment
Share on other sites

I've got 11 customer groups and more than 1000 procucts. Everytime I create a new customer group I select it and type in the prices in Quick Updates (for SPPC).

Then I have to hide a couple of hundred of products for that customer group. Can Quick Updates be modified so that it can handle hiding of products too? That would save a lot of hours...

I haven't looked at that because my feeling is the form will take up a lot of space when you have to add room for displaying 11 checkboxes for those customers groups.

However, as long as you haven't added customers to that group you could do an update of the table products. Say you want to hide the same products from customer group 3 as you hide from customer group 1. Then this query (should) add customer group 3 to those products for hiding:

 

update products set products_hide_from_groups = concat(products_hide_from_groups, ',3') where find_in_set('1', products_hide_from_groups) > 0;

 

You could do that in phpMyAdmin. As usual make a backup of your table products and your whole database before testing this out. It worked for me but my test database is very small :)

Link to comment
Share on other sites

products_id is empty so indeed there is some code error somewhere. Actually you should use http: // 127.0.0.1 instead of http: // localhost in your configure.php files (catalog and admin) to avoid issues with cookies.

 

 

Your missing the last column: attributes_hide_from_group which could be set as null or '' in that insert.

 

Thanks Jan for reply

 

I changed my config to 127.0.0.1 and still only my new products is not displayed correctly - no images and pricing is 0.00 - linked to http://127.0.0.1/shop/product_info.php?products_id=&osCsid=49fa9aa90e2cc9b08dda61802dbdf394

However my /products_new.php is displayed correctly

 

For the pc pro - guess I need to add extra fields to product builder files - got extra field in database = attributes_hide_from_groups

A piece of code:

<?php
   }
?>
         <p><?php echo stripslashes($product_info['products_description']); ?></p>
<?php
   $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
   $products_attributes = tep_db_fetch_array($products_attributes_query);
   if ($products_attributes['total'] > 0) {
?>
         <table border="0" cellspacing="0" cellpadding="2">
           <tr>
             <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td>
           </tr>
<?php
     if ($cpb_build_unsort_components) {
       $products_options_name_query = tep_db_query("select distinct patrib.options_values_price, popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' group by popt.products_options_id");
     } else {
       $products_options_name_query = tep_db_query("select distinct sum(patrib.options_values_price), popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' group by popt.products_options_name");
     }
     while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
       $products_options_array = array();
         $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pov.catalog_products_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");

       while ($products_options = tep_db_fetch_array($products_options_query)) {
         $component_name = $products_options['products_options_values_name'];
         $component_id = $products_options['products_options_values_id'];
         $componentcat_id = $products_options['catalog_products_id'];

       }
       echo tep_draw_hidden_field('id[' . $products_options_name['products_options_id'] . ']', $component_id);
?>

 

Thanks Jan

Edited by Peper

Getting the Phoenix off the ground

Link to comment
Share on other sites

I think this might be relate to SPPC - Addon http://addons.oscommerce.com/info/2113/v,22 - Add Quantity to Listings

 

Only one product is added to cart at a time even if 2 or 3 is filled in quantity box

I see there is an addon http://www.oscommerce.com/community/contributions,3606 which is really old

 

Entire changes was as follows:

In includes/modules/product_listing.php around line 131 replace

case 'PRODUCT_LIST_BUY_NOW':
$lc_align = 'center';
$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
break;
}


with


case 'PRODUCT_LIST_BUY_NOW':
$lc_align = 'center';
$lc_text = tep_draw_form('buy_now' . $listing['products_id'], tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']), 'POST') . tep_draw_input_field('cart_quantity', '1', 'size=2') . tep_image_submit('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</form> ';
break;
}
In includes/application_top.php around line 366

Replace

     case 'buy_now' :        if (isset($HTTP_GET_VARS['products_id'])) {
                               if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {
                                 tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));
                               } else {
                                 $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);
                               }
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;


With

     case 'buy_now' :        if (isset($HTTP_GET_VARS['products_id'])) {
                               if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {
                                 tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));
                               } elseif (isset($HTTP_POST_VARS['cart_quantity'])) {
                   $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+$HTTP_POST_VARS['cart_quantity']);
               } else {
                                 $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);
                               }
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;

 

Please advice

Getting the Phoenix off the ground

Link to comment
Share on other sites

I haven't looked at that because my feeling is the form will take up a lot of space when you have to add room for displaying 11 checkboxes for those customers groups.

However, as long as you haven't added customers to that group you could do an update of the table products. Say you want to hide the same products from customer group 3 as you hide from customer group 1. Then this query (should) add customer group 3 to those products for hiding:

 

update products set products_hide_from_groups = concat(products_hide_from_groups, ',3') where find_in_set('1', products_hide_from_groups) > 0;

 

You could do that in phpMyAdmin. As usual make a backup of your table products and your whole database before testing this out. It worked for me but my test database is very small :)

Hi Jan!

You are right. I don't want a checkbox for each customer group. Only one checkbox per product in the selected customer group. Just like the price field.

The SQL-trick works just fine, but that's not what I need. Thats more like a "hide product by default" function(which of course is quite nice)...

//Micke

Link to comment
Share on other sites

I think this might be relate to SPPC - Addon http://addons.oscommerce.com/info/2113/v,22 - Add Quantity to Listings

 

Only one product is added to cart at a time even if 2 or 3 is filled in quantity box

I see there is an addon http://www.oscommerce.com/community/contributions,3606 which is really old

 

Entire changes was as follows:

In includes/modules/product_listing.php around line 131 replace

case 'PRODUCT_LIST_BUY_NOW':
$lc_align = 'center';
$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
break;
}


with


case 'PRODUCT_LIST_BUY_NOW':
$lc_align = 'center';
$lc_text = tep_draw_form('buy_now' . $listing['products_id'], tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']), 'POST') . tep_draw_input_field('cart_quantity', '1', 'size=2') . tep_image_submit('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</form> ';
break;
}
In includes/application_top.php around line 366

Replace

     case 'buy_now' :        if (isset($HTTP_GET_VARS['products_id'])) {
                               if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {
                                 tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));
                               } else {
                                 $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);
                               }
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;


With

     case 'buy_now' :        if (isset($HTTP_GET_VARS['products_id'])) {
                               if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {
                                 tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));
                               } elseif (isset($HTTP_POST_VARS['cart_quantity'])) {
                   $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+$HTTP_POST_VARS['cart_quantity']);
               } else {
                                 $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);
                               }
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;

 

Please advice

 

Ok, found solution to above post

 

(1) catalog/includes/application_top.php

 

* FIND:

 

$cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);

 

 

* CHANGE TO:

 

//modification by Alexander Dimelow (www.web-project.co.uk)

if($HTTP_POST_VARS['buyqty']=="") {

$quantity = 1;

}else{

$quantity = $HTTP_POST_VARS['buyqty'];

}

//end of modification by Alexander Dimelow (www.web-project.co.uk)

 

$cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+$quantity);

Getting the Phoenix off the ground

Link to comment
Share on other sites

Thanks Jan for reply

 

I changed my config to 127.0.0.1 and still only my new products is not displayed correctly - no images and pricing is 0.00 - linked to http://127.0.0.1/shop/product_info.php?products_id=&osCsid=49fa9aa90e2cc9b08dda61802dbdf394

However my /products_new.php is displayed correctly

 

For the pc pro - guess I need to add extra fields to product builder files - got extra field in database = attributes_hide_from_groups

A piece of code:

 

Thanks Jan

 

My head is spinning already,

Can I by default insert the customer group to be 0 somewhere in the code below so that this fixes the error page??

 

Please help

 

Code from builder_add_attribute.php

<?php
/*
 $Id: builder_add_attribute.php, v 1.1.0 2008/11/28 23:03:53 10c $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

// THIS FILE IS INCLUDED TO BUILDER_MAIN (TWICE BUT ONLY LOADED ONCE) - DOING IT THIS WAY JUST MAKES MAINTAINING THE SOURCE EASIER
         if (strlen($components_name[$i]) > 0) {
// GET NEXT AVAILABLE OPTIONS & VALUES IDS
           $max_options_id_query = tep_db_query("select max(products_options_id) + 1 as o_next_id from " . TABLE_PRODUCTS_OPTIONS);
           $max_options_id_values = tep_db_fetch_array($max_options_id_query);
           $next_options_id = $max_options_id_values['o_next_id'];
           $max_values_id_query = tep_db_query("select max(products_options_values_id) + 1 as v_next_id from " . TABLE_PRODUCTS_OPTIONS_VALUES);
           $max_values_id_values = tep_db_fetch_array($max_values_id_query);
           $next_values_id = $max_values_id_values['v_next_id'];

// ADD NEW IDS TO ATTRIBUTE LIST (for direct to cart singles)
           $cpb_attribute_list[$next_options_id]=$next_values_id;

// ADD OPTION
           $products_options_id = tep_db_prepare_input($next_options_id);
           $option_name = tep_db_prepare_input($pccat[$i]);
           tep_db_query("insert into " . TABLE_PRODUCTS_OPTIONS . " (products_options_id, products_options_name, language_id) values ('" . (int)$products_options_id . "', '" . tep_db_input($option_name) . "', '" . (int)$languages_id . "')");

// ADD OPTION VALUE - two new fields added to option_values table (pid & qty), these are used for returning components to stock when deleting builds
           $value_id = tep_db_prepare_input($next_values_id);
           $option_id = tep_db_prepare_input($next_options_id);
           $value_name = '(' . $components_quantity[$i] . 'x) ' . strip_tags(addslashes($components_name[$i]));
// INCLUDE COMPONENT ID (osC product id) IN DESCRIPTION - this is purely for HRT - and that's why toggleable
           if ($cpb_build_id_in_description) {
             $value_name .= ' [#' . $products_count[$i] . '] ';
           }
// INCLUDE PRICE IN DESCRIPTION ONLY IF FIXED PRICING IS ENABLED!
           if (($cpb_build_price_in_description) && ($cpb_build_product_price_fix)) {
             $value_name .= " (" . $currencies->format($components_price[$i]*$components_quantity[$i],false) . ")"; 
           }
           $value_name = tep_db_prepare_input($value_name);
           tep_db_query("insert into " . TABLE_PRODUCTS_OPTIONS_VALUES . " (products_options_values_id, language_id, products_options_values_name, catalog_products_id, catalog_products_quantity) values ('" . (int)$value_id . "', '" . (int)$languages_id . "', '" . $value_name . "', '" . tep_db_input($products_count[$i]) . "', '" . (int)$components_quantity[$i] . "')");
           tep_db_query("insert into " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " (products_options_id, products_options_values_id) values ('" . (int)$option_id . "', '" . (int)$value_id . "')");

// ADD ATTRIBUTE TO PRODUCT
           $options_id = tep_db_prepare_input($option_id);
           $values_id = tep_db_prepare_input($value_id);
           if ($cpb_build_product_price_fix) {
             $value_price = tep_db_prepare_input('0');
           } else {
             $value_price = tep_db_prepare_input($components_price[$i]*$components_quantity[$i]);
           }
           $price_prefix = tep_db_prepare_input('+');
           tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values (NULL, '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "')");
         }
// END OF THIS MODULE
?>

Edited by Peper

Getting the Phoenix off the ground

Link to comment
Share on other sites

Sorry for all the postings, everything is ok now thanks to Jan

 

My head is spinning already, if anyone else gets this pc pro problem it will add to attribute group 0

Got it fixed by changing /includes/modules/builder_add_attributes.php

 

Find at end

// ADD ATTRIBUTE TO PRODUCT
           $options_id = tep_db_prepare_input($option_id);
           $values_id = tep_db_prepare_input($value_id);
           if ($cpb_build_product_price_fix) {
             $value_price = tep_db_prepare_input('0');
           } else {
             $value_price = tep_db_prepare_input($components_price[$i]*$components_quantity[$i]);
           }
           $price_prefix = tep_db_prepare_input('+');
           tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values (NULL, '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "')");
         }
// END OF THIS MODULE

 

to

 

// ADD ATTRIBUTE TO PRODUCT
           $options_id = tep_db_prepare_input($option_id);
           $values_id = tep_db_prepare_input($value_id);
           if ($cpb_build_product_price_fix) {
             $value_price = tep_db_prepare_input('0');
           } else {
             $value_price = tep_db_prepare_input($components_price[$i]*$components_quantity[$i]);
           }
           $price_prefix = tep_db_prepare_input('+');
           $attributes_hide_from_groups = tep_db_prepare_input('0');

           tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values (NULL, '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "', '" . tep_db_input($attributes_hide_from_groups) . "')");
         }
// END OF THIS MODULE

 

Thanks a lot Jan(if this is wrong please advice on code) :thumbsup:

Getting the Phoenix off the ground

Link to comment
Share on other sites

Me again

Please help

 

One last thing - strict checking reveal - Notice: Undefined index: specstat in C:\xampp\htdocs\www\shop\includes\modules\new_products.php on line 97

 

Code starting line 97

        if($new_products[$x]['specstat']) {
         $info_box_contents[$row][$col] = array('align' => 'center',
                                                'params' => 'class="smallText" width="33%" valign="top"',
                                                'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products[$x]['products_image'], $new_products[$x]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products[$x]['products_id']) . '">' . $new_products[$x]['products_name'] . '</a><br><s>' . $currencies->display_price($new_products[$x]['products_price'], tep_get_tax_rate($new_products[$x]['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' .
                                                  $currencies->display_price($new_products[$x]['specials_new_products_price'], tep_get_tax_rate($new_products[$x]['products_tax_class_id'])) . '</span>');
       } else {

Getting the Phoenix off the ground

Link to comment
Share on other sites

[

// ADD ATTRIBUTE TO PRODUCT
           $options_id = tep_db_prepare_input($option_id);
           $values_id = tep_db_prepare_input($value_id);
           if ($cpb_build_product_price_fix) {
             $value_price = tep_db_prepare_input('0');
           } else {
             $value_price = tep_db_prepare_input($components_price[$i]*$components_quantity[$i]);
           }
           $price_prefix = tep_db_prepare_input('+');
           $attributes_hide_from_groups = tep_db_prepare_input('0');

           tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values (NULL, '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "', '" . tep_db_input($attributes_hide_from_groups) . "')");
         }
// END OF THIS MODULE

 

If this is adding a new attribute you could add code to also be able to hide attributes from groups. If you don't you shouldn't use "0" for the value. The default is the at symbol: @. Since it is the default for the column value you should be able to use:

 

           $price_prefix = tep_db_prepare_input('+');
//           $attributes_hide_from_groups = tep_db_prepare_input('0');

           tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values (NULL, '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "', NULL);
         }
// END OF THIS MODULE

Link to comment
Share on other sites

One last thing - strict checking reveal - Notice: Undefined index: specstat in C:\xampp\htdocs\www\shop\includes\modules\new_products.php on line 97

Notices are suppressed in osC. They are not a big deal. The are notices, not errors. Nice to have code without notices but you can live with them.

 

        if($new_products[$x]['specstat']) {

 

Couldn't find that but perhaps you can check if it is set first:

 

       if (isset($new_products[$x]['specstat']) && $new_products[$x]['specstat']) {

Link to comment
Share on other sites

Notices are suppressed in osC. They are not a big deal. The are notices, not errors. Nice to have code without notices but you can live with them.

 

        if($new_products[$x]['specstat']) {

 

Couldn't find that but perhaps you can check if it is set first:

 

       if (isset($new_products[$x]['specstat']) && $new_products[$x]['specstat']) {

 

Hi Jan

 

The code is from the file catalog/includes/modules/new_products.php line 97 as I copied it entirely like that, the modification code gave me errors

 

Another one I found giving error is when I select a manufacturer I get error - http: //127.0.0.1 /shop/index.php?manufacturers_id=6&osCsid=40736bb69f2bb106e5a969821bdb0d89

1109 - Unknown table 'p' in field list

 

select count(p.products_id) as total order by p.products_sort_order asc

 

[TEP STOP]

 

This error comes from the catalog/index.php only loading half the page, if I use my backup index.php file, it shows correct

 

// BOF Product Sort    
         $HTTP_GET_VARS['sort'] = 'products_sort_order';
         $listing_sql .= " order by p.products_sort_order asc";
// EOF Product Sort

 

Thank you for helping

Getting the Phoenix off the ground

Link to comment
Share on other sites

Another one I found giving error is when I select a manufacturer I get error - http: //127.0.0.1 /shop/index.php?manufacturers_id=6&osCsid=40736bb69f2bb106e5a969821bdb0d89

1109 - Unknown table 'p' in field list

 

select count(p.products_id) as total order by p.products_sort_order asc

Something wrong with the code as there is a whole piece missing between total and order (like from table bla, table bla, where bla, bla).

 

Sometimes this is a problem with using capitals which confuses the class split_page_results.php

Link to comment
Share on other sites

After searching the whole forum for possibles answers I am still stock!!

 

In the past, I included a new field to may "orders_products" table and of course to "products" table. The field is call "products_ordernr". Before I installed the module this information would be included on my "checkout_confirmation.php for the customers to see the order number of each product, he will also get this information by mail and we will see it under "Order" in the Admin site. (Note: This order number is a given/unique number to most of our products).

 

Now, I don't get it anymore and the department that processes the orders, is having to work more to get the right product out to the customer. My phone doesn't stop ringging!!

 

After going thourgh the whole code, I think the problem could be in the changes made to the file catalog/includes/classes/shopping_cart.php, where I needed to change around line 547:

 

 $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_ordernr, p.products_image, p.products_price, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
       if ($products = tep_db_fetch_array($products_query)) {
         $prid = $products['products_id'];
         $products_price = $products['products_price'];

// BOF Separate Pricing Per Customer
  $specials_price = tep_get_products_special_price($prid);
 if (tep_not_null($specials_price)) {
 $products_price = $specials_price;
     } elseif ($this->cg_id != 0){
       $customer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$prid . "' and customers_group_id =  '" . $this->cg_id . "'");
       if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) {
       $products_price = $customer_group_price['customers_group_price'];
         }
 }
// EOF Separate Pricing Per Customer

 

to:

 

// BOF QPBPP for SPPC
     $pf->loadProduct($products_id, $languages_id); // does query if necessary and adds to 
     // PriceFormatterStore or gets info from it next
     if ($products = $pfs->getPriceFormatterData($products_id)) {
      if (tep_not_null($this->contents[$products_id]['discount_categories_id'])) {
         $nof_items_in_cart_same_cat =  $discount_category_quantity[$this->contents[$products_id]['discount_categories_id']];
         $nof_other_items_in_cart_same_cat = $nof_items_in_cart_same_cat - $this->contents[$products_id]['qty'];
       } else {
         $nof_other_items_in_cart_same_cat = 0;
       }
         $products_price = $pf->computePrice($this->contents[$products_id]['qty'], $nof_other_items_in_cart_same_cat);
// EOF QPBPP for SPPC

 

 

the "$products_query" selected this value from my "products" table and passed it to the "orders_products" table when the order was placed.

 

I don't find where I can include this in the new code so I can get the information.

 

Please help... :'(

 

Mrstech

Link to comment
Share on other sites

 

the "$products_query" selected this value from my "products" table and passed it to the "orders_products" table when the order was placed.

 

I don't find where I can include this in the new code so I can get the information.

 

Please help... :'(

 

Mrstech

 

Happy to report, that after letting go for the night, it just came to my mind. I solved the problem by updating the "$sql" query and $price_formatter_data array in the files:

catalog/includes/classes/PriceFormatter.php

catalog/includes/classes/PriceFormatterStore.php

 

This is a way to start your day :-) Now I can move on to another problem.

Link to comment
Share on other sites

  • 2 weeks later...

Hi all -- This sounds like what I will need to help client sell both retail AND wholesale through her site.

 

However, before trying to install it, I'm wondering if this has any type of minimum number feature.

 

See, my client wants to sell all of her items in groups of 3. But, she has too many items to recreate individual listings with a different price. So, we're hoping that, by having a wholesale customer, they must buy a min. of 3 products.

 

That and there would be a minimum dollar amount on the order.

 

Anyone know?

Link to comment
Share on other sites

See, my client wants to sell all of her items in groups of 3. But, she has too many items to recreate individual listings with a different price. So, we're hoping that, by having a wholesale customer, they must buy a min. of 3 products.

For that you would to install an additional contribution on top of SPPC: Quantity Price Breaks for Separate Pricing Per Customer.

 

That and there would be a minimum dollar amount on the order.

If I remember correctly this is a contribution that easy to adapt to SPPC if you add the customer_group_id to the define. So say the define is MINMUM_ORDER_AMOUNT in the contribution you use MINMUM_ORDER_AMOUNT0 as the define for retail. More details must be in this thread.

Link to comment
Share on other sites

Is there a way to self-assign to a user group during account creation and get displayed special prices immediately?

Yes.

 

In the create account page there is nothing set for customer_group_id so when inserting a new customer the default of 0 is inserted in the database (which happens to be Retail). You can set that value in your own code in that page and then set the customer_group_id the way you want.

 

It has been discussed in this thread but obviously it might not be easy to find it back :)

Link to comment
Share on other sites

  • 2 weeks later...

Hi Jan

 

I've now re-installed SPPC and working

 

There are though a few addons that I really don't know how to edit or correct the pricing

I know you are really busy but please help me get this right

 

Please help me with 2 contribs - html price list and PC pro creator(pm me if I can send you the PC pro files - 5)

 

For pricelist.php I have

<?php

define('TITLE_PRICE', 'Price list');

require('includes/application_top.php');
// the following cPath references come from application_top.php
$category_depth = 'top';
if (isset($cPath) && tep_not_null($cPath)) {
$categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
$cateqories_products = tep_db_fetch_array($categories_products_query);
if ($cateqories_products['total'] > 0) {
$category_depth = 'products'; // display products
} else {
$category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");
$category_parent = tep_db_fetch_array($category_parent_query);
if ($category_parent['total'] > 0) {
$category_depth = 'nested'; // navigate through the categories
} else {
$category_depth = 'products'; // category has no products, but display the 'no products' message
}
}
}
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);
$breadcrumb->add(TITLE_PRICE, tep_href_link("price_list.php", '', 'SSL'));
?>

<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?> - Price List <?php echo date("Y"); ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
   <?php 
       if (ae_detect_ie())
       {
          echo '<link rel="stylesheet" type="text/css" href="stylesheet_cat_ie.css">';                    
       }
       else {
          echo '<link rel="stylesheet" type="text/css" href="stylesheet_cat.css">'; 
       }
   ?>
<script type="text/javascript"><!--//--><![CDATA[//><!--

sfHover = function() {
   var sfEls = document.getElementById("nav").getElementsByTagName("LI");
   for (var i=0; i<sfEls.length; i++) {
       sfEls[i].onmouseover=function() {
           this.className+=" sfhover";
       }
       sfEls[i].onmouseout=function() {
           this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
       }
   }
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//--><!]]></script>
</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php');?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
<tr>
<?php // print function and edit remove by willross
if ($print=="yes"){?>
<!-- column_left disabled for print //-->
<?php } else {?>
<td width="<?php echo BOX_WIDTH; ?>" valign="top">
<table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table>
</td>
<?php }?>
<!-- body_text //-->
<td valign="top">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="pageHeading"><? echo TITLE_PRICE ?> <?php echo date('l jS \of F Y h:i:s A'); ?><sup>
<?php // print function and edit remove by willross
if ($print=="yes"){?>
<font style="font-size:10px"><a href="pricelist.php">[full view]</a></font>
<?php } else {?>
<font style="font-size:10px"><a href="pricelist.php"  onclick="window.print();return false;"><h3><u>Print Price list</u></h3></a></font>
<?php }?></sup>
</td>
</tr>
<tr>
<td>
<?
// group have products?
function check_products($id_group){
$products_price_query = tep_db_query("select products_to_categories.products_id FROM products_to_categories where products_to_categories.categories_id = ".$id_group." LIMIT 0,1");
if($products_price = tep_db_fetch_array($products_price_query)){
return true;
}
return false;
}

// list products determined group
function get_products($id_group){
global $currencies;
$query = "";
if(!SHOW_MARKED_OUT_STOCK){
$query = " and products.products_status = 1";
}
$products_price_query = tep_db_query("select products_description.products_name, products.products_quantity, products.products_price, products.products_model, products_to_categories.products_id, products_to_categories.categories_id FROM products, products_description, products_to_categories where products.products_id = products_description.products_id and products.products_quantity <> 0".$query." and products.products_id = products_to_categories.products_id and products_to_categories.categories_id = ".$id_group);
$x=0;
while ($products_price = tep_db_fetch_array($products_price_query)){
$cell = tep_get_products_special_price($products_price['products_id']);
if($cell == 0)
$cell = $products_price['products_price'];
if($x==1) {
$col = "#F8F8F9";
$x = 0;
}else{
$col = "#FFFFFF";
$x++;
}
$quantity = "";
$model = "";
if(SHOW_QUANTITY)
$quantity = "<td width=\"100\" align=\"right\" class=\"productListing-data\">(".$products_price['products_quantity'].")</td>";
if(SHOW_MODEL)
$model = "<td width=\"100\" align=\"right\" class=\"productListing-data\">[".$products_price['products_model']."]</td>";
print "<tr bgcolor=\"".$col."\">".$model."<td width=\"1000\" class=\"productListing-data\">        <a href=\"" . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $products_price['products_id']) . "\">".$products_price['products_name']."</a></td><td width=\"150\" align=\"right\" class=\"productListing-data\">".$currencies->display_price($cell,TAX_INCREASE)."</td></tr>";
}
}

// get all groups
function get_group($id_parent,$position){
$groups_price_query = tep_db_query("select categories.categories_id, categories_description.categories_name from categories, categories_description where categories.categories_id = categories_description.categories_id and categories.parent_id = ".$id_parent." order by categories.sort_order");
while ($groups_price = tep_db_fetch_array($groups_price_query)){
$str = "";
for($i = 0; $i < $position; $i++){
$str = $str . "        ";
}
$class = "productListing-heading";
if($position == 0) {
$class = "headerNavigation";
print "<tr><td colspan=\"4\" width=\"1000\" class=\"productListing-data\"> </td></tr>";
}
if(check_products($groups_price['categories_id']) || $position == 0){
print "<tr><td colspan=\"4\" width=\"1000\" class=\"".$class."\"><strong><font color=\"#FFFFFF\">".$str.$groups_price['categories_name']."</font></strong></td></tr>";
get_products($groups_price['categories_id']);
}
get_group($groups_price['categories_id'],$position+1);
}
}
?>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<?

get_group(0,0);
?>

</table>
</td>

</tr>
</table>
</td>
<!-- body_text_eof //-->
<?php // print function and edit remove by willross
if ($print=="yes"){?>
<!-- column_right disabled for print //-->
<?php } else {?>
<td width="<?php echo BOX_WIDTH; ?>" valign="top">
<table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table>
</td>
<?php }?>
</tr>

</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

and required price_list.php

 

<?php

// Begin configuration
define('TITLE_PRICE', 'Price list');
define('TITLE_PRICE_LIST', 'Price List'); // This is the title for your price page
define('DATE_PRICE_LIST', '- M jS, Y'); // date format (empty - none, M - month, jS - day of month, Y - year; see www.php.net/date)
define('PRINT_VIEW', 'Printable View'); // text for link to printable view 
define('FULL_VIEW', 'Full View'); // text for link to normal view
define('TAX_INCREASE', 0); // 0 - No increase, 1 - Add 1%, 5 - Add 5%, Any number - add number%
define('NO_PRICE', ' '); // show when product has no price or zero price (blank -   , or e.g. Call for Price)
define('SHOW_QUANTITY',false); // true - show, false - hide quantity
define('QUANTITY_TEXT', 'Qty.'); // This is the heading for quantity column
define('SHOW_MARKED_OUT_STOCK',true); // show marked out of stock (true - show, false - hide)
define('SHOW_MODEL',true); // true - show model, false - hide model
define('WIDTH_PRICE_LIST', '900'); // width of price list in pixels (0 - tight, 1000 - loose)
define('INDENT_PRICE_LIST', '30'); // width of identation subcategories in pixels (0 - none, 30 - wide)
define('INDENT_PRICE_LIST_COLOR', 'b6b7cb'); // colour of the indentation 

// End configuration

   require('includes/application_top.php');
   // the following cPath references come from application_top.php
   $category_depth = 'top';
   if (isset($cPath) && tep_not_null($cPath)) {
       $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
       $cateqories_products = tep_db_fetch_array($categories_products_query);
       if ($cateqories_products['total'] > 0) {
           $category_depth = 'products'; // display products
       } else {
           $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");
           $category_parent = tep_db_fetch_array($category_parent_query);
           if ($category_parent['total'] > 0) {
               $category_depth = 'nested'; // navigate through the categories
           } else {
               $category_depth = 'products'; // category has no products, but display the 'no products' message
           }
       }
   }

   require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);
   $breadcrumb->add(TITLE_PRICE_LIST, tep_href_link("price_list.php", '', 'SSL')); 
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<style type="text/css">
<!--
td.priceListWidth{
 width:<?php echo WIDTH_PRICE_LIST; ?>px;
} 
td.priceListIndent {
 background-color:<?php echo INDENT_PRICE_LIST_COLOR; ?>;
 width:<?php echo INDENT_PRICE_LIST; ?>;
} 
--></style>

   <?php 
       if (ae_detect_ie())
       {
          echo '<link rel="stylesheet" type="text/css" href="stylesheet_cat_ie.css">';                    
       }
       else {
          echo '<link rel="stylesheet" type="text/css" href="stylesheet_cat.css">'; 
       }
   ?>
<script type="text/javascript"><!--//--><![CDATA[//><!--

sfHover = function() {
   var sfEls = document.getElementById("nav").getElementsByTagName("LI");
   for (var i=0; i<sfEls.length; i++) {
       sfEls[i].onmouseover=function() {
           this.className+=" sfhover";
       }
       sfEls[i].onmouseout=function() {
           this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
       }
   }
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//--><!]]></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<?php  // print function and edit remove by willross
if ($print=="yes"){?>
<!-- column_left disabled for print //-->
<?php } else {?>
       <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<?php }?>
       <!-- body_text //-->


   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
     <tr>
       <td valign="top">            <table border="0" cellspacing="0" cellpadding="2">
                <tr>
                   <td class="pageHeading"><?php echo TITLE_PRICE_LIST ?> <?php echo date(DATE_PRICE_LIST); ?><sup>
<?php  // print function and edit remove by willross
if ($print=="yes"){?>
<font style="font-size:10px"><a href="price_list.php">[<?php echo FULL_VIEW ?>]</a></font>
<?php } else {?>
<font style="font-size:10px"><a href="price_list.php?print=yes">[<?php echo PRINT_VIEW ?>]</a></font>
<?php }?></sup>
                  </td>
                 </tr>
                 <tr>
                   <td>
<?php
// groups have products?
function check_products($id_group){
   $products_price_query = tep_db_query("select products_to_categories.products_id FROM products_to_categories where products_to_categories.categories_id = ".$id_group." LIMIT 0,1");
   if($products_price = tep_db_fetch_array($products_price_query)){
       return true;    
   }
   return false;
}

// list products determined group 
function get_products($id_group){
   global $currencies;
       $query = "";
   if(!SHOW_MARKED_OUT_STOCK){
       $query = " and products.products_status = 1";
   }
   $products_price_query = tep_db_query("select products_description.products_name, products.products_quantity, products.products_price, products.products_model, products_to_categories.products_id, products_to_categories.categories_id FROM products, products_description, products_to_categories where products.products_id = products_description.products_id and products.products_quantity <> 0".$query." and products.products_id = products_to_categories.products_id and products_to_categories.categories_id = ".$id_group." ORDER BY products_description.products_name");
       $x=0;
   while ($products_price = tep_db_fetch_array($products_price_query)){
       $cell = tep_get_products_special_price($products_price['products_id']);
       if($cell == 0)
           $cell = $products_price['products_price'];
       if($x==1) {
           $col = "#F8F8F9";
           $x = 0;    
       }else{
           $col = "#FFFFFF";
           $x++;
       }
       $quantity = "";
       $model = "";
       if(SHOW_QUANTITY) 
           $quantity = "<td  align=\"right\" class=\"productListing-data\"> (".$products_price['products_quantity'].")</td>";
       if(SHOW_MODEL)
           $model = "<td align=\"LEFT\" class=\"productListing-data\">".$products_price['products_model']."</td>";
       print "<tr bgcolor=\"".$col."\"><td class=\"productListing-data\"><table align=\"LEFT\" cellpadding=\"1\" cellspacing=\"0\" ><tr><td  class=\"priceListIndent\" ></td><td class=\"productListing-data\" > </td></tr></table></td>".$model."<td class=\"productListing-data\" ><a href=" . tep_href_link( FILENAME_PRODUCT_INFO, "products_id=" . $products_price['products_id']) . "> ".$products_price['products_name']."</td><td align=\"right\" class=\"productListing-data\"> " . (($products_price['products_price'] > 0) ? $currencies->display_price($cell,TAX_INCREASE) : NO_PRICE ) ."</td>".$quantity."</tr>";
   }
}

// get all groups
function get_group($id_parent,$position){
       $qty_text = "";
   if(SHOW_QUANTITY) {
       $qty_text = "".QUANTITY_TEXT."";
   }else{
       $qty_text = " ";
   }
   $groups_price_query = tep_db_query("select categories.categories_id, categories_description.categories_name from categories, categories_description where categories.categories_id = categories_description.categories_id and categories.parent_id = ".$id_parent." ORDER BY categories_description.categories_name");
   while ($groups_price = tep_db_fetch_array($groups_price_query)){
       $str = "";
       for($i = 0; $i < $position; $i++){
           $str = $str . "<table align=\"LEFT\" cellpadding=\"0\" cellspacing=\"0\" ><tr><td  class=\"priceListIndent\" ></td><td class=\"productListing-heading\" > </td></tr></table>";
       }
       $class = "productListing-heading";
       if($position == 0) {
           $class = "headerNavigation";
           print "<tr><td colspan=\"5\" class=\"priceListWidth\"><table align=\"right\" cellpadding=\"0\" cellspacing=\"0\" ><tr><td class=\"productListing-data\">".$qty_text."</td></tr></table></td></tr>"; // dónnr? nndîer
       }
       if(check_products($groups_price['categories_id']) || $position == 0){
           print "<tr><td colspan=\"5\" class=\"".$class."\"><strong><font color=\"#FFFFFF\">".$str.$groups_price['categories_name']."</font></strong></td></tr>";
           get_products($groups_price['categories_id']);
       }
       get_group($groups_price['categories_id'],$position+1); // nëläótur? adóddr
   }
}
?>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<?php
 get_group(0,0);
?>
<tr>
<?php  // print function and edit remove by willross
if ($print=="yes"){?>
<!-- column_right disabled for print //-->
<?php } else {?>
           <td colspan="5"><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
           </tr>

</table>                    </td>
                 </tr>
           </table></td>
       <!-- body_text //-->
<!-- body_text_eof //-->
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>

</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->

<?php }?>
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Then I made a another post at order editor - created myself as trade group, edit my order in admin and add new products with order editor - the newly added products pricing is still showing retail

The order editor admin settings - Use SPPC = true, and use ajax for update = true

 

Thank you for helping

Getting the Phoenix off the ground

Link to comment
Share on other sites

Hello,

 

I am having troubles combining SPPC 4.2.2 with Master Products 1.25. SPPC works great except on my slave products (the prices for the groups are not reflected). I searched this topic and saw that it's been done before. If it's possible, could anyone send me the edited files of these two contributions or maybe reply with some tips? It'd be so appreciated, I am very burned out right now and could use a break! :'(

 

Thanks so much,

 

Matt

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...