Jump to content



Latest News: (loading..)

* * * * * 1 votes

ADD-ON : Dynamic Template System for OsCommerce 2.3.x


  • Please log in to reply
50 replies to this topic

#21   MHWD

MHWD
  • Members
  • 11 posts
  • Real Name:Mark

Posted 23 January 2011 - 05:13 AM

First this is a great contribution, second I got one small problem and it just is not coming to me on what I did wrong.

BOX_HEADING_CONFIGURATION

    * BOX_CONFIGURATION_ADMINISTRATORS
    * BOX_CONFIGURATION_STORE_LOGO
    * My Store
    * Minimum Values
    * Maximum Values
    * Images
    * Customer Details
    * Shipping/Packaging
    * Product Listing
    * Stock
    * Logging
    * Cache
    * E-Mail Options
    * Download
    * GZip Compression
    * Sessions
    * Seo Urls 5
    * KissMT Meta Tags

BOX_HEADING_CATALOG

    * BOX_CATALOG_CATEGORIES_PRODUCTS
    * BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES
    * BOX_CATALOG_MANUFACTURERS
    * BOX_CATALOG_REVIEWS
    * BOX_CATALOG_SPECIALS
    * BOX_CATALOG_PRODUCTS_EXPECTED
    * BOX_CATALOG_DISCOUNT_COUPONS

BOX_HEADING_MODULES

    * Action Recorder
    * Boxes
    * Dashboard
    * Header Tags
    * Order Total
    * Payment
    * Shipping
    * Social Bookmarks

BOX_HEADING_CUSTOMERS

    * BOX_CUSTOMERS_CUSTOMERS
    * BOX_CUSTOMERS_ORDERS


BOX_HEADING_LOCALIZATION

    * BOX_LOCALIZATION_CURRENCIES
    * BOX_LOCALIZATION_LANGUAGES
    * BOX_LOCALIZATION_ORDERS_STATUS

BOX_HEADING_REPORTS

    * BOX_REPORTS_PRODUCTS_VIEWED
    * BOX_REPORTS_PRODUCTS_PURCHASED
    * BOX_REPORTS_ORDERS_TOTAL
    * BOX_REPORTS_DISCOUNT_COUPONS
    * BOX_REPORTS_SUPERTRACKER



As you can see On almost all the boxes it has the BOX_XXXX added to the front of all entries, but what throws me is in the config listing it does it for heading and first two but rest are displayed correctly.  Also the module heading is messed up but not that listing but everything else is... Catalog side seems fine.

Any ideas on what I should be looking at?

Thank You

<<Took out a couple of the boxes to shorten the post a bit>>

Edited by MHWD, 23 January 2011 - 05:14 AM.


#22   MHWD

MHWD
  • Members
  • 11 posts
  • Real Name:Mark

Posted 29 January 2011 - 04:41 AM

View PostMHWD, on 23 January 2011 - 05:13 AM, said:

First this is a great contribution, second I got one small problem and it just is not coming to me on what I did wrong.

BOX_HEADING_CONFIGURATION

    * BOX_CONFIGURATION_ADMINISTRATORS
    * BOX_CONFIGURATION_STORE_LOGO
    * My Store
    * Minimum Values
    * Maximum Values
    * Images
    * Customer Details
    * Shipping/Packaging
    * Product Listing
    * Stock
    * Logging
    * Cache
    * E-Mail Options
    * Download
    * GZip Compression
    * Sessions
    * Seo Urls 5
    * KissMT Meta Tags

BOX_HEADING_CATALOG

    * BOX_CATALOG_CATEGORIES_PRODUCTS
    * BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES
    * BOX_CATALOG_MANUFACTURERS
    * BOX_CATALOG_REVIEWS
    * BOX_CATALOG_SPECIALS
    * BOX_CATALOG_PRODUCTS_EXPECTED
    * BOX_CATALOG_DISCOUNT_COUPONS

BOX_HEADING_MODULES

    * Action Recorder
    * Boxes
    * Dashboard
    * Header Tags
    * Order Total
    * Payment
    * Shipping
    * Social Bookmarks

BOX_HEADING_CUSTOMERS

    * BOX_CUSTOMERS_CUSTOMERS
    * BOX_CUSTOMERS_ORDERS


BOX_HEADING_LOCALIZATION

    * BOX_LOCALIZATION_CURRENCIES
    * BOX_LOCALIZATION_LANGUAGES
    * BOX_LOCALIZATION_ORDERS_STATUS

