Page 1 of 1

ShopMadeSimple new development is comming

Posted: Thu Dec 24, 2009 8:10 pm
by cms_man
Dear Users  I will try to  fix the bugs in ShopMadeSimple. I need the module  for a client of mine.  Expect updates soon.

I am not a senior programmer. so don't expect the best possible solution, but it will work.

I will post the  new code here. Please  feel free to improve it as best as you can and post it back.


Let's make it work!

Here is the first fix. Most  PHP configuration does not have exif_imagetype() complied.

  function not found exif_imagetype()

Here is the  work around for this function


Replace the  switch on line 207 in ShopMadeSimple.php

switch(exif_imagetype($sourcedir.'/'.$image)) .......

With :

Code: Select all

list($width, $height, $type, $attr) = getimagesize($sourcedir.'/'.$image);

//  Type  of image will be  determine 
//1 = GIF	5 = PSD	9 = JPC	13 = SWC
//2 = JPG	6 = BMP	10 = JP2	14 = IFF
//3 = PNG	7 = TIFF(intel byte order)	11 = JPX	15 = WBMP
//4 = SWF	8 = TIFF(motorola byte order)	12 = JB2	16 = XBM

                    if ($type == 1)
		{$srcimg = imagecreatefromgif($sourcedir.'/'.$image);}
	elseif 
		($type == 2)   {$srcimg = imagecreatefromjpeg($sourcedir.'/'.$image);}
          elseif 
  		($type == 3 )  {$srcimg = imagecreatefrompng($sourcedir.'/'.$image);}

Re: ShopMadeSimple new development is comming

Posted: Fri Dec 25, 2009 12:29 pm
by Andiministrator
Sounds great. Did you try to join the developers team of the module?

Re: ShopMadeSimple new development is comming

Posted: Fri Dec 25, 2009 5:40 pm
by Duketown
cms_man,

I appreciate that you would like to help out!
However I do have '// Change to named directory' on line 207. Line 175 contains what you mention. Do you work on the latest version?
What is the function of list? It is not used anywhere in the source.
How do I know the solution works in all situations?

Regards,

Duketown

Re: ShopMadeSimple new development is comming

Posted: Sat Dec 26, 2009 2:11 am
by cms_man
Hi Duketown,

I really appreciate all of the work you guys have done to this module.  Yes  I am using your last revision 0.2.6.
Well  exif_imagetype  is  a nice  function , but  it appears that most of the PHP compilations does not have that included , so it gives an error when upload image.  On the other hand  getimagesize() is doing the same thing , but is a bit slow than
exif_imagetype.  

"When a correct signature is found, the appropriate constant value will be returned otherwise the return value is FALSE. The return value is the same value that getimagesize() returns in index 2 but exif_imagetype() is much faster."
see more  at:   http://php.net/manual/en/function.exif-imagetype.php


Duketown  I will  try to  offer the best solution based on my knowledge. I am also count on all of you  to help with suggestions to improve the posted  code, like I said  I am not a senior programmer , but I Need  the module working  for a client of mine very soon.  And I see many other folks are needing the module too.

This is  the best simple  e-comers module so far.   I 'd like to make an integration (an option in Settings) between  Cart Made Simple and NMS when somebody fill up the  billing in Add to Cart module  on check out their email and name will be  added to NMS for featured  newsletters.

The  code I have  provided in my previous post  fixed the  creation of  thumbnails with th_ at the  front.

Here is another nice  addition  to the  module  (Fancy pop up  box option on every thumbnail when you open a category) :

action.fe_product_list.php  on line  278  add

Code: Select all


 // creates the original path to the image 
$onerow->original_prodimage =  $config['root_url'].'/uploads/images'.$pathproduct.$picture['image'];
// reads from images table to print image decs in alt tag and title 
$onerow->image_descr = $picture ['description'];


1. Isntall JQueryTools module  and add  {JQueryTools action=incjs} to your Template in the HEAD section

2. Then  go to Templates- > Category & Products template  and add:



{literal}
jQuery(document).ready(function() {
jQuery('.fancybox').fancybox();
});
{/literal}


3.In the same template  find  this line  

{if $prodimage!='*none'}  
{image src=$entry->prodimage alt=$entry->proddesc}


and replace with
 

Code: Select all

<a href="{$entry->$original_prodimage}" title="{$entry->image_descr}" class="fancybox" rel="album">{image src=$entry->prodimage alt=$entry->image_descr}</a>
Done !  now you  have  nice pop up  for every thumb in every category.

Duketown  let me know what do you  think. It is up to you whether or not  you are going to include those changes in the module. It is your  development after all.


Regards,

cms_man

Re: ShopMadeSimple new development is comming

Posted: Sat Dec 26, 2009 7:17 pm
by cms_man
Hi guys ,

Here is another fix for SMS.
When a category has been created and inside it  you create another subcategory and post products , the subcategory is not shown when you enter the main category. It  says  0 products found, it should display any subcategories and products at the same time

Example :  

Category:  Originals
   Subcategory of Originals  1:  Tropic flowers  -> product 1,  product 2 etc
   Subcategory of Originals   2:  Exotic  flowers  -> product 1,  product 2 etc

Find attached  action.fe_product_list.php  (backup your old file just in case if you want to reverse )

Change the  Category & Products  Template with this one :
(Note :  The posted   template has a modification for Fancy Box pop up as well as the  fix for subcategories )

Code: Select all

{* List of category data *}
<div ID="catlistheader">{$categoryname}</div>
{foreach from=$items item=entry}
  {if $entry->image!='*none'}
    <div class="catimagethumb">
       {image src=$entry->image alt=$entry->description} {$entry->name}
    </div>
  {else}
        <div class="catlistline">
            {$entry->name}
        </div>
  {/if}
{/foreach}

