Re: Printable Price list :: support thread
Quote:
Originally Posted by
lat9
I've never used the product_cost_display plugin, so I don't know how easy/difficult it would be to add that column. In any case, what you are requesting is over-and-above the scope of "Printable Price List"; if you are interested in pursuing a custom-programming solution, please PM me.
OK, that wasn't too difficult. There are a couple of edits to be made.
First, /includes/modules/pages/pricelist/header_php.php, starting at line 52, make the highlighted additions:
Code:
$profile_settings = array (
array ('PL_GROUP_NAME', 'group_name', 'char'),
array ('PL_PROFILE_NAME', 'profile_name', 'char'),
array ('PL_USE_MASTER_CATS_ONLY', 'master_cats_only', 'bool'),
array ('PL_SHOW_BOXES', 'show_boxes', 'bool'),
array ('PL_CATEGORY_TREE_MAIN_CATS_ONLY', 'main_cats_only', 'bool'),
array ('PL_MAINCATS_NEW_PAGE', 'maincats_new_page', 'bool'),
array ('PL_NOWRAP', 'nowrap', 'bool'),
array ('PL_SHOW_MODEL', 'show_model', 'bool-col', 'p.products_model'),
array ('PL_SHOW_MANUFACTURER', 'show_manufacturer', 'bool-col', 'p.manufacturers_id'),
array ('PL_SHOW_WEIGHT', 'show_weight', 'bool-col', 'p.products_weight'),
array ('PL_SHOW_SOH', 'show_stock', 'bool-col', 'p.products_quantity'),
array ('PL_SHOW_NOTES_A', 'show_notes_a', 'bool-col'),
array ('PL_SHOW_NOTES_B', 'show_notes_b', 'bool-col'),
array ('PL_SHOW_PRICE', 'show_price', 'bool-col', 'p.products_price'),
array ('PL_SHOW_TAX_FREE', 'show_taxfree', 'bool-col', 'p.products_price'),
array ('PL_SHOW_SPECIAL_PRICE', 'show_special_price', 'bool'),
array ('PL_SHOW_SPECIAL_DATE', 'show_special_date', 'bool'),
array ('PL_SHOW_ADDTOCART_BUTTON', 'show_cart_button', 'bool-col'),
array ('PL_ADDTOCART_TARGET', 'add_cart_target', 'char'),
array ('PL_SHOW_IMAGE', 'show_image', 'bool', 'p.products_image'),
array ('PL_IMAGE_PRODUCT_HEIGHT', 'image_height', 'int'),
array ('PL_IMAGE_PRODUCT_WIDTH', 'image_width', 'int'),
array ('PL_SHOW_DESCRIPTION', 'show_description', 'bool'),
array ('PL_TRUNCATE_DESCRIPTION', 'truncate_desc', 'int'),
array ('PL_SHOW_INACTIVE', 'show_inactive', 'bool'),
array ('PL_SORT_PRODUCTS_BY', 'sort_by', 'char'),
array ('PL_SORT_ASC_DESC', 'sort_dir', 'char'),
array ('PL_DEBUG', 'debug', 'bool'),
array ('PL_HEADER_LOGO', 'show_logo', 'bool'),
array ('PL_SHOW_PRICELIST_PAGE_HEADERS', 'show_headers', 'bool'),
array ('PL_SHOW_PRICELIST_PAGE_FOOTERS', 'show_footers', 'bool'),
);
//-20160204-lat9-Add support for products_cost field *** 1 of 1 ***
global $sniffer;
if ($sniffer->field_exists (TABLE_PRODUCTS, 'products_cost')) {
define ('PL_SHOW_PRODUCT_COST_' . $this->current_profile, 'true');
$profile_settings[] = array ('PL_SHOW_PRODUCT_COST', 'show_cost', 'bool-col', 'p.products_cost');
}
//-20160204-lat9-Add support for products_cost field *** 1 of 1 ***
Next up, /includes/templates/template_default/pricelist/tpl_main_page.php. Two edits in this file, the first starting at line 139:
Code:
if ($price_list->config['show_notes_b']) {
?>
<td class="ntsPL"><div><?php echo TABLE_HEADING_NOTES_B; ?></div></td>
<?php
}
$pl_currency_symbol = (defined ('PL_INCLUDE_CURRENCY_SYMBOL') && PL_INCLUDE_CURRENCY_SYMBOL == 'false') ? '' : $price_list->currency_symbol;
//-bof-20160204-lat9-Add support for products_cost *** 1 of 2 ***
if ($price_list->config['show_cost']) {
?>
<td class="prcPL"><div><?php echo 'Cost ' . $pl_currency_symbol; ?></div></td>
<?php
}
//-eof-20160204-lat9-Add support for products_cost *** 1 of 2 ***
Next, find the start of the next block (around line 251 with the above addition):
Code:
if ($price_list->config['show_notes_b']) {
?>
<td class="ntsbPL"> </td>
<?php
}
$price_class = ($special_price_ex > 0) ? 'prcPL notSplPL' : 'prcPL';
//-bof-20160204-lat9-Add support for products_cost *** 2 of 2 ***
if ($price_list->config['show_cost']) {
?>
<td class="<?php echo $price_class; ?>"><?php echo $price_list->display_price ($current_row['products_cost']);; ?></td>
<?php
}
//-eof-20160204-lat9-Add support for products_cost *** 2 of 2 ***
if ($price_list->config['show_price']) {
?>
<td class="<?php echo $price_class; ?>"><?php echo $products_price_inc; ?></td>
<?php
}
The 'cost' column will appear to the left of the other product price-related columns.
Re: Printable Price list :: support thread
Believed to be missing from uninstall.sql
DELETE FROM configuration where configuration_key like 'TEXT_PL%';
Re: Printable Price list :: support thread
Quote:
Originally Posted by
swguy
Believed to be missing from uninstall.sql
DELETE FROM configuration where configuration_key like 'TEXT_PL%';
Shouldn't be necessary for the updated versions. There was (in versions prior to v2.0.0) a database value named TEXT_PL_HEADER_LOGO_*, but the current version's installation now renames those database constants to PL_HEADER_LOGO_*.
Re: Printable Price list :: support thread
It was needed on a 1.3.9 upgrade of an old cart. Got continual blank page in admin until I did this step.
Re: Printable Price list :: support thread
Quote:
Originally Posted by
swguy
It was needed on a 1.3.9 upgrade of an old cart. Got continual blank page in admin until I did this step.
... and what was the error associated with the blank page? How did you go about the upgrade? Did you upgrade this plugin or were you simply looking to remove the older version?
Re: Printable Price list :: support thread
I got a db error early on so I ran the uninstaller and then reinstalled. I don't have the log but it was a duplicate entry error.
Re: Printable Price list :: support thread
Oh, I see now. It's not that the configuration key(s) need to be added to the uninstaller, it's the installer that has issues.
Right now, the installer installs all the PPL keys and then checks for the presence of the old-named configuration value, renaming it if present (that's where the duplicate key message comes from). I need to move the check/rename to before where the individual price-list settings are created.
Re: Printable Price list :: support thread
Hi Have been looking through threads and can't find an answer. Using zc1.5.4 and installed this mod a few times but just getting a blank screen when I type in the url? Has anyone an idea what is happening here thanks guys
Re: Printable Price list :: support thread
When you get a "blank screen", that's Zen Cart's way of letting you know that there's a myDEBUG*.log file waiting in your /logs folder to identify the source of that issue.
Re: Printable Price list :: support thread
Thank you to the creators and those responsible for continuing this add on. I've been using it from nearly it's beginning. I recently updated from ZC 1.39 to the latest ZC and then found that I needed to also update the version of the Printable Pricelist I had been using. The new version installed without any issues and worked right out of the box.
My reason for posting this was that I've always wanted to be able to have a profile for either featured or special items. I'd like visitors to be able to print out a listing of all the products that are currently on special or be able to use that as a sales flyer.
Is it possible to do with the current version or is this perhaps a feature we can look forward to in the future?