BOX_HEADING_REPORTS

    * BOX_REPORTS_PRODUCTS_VIEWED
    * BOX_REPORTS_PRODUCTS_PURCHASED
    * BOX_REPORTS_ORDERS_TOTAL
    * BOX_REPORTS_DISCOUNT_COUPONS
    * BOX_REPORTS_SUPERTRACKER



As you can see On almost all the boxes it has the BOX_XXXX added to the front of all entries, but what throws me is in the config listing it does it for heading and first two but rest are displayed correctly.  Also the module heading is messed up but not that listing but everything else is... Catalog side seems fine.

Any ideas on what I should be looking at?

Thank You

<<Took out a couple of the boxes to shorten the post a bit>>


BTW.. no idea, but working great now - forgot about this and wanted to follow up real quick

#23   Gergely

Gergely
  • Community Team
  • 533 posts
  • Real Name:Gergely Tóth
  • Gender:Male

Posted 11 February 2011 - 11:16 AM

View Postfoxp2, on 18 December 2010 - 12:05 AM, said:


Perfect :thumbsup: thanks a lot.
Header Footer Content Modules
SCM
v3

and some rewrites :-)

#24   JohnAtYM

JohnAtYM
  • Members
  • 66 posts
  • Real Name:John Ferguson
  • Gender:Male
  • Location:sarf Landin

Posted 21 February 2011 - 03:42 PM

I imagine I must have messed up the install somewhere as this works for plenty of other people, but I've tried several times now, including rebuilding a fresh osc install from which to start, so now I'm going to have to roll up my sleeves and start reading through the code to work out what. I'm using the Dynamic Template System V2 EN download.

There seems to be a problem with the configuration variable setting for the boxes:
- after the initial install, the variables blah_blah_DISPLAY_PAGES are all set to 'all' and the boxes display as you would expect
- if I change eg. Specials so as not to display, the variable now shows as 'Array' and the box is not displayed
- when I change back to display on all pages, the variable still shows as 'Array' and the box is still not displayed
- going back into the settings page after the previous step and the all pages radio button is not selected
- selecting any of the individual page check flags does not persist either when you save and go back into this panel

I tried this with a couple of other boxes with the same results so I gather it's not an individual box file but common function/template problem, that's where I'll start anyway...
Currently working for clients on: 2.3 implementation, migration to 2.3 from 2.2, development on 2.2 & 2.3
2.3 add-ons installed: Quick UK Localisation, Modular Front Page, Dynamic Template System, Separate Price Per Customers, Hide Products for SPPC, Theme Switcher, Extra Product Fields, Ultimate SEO URLs
In development: osc facebook app for 2.3, eBay XML API for 2.3 - Like to see/would collaborate in: Googlecheckout for 2.3

#25   JohnAtYM

JohnAtYM
  • Members
  • 66 posts
  • Real Name:John Ferguson
  • Gender:Male
  • Location:sarf Landin

Posted 22 February 2011 - 05:20 PM

Further to the above - still baffled... I can see how the config set function tep_cfg_select_pages unpacks the variable [block]_DISPLAY_PAGES into an array of selects on the admin panel, but it looks to me that this array goes straight into the config table via the save action in admin/modules.php without being imploded.

I can't see another version of this file in any of the other versions of the package, so I gather that it's not as simple as a missing file. What am I missing?

thanks in advance...
Currently working for clients on: 2.3 implementation, migration to 2.3 from 2.2, development on 2.2 & 2.3
2.3 add-ons installed: Quick UK Localisation, Modular Front Page, Dynamic Template System, Separate Price Per Customers, Hide Products for SPPC, Theme Switcher, Extra Product Fields, Ultimate SEO URLs
In development: osc facebook app for 2.3, eBay XML API for 2.3 - Like to see/would collaborate in: Googlecheckout for 2.3

#26   JohnAtYM

JohnAtYM
  • Members
  • 66 posts
  • Real Name:John Ferguson
  • Gender:Male
  • Location:sarf Landin

Posted 23 February 2011 - 09:46 AM

OK what I'm missing are the changes to files admin/modules.php and english.php both of which are still missing from all versions/variants of the package up to 2.

What you need to do to resolve is apply steps 3 & 4 of the manual installation instructions.

Hope it takes others less time to sort this out.

Edited by JohnAtYM, 23 February 2011 - 09:46 AM.

