Jump to content

[Solved] Shop fertig - Theme zum Download !


Recommended Posts

Hallo

Ich hab mein Prestashop online gestellt - Audictive Shop

Da ich viel Hilfe aus dem ganzen Wissen der Foren gezogen haben, würde ich der Community gerne etwas zurück geben und habe deshalb ein Zip mit allen relavaten Dateien meines Themes inkl. php Änderungen erstellt

Ihr könnt es unter Nerdstuff auf der Audictive Homepage herunter laden.


Hier noch das Howto:


Audictive Theme for Prestashop

designed for Prestashop 1.4.2.5

!! BE AWARE !!
This is more than a normal themes, you have to change some (very few) files outside the theme folder!
!! THIS WILL AFFECT THE LOOK OF YOUR OTHER THEMES !!

So you better try this to a fresh install of prestashop, but you can share the existing datebase.


A very big "thank you" to the whole prestashop team. Damn good job guys !

***If you like this and use it, please link to http://audictive.com somewhere ****



Before you changing anythiny, go to your existing Prestashop installation - if you have one - and:

   Backoffice: Tools > DB Backup > create new backup      Afterwards download the file!
   Backoffice: Tools > Translations >    Export a language    Download ALL your languages !

If you want to be really shure, you can't mess up your existing prestashop, install a fresh php database and import you database backup    



Then FTP to your webspace and here you go !

Copy these files to your new prestashop directory:                

/YOUR_ADMIN-Directory/tabs/AdminOrders.php    
/classes/Order.php                                
/classes/Tools.php                             
/classes/PaymentModule.php                    
/classes/PDF.php                            
/css/jquery.fancybox-1.3.4.css             
/css/jquery.autocomplete.css                
/img/admin/delete_alt.gif                    
/js/jquery/jquery.fancybox-1.3.4.js          copy or line 1123:     inside
/mails/                                        
/modules/bankwire/payment.php                
/modules/blocklanguage/blocklanguaes.php    
/modules/blockuserinfo/blockuserinfo.php     
/modules/mailalerts/mails                    
/modules/blocknewsletter/mails                   
/themes/audictivetheme                          


Then log into the Backoffice and change the Images sizes 

Backoffice -> Preferrences -> Images:

   1     small             45 px     45 px    
   2     medium             80 px     80 px    
   3     large             280 px     280 px    
   4     thickbox         1200 px 1000 px    
   5     category         598 px     138 px    
   6     home             129 px     129 px    
   7     large_scene     556 px     200 px    
   8     thumb_scene     161 px     58 px    
   9     SubcatThumbs    261 px     100 px          Add this one if you want the AudictiveTheme subcat-thumbnail size. if you don't, forget about it.


> Logo in shop

you'll have to change
/themes/AudictiveTheme/css/modules/blockadvertising/blockadvertising.css       
to fit your needs


> Logo in mails

This is a real pain, you have to change every single html template.

You can do this via:
Backoffice > Tools > Translations > Modify translations > Mails translation
Here you can edit the html-mail template. In the editor options, hit the html button.

It's faster to do it via FTP and edit the .html files in the /mails/ directory
In every mail you want to use, you have to change:
line 7:    to fit your logo size

line 10: for this margin-left, take the width of your logo and add 43px to it



> Vouchers, shipping costs prices,etc...

I don't use a lot of possible stuff in the Audictive Theme, so I delete some of the code from the .tpl files. 
If you want to use a "missing feature", you have look into the prestashop default theme, 
compare the corresponding tpl files an add the missing code to the files in AudictiveTheme - Folder

################
PHP Changes:
###############

##################
- Delete orders in admin tab

/YOUR_admin_DIR/tabs/AdminOrders.php
after line 37:     $this->colorOnBackground = true; 
add   line 38:    $this->delete = true;

Link to comment
Share on other sites

################
PHP Changes:
###############

- Order summary on payment pages:

/classes/Order.php    
add:    static public function createSummary()
   {
       global $smarty, $cart;

       if (file_exists(_PS_SHIP_IMG_DIR_.intval($cart->id_carrier).'.jpg'))
           $smarty->assign('carrierPicture', 1);
       $summary = $cart->getSummaryDetails();
       $customizedDatas = Product::getAllCustomizedDatas(intval($cart->id));
       Product::addCustomizationPrice($summary['products'], $customizedDatas);

       if ($free_ship = intval(Configuration::get('PS_SHIPPING_FREE_PRICE')))
       {
           $discounts = $cart->getDiscounts();
           $total_free_ship =  $free_ship - ($summary['total_products_wt'] + $summary['total_discounts']);
           foreach ($discounts as $discount)
               if ($discount['id_discount_type'] == 3)
               {
                   $total_free_ship = 0;
                   break ;
               }
           $smarty->assign('free_ship', $total_free_ship);
       }
       $smarty->assign($summary);
       $token = Tools::getToken(false);
       $smarty->assign(array(
           'token_cart' => $token,
           'voucherAllowed' => Configuration::get('PS_VOUCHERS'),
           'HOOK_SHOPPING_CART' => Module::hookExec('shoppingCart', $summary),
           'HOOK_SHOPPING_CART_EXTRA' => Module::hookExec('shoppingCartExtra', $summary),
           'shippingCost' => $cart->getOrderTotal(true, 5),
           'customizedDatas' => $customizedDatas,
           'CUSTOMIZE_FILE' => _CUSTOMIZE_FILE_,
           'CUSTOMIZE_TEXTFIELD' => _CUSTOMIZE_TEXTFIELD_,
           'lastProductAdded' => $cart->getLastProduct()
           ));
       Tools::safePostVars();
   } 

modules/bankwire/payment.php    
line 38 add:        Order::createSummary();     


###############################
- Change currency display to german style [currency format: 4.000,65 € ] :    

/classes/tools.php            
line 351:              change ".", "," to ",", "."  

- change date display to german style:

/classes/tools.php    

line 433:         if ($language AND strtolower($language['iso_code']) == 'de')
            return ($tmpTab[2].'.'.$tmpTab[1].'.'.$tmpTab[0].($full ? $hour : ''));

###############################
- Show total tax in order confirmation email and change style of product list in email:

/classes/PaymentModule.php    
change line 276 to 278:    
'.$product['name'].'
'.(isset($product['attributes_small']) ? ' '.$product['attributes_small'] : '').'
add in line 374: $total_tax = $order->total_products_wt - $order->total_products;
change line 423:    '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $currency, false, false),
                   '{total_tax}' => Tools::displayPrice($total_tax, $currency, false, false));                                    



#################################                    
- Hook block userinfo to right column:                    

/modules/blockuserinfo/blockuserinfo.php
insert line 73:     public function hookRightColumn($params)
                   {
                       return $this->hookTop($params);
                   }                    


#################################                    
- Hook block languages to left column:

/modules/blocklanguages/blocklanguages.php
insert line 66:        public function hookLeftColumn($params)
                   {
                       return $this->hookTop($params);
                   }    


Link to comment
Share on other sites

  • 4 weeks later...

Thanks !

I also speak english, maybe that's easier for you ?

The tabs in product page are done automatic, if you assign some "features" to your products in backend - catalog.
The comments are done via the "Product Comments v2.1" modul. You should find this in "Front Office Features" in your modul page in the backend.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...