<table ID="catinfo">
	<tr>
		{if $image!='*none'}<td ID="catimagethumb">
			{image src=$image alt=$description}</td>
		{/if}
		<td class="catdescription">{$description}</td>
	</tr>
</table>
<div class="productlist">
<div ID="productcount">{$lable_product_count}</div>
<table>
	{foreach from=$products item=entry}
		<tr class="{$entry->rowclass}" onmouseover="this.className='{$entry->rowclass}hover';" onmouseout="this.className='{$entry->rowclass}';">
			<td class="productname">{$entry->prodname}</td>
			{* Use the following if you only want to show the name of product (no link):
			<td class="productname">{$entry->prodnamenolink}</td>
			*}
			<td class="productdesc">{$entry->proddesc|truncate}</td>
			<td class="productprice">{$entry->price}</td>
			<td>{$entry->addproduct}</td>
			
			{if $prodimage!='*none'}<td class="img">
		
<a href="{$entry->original_prodimage}" title="{$entry->image_descr}" class="fancybox" rel="album">{image src=$entry->prodimage alt=$entry->image_descr}</a>
												
				 </td>
				{* or use the following. The image is then a link to the detail page
				{$entry->prodimagelink}</td>
				*}
			{/if}
		</tr>
	{/foreach}
</table>
{if $pagecount > 1}
	{$firstpage} {$prevpage} {$pagetext}: {$pagenumber} {$oftext}: {$pagecount} {$nextpage} {$lastpage}
{/if} 
<div ID="productpricesin">{$currency}</div>
</div>

Re: ShopMadeSimple new development is comming

Posted: Tue Feb 02, 2010 10:34 pm
by cms_man
Hi  guys ,


I'd like to announce the new development and bug fixes for Shop Made Simple, Payment Made Simple ,Cart Made Simple are ready for download.

I have modified  CMSMS  a little bit to accommodate this  nice shopping cart system formed as a group button called E-Commerce .(see  screen shots at my site)

The are two modified files you can download and replace in LIB/Clasess and Admin

I did  style the appearance of the products and the templates according to my needs, but you can always customize them too.

I cannot post all  bugs that I have fixed, way too many.  I have added  new functionality to order products (Same as Gallery)
drag and drop then Save.

You can test the system on my site to see all functionality for the front end.

I guess there are many other things that can be improved.  Very soon I will add  new options to customize the products.

The options for products will be  defined by you according to the client needs. Let say they sell  clothing  and every Product need size and color and a different price for that, but in general is one product.

I'd like to thank the original builder Duketown for the initial development and the  hard labor.

I also would like to offer you customization of those module to your needs,  if you cannot do it by your self. My fees are very affordable. Use the contact form in my site and I will  give you a quote.


Here is the  download link   http://fast2000.net/e-commerce-solution.html

Please take a look at the original site where the modules has been used.

http://andrea.cmsdemo-online.com/reproductions.html

Please don't add item to   the shopping cart if you are not buying.  For  review use   my site http://fast2000.net/
   
Please post comments or bugs here.   

Greetings,

CMS_MAN 













 

Re: ShopMadeSimple new development is comming

Posted: Fri Feb 05, 2010 7:05 am
by vilkis
Hi,
Do you warn your customers that they can loose support in this forum if they will use hacked CMSMS and its modules?
vilkis

P.S. I like the separate menu for ecommerce in backend.

Re: ShopMadeSimple new development is comming

Posted: Fri Feb 05, 2010 3:38 pm
by tyman00
I will agree with Vilkis and expand on it a little

We will not (under any circumstance) support a hacked Core. I can think of very few situations where hacking the core to make a module work is necessary... so I am going to warn everyone that they should not implement that change and expect any Core support.

Making changes of the Module files is fine. Sharing them is fine... but you should work WITH the module developer to implement these changes instead of haphazardly spewing them out on the forum where someone will attempt to implement them. Then when your hacks don't work or they mess up other parts of the files trying to implement your hacks. Then they will go to Duketown and being the nice guy he is... he will try to fix the problem not knowing they attempted to use your hacks. After spending who knows how much time trying to figure out the problem he will find that it wasn't his code that caused the problem it was yours... instead of wasting his time trying to support code that wasn't his... he could have been improving on his many modules or spending time for himself having a beer. There is more to this than  most people realize.

I can appreciate you trying to contribute, I think it's awesome. But there is a better way to do it than throwing it out for unsuspecting users to use. Yes you are sharing your work... but you could also be sharing a boat load of work.

Re: ShopMadeSimple new development is comming

Posted: Sat Feb 06, 2010 6:48 pm
by cms_man
Guys ,

Thanks for the  review and the comments.  I wouldn't say I hacked the core just by adding a new button on the menu.
No one including dulketown will  get confused with my code if the modules open more neatly with their separate module menu.

I thing  as developer community  we should consider the option of having dedicated menu for e-commerce sites.
I'd like the websites I deliver to my clients to be user friendly and easy to use and organized.

There are way to many  items under Extensions.

I 'd like to make things more clear. This is not the commercial version that is going to be  used.  I will work with Duketown to release  modules working for everybody.

Tymann00  I understand your concern, but let me tell you. What  I did is fixing bugs in the modules, so  there is nothing wrong with that.  Plus there are some more new features that were necessary like  crumb path on every product page.

I just wanted to offer solution that works  that's all . If somebody wants to use it to be my guest.

It is  the first time I am trying to contribute to this nice  Open Source CMS so please excuse me if  I don't follow  certain guidelines defined by the community.

Greeting to you all,

cms_man