Currently working for clients on: 2.3 implementation, migration to 2.3 from 2.2, development on 2.2 & 2.3
2.3 add-ons installed: Quick UK Localisation, Modular Front Page, Dynamic Template System, Separate Price Per Customers, Hide Products for SPPC, Theme Switcher, Extra Product Fields, Ultimate SEO URLs
In development: osc facebook app for 2.3, eBay XML API for 2.3 - Like to see/would collaborate in: Googlecheckout for 2.3

#27   EPStore

EPStore
  • Members
  • 51 posts
  • Real Name:TK
  • Gender:Male

Posted 09 March 2011 - 08:25 PM

Loving this contribution! I installed it and it works perfect. So, a big thanks goes to foxp2 (and also to JohnAtYM for pointing out that contrib to me)...
Now, there's just a little problem I got following the install, and I'm sure someone here will be able to help me.
It's concerning the layout of my boxes... With the installation of this contribution, my Categories box went from being controlled by .infoBoxContents li in my CSS sheet to .infoBoxContents
If that bothers me so much, why don't I just change the font/line-height/weight/etc. directly in .infoBoxContents? Well, simply because this particular box doesn't have the same layout as the others.
So, I guess my question might be summed up by: how to revert my Categories box back to .infoBoxContents li ?
Sorry for the stupid question. I don't know much about CSS  :)

#28   JohnAtYM

JohnAtYM
  • Members
  • 66 posts
  • Real Name:John Ferguson
  • Gender:Male
  • Location:sarf Landin

Posted 22 March 2011 - 09:41 AM

View PostEPStore, on 09 March 2011 - 08:25 PM, said:

Loving this contribution! I installed it and it works perfect. So, a big thanks goes to foxp2 (and also to JohnAtYM for pointing out that contrib to me)...
Now, there's just a little problem I got following the install, and I'm sure someone here will be able to help me.
It's concerning the layout of my boxes... With the installation of this contribution, my Categories box went from being controlled by .infoBoxContents li in my CSS sheet to .infoBoxContents
If that bothers me so much, why don't I just change the font/line-height/weight/etc. directly in .infoBoxContents? Well, simply because this particular box doesn't have the same layout as the others.
So, I guess my question might be summed up by: how to revert my Categories box back to .infoBoxContents li ?
Sorry for the stupid question. I don't know much about CSS  :)

I guess you were using a different version of bm_categories than the one supplied with this contrib. Get the one you had before and amend it to work with the contrib by following the instructions in this post.
Currently working for clients on: 2.3 implementation, migration to 2.3 from 2.2, development on 2.2 & 2.3
2.3 add-ons installed: Quick UK Localisation, Modular Front Page, Dynamic Template System, Separate Price Per Customers, Hide Products for SPPC, Theme Switcher, Extra Product Fields, Ultimate SEO URLs
In development: osc facebook app for 2.3, eBay XML API for 2.3 - Like to see/would collaborate in: Googlecheckout for 2.3

#29   kuolung1

kuolung1
  • Members
  • 8 posts
  • Real Name:Kuolung Lin

Posted 22 March 2011 - 12:55 PM

Hi , I want use it on my site , but my site in tchinese , how do i do can use it on difference language

#30   Gergely

Gergely
  • Community Team
  • 533 posts
  • Real Name:Gergely Tóth
  • Gender:Male

Posted 31 May 2011 - 07:25 PM

Hi,

I suggest to use "template_top.php" for search templated files. Other files are not following oscommerce v2.3.1 standards.

In admin/includes/function/general.php

change:

  function tep_list_catalog_files () {
	$d = dir(DIR_FS_CATALOG);
	$result = array();   
	$exclude = array('redirect.php', 'popup_search_help.php', 'popup_image.php', 'opensearch.php', 'info_shopping_cart.php', 'download.php', 'checkout_process.php');
  	while (false !== ($file = $d->read())) {
		if($file != '.' && $file != '..' && !is_dir($file) && (substr($file, -3, 3) == 'php') && !in_array($file, $exclude)) {  
			$result[] = $file;
		}
	}	
	$d->close();	
	return $result;
  }

to:

  function tep_list_catalog_files () {
	$result = array(); 
	$exclude = array('redirect.php', 'popup_search_help.php', 'popup_image.php', 'opensearch.php', 'info_shopping_cart.php', 'download.php', 'checkout_process.php');
	if ($handle = opendir(DIR_FS_CATALOG)) {
  	while ($file = readdir($handle)) {
		if(!is_dir($file) && (strtolower(substr($file, -4, 4)) === ".php") && (!in_array($file ,$exclude)) && (IsTemplateFile(DIR_FS_CATALOG.$file))) {
	  	$result[] = $file;
		}
  	}
  	closedir($handle);
	}
	return $result;
  }

  function IsTemplateFile($file) {
	$fp = file($file);
	for ($idx = 0; $idx < count($fp); ++$idx) {
  	if (!(strpos($fp[$idx], "template_top.php") === FALSE))
		return true;
	}  
	return false;
  }

The exclude parameters not the best here, but you can edit. The similar original sources founded in the old dynamic sitemap addons.


Regards,
Gergely
Header Footer Content Modules
SCM
v3

and some rewrites :-)

#31   Gergely

Gergely
  • Community Team
  • 533 posts
  • Real Name:Gergely Tóth
  • Gender:Male

Posted 31 May 2011 - 07:50 PM

View Postburt, on 17 January 2011 - 01:49 PM, said:

Just a quick change to make it easier to select all pages but then remove one or tow (eg have a box on all pages except index) - haven't tested fully, but might give you an idea;

admin/includes/functions/general.php

Add:
$string .= '<input type="checkbox" class="check_all" name="check_all" />' . CHECK_ALL . '<br /><br />';

After:
$string .= '<br /><strong>&nbsp;&nbsp;' . ONE_BY_ONE . '</strong><br /><br />';

Add:
$('.check_all').click(function () {
  $(this).parents('fieldset:eq(0)').find(':checkbox').attr('checked', this.checked);
  $('.AnyPages').attr('checked', false);
  $('.AllPages').attr('checked', false);
});

After:
jQuery(document).ready(function () {

admin/includes/languages/english.php

Add:
define('CHECK_ALL', 'Quick (Un)Tick');

No doubt you can refine this if you see fit.

Hi burt,

thanks for good tip. For errors free need to change:
	if($key_value === 'null') { $checkall = "UNCHECKED"; $checkany = "CHECKED";}
	if($key_value === 'all') { $checkall = "CHECKED"; $checkany = "UNCHECKED";}

to:
	if($key_value === 'null') { $checkall = "UNCHECKED"; $checkany = "CHECKED";} else { $checkall = "CHECKED"; $checkany = "UNCHECKED";}
	if($key_value === 'all') { $checkall = "CHECKED"; $checkany = "UNCHECKED";} else { $checkall = "UNCHECKED"; $checkany = "CHECKED";}


Regards,
Gergely
Header Footer Content Modules
SCM
v3

and some rewrites :-)

#32   scranson

scranson
  • Members
  • 36 posts
  • Real Name:Steve Cranson
  • Gender:Male

Posted 29 June 2011 - 06:07 PM

Great contribution. I'm running into a problem when I remove or install box modules. This is the error message I'm getting:

Warning: Cannot modify header information - headers already sent by (output started at /home/.../oscommerce/includes/modules/boxes/bm_languages.php:117) in /home/.../oscommerce/admin/includes/functions/general.php on line 36

Line 36 is     header('Location: ' . $url);
as part of the tep_redirect($url) function.

Line 117 of bm_languages.php is the last line and is blank.

I've double checked all modifications. Can any point me in the right direction to eliminating this problem.

#33   ElaineEnriquezBloch

ElaineEnriquezBloch
  • Members
  • 11 posts

Posted 21 July 2011 - 01:14 PM

with regards to http://addons.oscommerce.com/info/7691

dynamic template system...after finishing istallation (installed on oscommerce v2.0) there is no appearance of whatever icon referring to this box. i got an error in

admin/includes/functions/general.php on line 19

which says;

Warning: file(/home/u078722798/public_html/includes/version.php) [function.file]: failed to open stream: No such file or directory in /home/u078722798/public_html/admin/includes/functions/general.php on line 19

Warning: implode() [function.implode]: Invalid arguments passed in /home/u078722798/public_html/admin/includes/functions/general.php on line 19

i opened the file itself and this is what is written there:

if (!isset($v)) {19.      $v = trim(implode('', file(DIR_FS_CATALOG . 'includes/version.php')));


how could i solve this?

#34   xtjie

xtjie
  • Members
  • 3 posts
  • Real Name:xingtongjie

Posted 02 September 2011 - 08:59 AM

Very Very Good,Great contribution.

#35   32 Degrees

32 Degrees
  • Members
  • 229 posts
  • Real Name:Ryan
  • Gender:Male
  • Location:California, USA

Posted 07 February 2012 - 10:53 PM

foxp,

Thank-you for your contribution. I recently purchased a template from TemplateMonster and the template author included your contribution in his design. I wanted to bring to your attention a compatibility issue with this contribution and other essential contributions. Specifically, the shipping modules USPS and UPS for v2.3.1 as they stand alter the admin/modules.php to allow comma de-limited saving with checkboxes. This is problematic because either the shipping options save or the boxes options save. Could you please provide alternative instructions for overall compatibility for myself and others?

Thanks

- Ryan

#36   32 Degrees

32 Degrees
  • Members
  • 229 posts
  • Real Name:Ryan
  • Gender:Male
  • Location:California, USA

Posted 08 February 2012 - 01:48 AM

IF... You are having troubles incorporating USPS and UPS within a shop using the Dynamic Template System these changes may solve your problem. They solved maybe they can solve yours?

admin/modules.php

FIND:
case 'save':
		reset($HTTP_POST_VARS['configuration']);
		while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) {
		// bof Dynamic Template System			
		  if((is_array($value)) && (!empty($value))){
		  $pages = '';
		  $count = count($value);
		  for($i=0 ; $i<$count; $i++){
		  $pages = "$pages$value[$i]";
		  tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $pages . "' where configuration_key = '" . $key . "'");
			   }
		  }
		// eof Dynamic Template System
		  else
		  {		
		  tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'");
		  }
		}
		tep_redirect(tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $HTTP_GET_VARS['module']));
		break;

REPLACE:
case 'save':
		reset($HTTP_POST_VARS['configuration']);
	foreach($_POST['configuration'] as $key => $value) {		
		   // Dynamic Template System  
	 if((is_array($value)) && (!empty($value))) {
			  if (isset($set) && $set == "boxes") {
	   $pages = '';
	   $count = count($value);
	   for($i=0 ; $i<$count; $i++) {
		$pages = "$pages$value[$i]";
		tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $pages . "' where configuration_key = '" . $key . "'");
	   }
	  } else {
	   // USPS
	   $value = implode( ", ", $value);
	   tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'");
	  }
	 } else {
	  tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'");
	 }
	}
		tep_redirect(tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $HTTP_GET_VARS['module']));
		break;

FIND:
$contents[] = array('text' =>  $file);

REPLACE:
$contents[] = array('text' => '<br />' . preg_replace(array('/RM/', '/TM/', '/International/', '/Envelope/'), array('&reg;', '&trade;', 'Int\'l', 'Env'), $file)); // Modified for USPS

Good luck@

#37   foxp2

foxp2

    strong as a Twig

  • Members
  • 303 posts
  • Real Name:Laurent
  • Gender:Male
  • Location:France

Posted 12 February 2012 - 12:08 PM

@Gergely
@32 Degrees

you are allowed to upload to this package : http://addons.oscommerce.com/info/7691/v,23
-------------------

#38   vampirehunter

vampirehunter
  • Members
  • 274 posts
  • Real Name:vampire

Posted 07 August 2012 - 11:52 AM

hi. does this module automatically remove a column if no boxes are selected for a specific page?

for example, on most of the pages, i would like to keep the left column only, but for home page and product info page, no columns at all.

is this plugin automatically resizing the bodycontent div class value?

so that if on homepage, i have no left column, automatically the div fills the whole width and im not left with white space?

let me know, thanks

#39   vampirehunter

vampirehunter
  • Members
  • 274 posts
  • Real Name:vampire

Posted 09 August 2012 - 09:20 AM

This contribution is one of the best ive ever seen, incredible work.

For a custom homepage, simply install the dynamic template system.

then follow the instructions in this contribution (all done by foxp2)

http://addons.oscommerce.com/info/8517

#40   pammydee

pammydee
  • Members
  • 12 posts
  • Real Name:pam driskell

Posted 20 September 2012 - 04:41 PM

Please HELP!  I originally posted my issue here:  http://forums.oscommerce.com/topic/389379-help-with-dynamic-template-system-by-foxp2/

I tried to copy/paste the post here but received oscommerce server error!

For what it is worth, it seems that the DTS system is installed, I see the options available in admin-modular-boxes, however, obviously can't utilize anything as I am unable to see my store.

Thank You for any help!!

Pam