Jump to content

tony_mik

Members
  • Posts

    31
  • Joined

  • Last visited

Profile Information

  • Location
    Romania
  • Activity
    Other

Recent Profile Visitors

390 profile views

tony_mik's Achievements

Newbie

Newbie (1/14)

6

Reputation

  1. Thank you #nuno.note; this solved my problem. For anybody else having trouble with payment registering multiple times use this solution: Go in Admin -> Order -> Statuses and check for the Default order status (usually "Processing") and untick the mark as paid option. Worked for me
  2. The function is a Prestashop function. To use PS functions, you call like this: include_once 'config/config.inc.php'; include(dirname(__FILE__).'/init.php');
  3. Well, you must include certain files in order to be able to access the functions. I use something like this: include_once '../config/config.inc.php'; include(dirname(__FILE__).'/init.php'); ini_set('display_errors',1); error_reporting(E_ALL & ~E_NOTICE); $defaultLanguage = new Language((int)(Configuration::get('PS_LANG_DEFAULT'))); $languages = Language::getLanguages(); $lang_id = $defaultLanguage->id;
  4. Hello. How can I remove the social title (gender) selection in the registration in Prestashop 1.7. I used to remove that from the .TPL files in Prestashop 1.6 but I can't seem to find the right file in this new version. A little help please Regards, Toni
  5. Nu poti comanda fara adresa de email, pentru ca acolo se trimite statusul comenzii. In schimb, pot fi salvate datele fara creare cont din Preferinte/Comenzi/Activeaza comanda cu cont temporar Asta va permite clientului sa treaca toate datele dar fara a le salva si a crea cont.
  6. You should use Prestashop functions at all time - I found out that the hard way. For that, you must create a PHP file, inside which you put a function that takes all the products from your store, goes through every single one and updates the stock order option you want.
  7. To those who can't display the breadcrumb with this method, you should check out the structure with inspect. In the theme I was using I had a line that was hiding the breadcrumb so I had some "angry time" I ended up including the breadcrumb.tpl file where I needed it, but it was a very nice "hack" and I learned from it. Thanks Stan!
  8. Have you guys tried out the Shopping Cart Rule option? All you have to do is create a Cart Price Rule in which you can select certain products and set the Free Delivery option; that way you don't have to modify all the products, just add some new ones, or even better, create a category that is called Free Delivery and associate the products you want to that, and in the price rule select the option that specifies all product from that category and BOOM, you are done Hope this helps - for future reference at least
  9. Hi all. You could use this function example: <?php function deny_order() { include_once '../config/config.inc.php'; include(dirname(__FILE__).'/init.php'); ini_set('display_errors',0); error_reporting(E_ALL & ~E_NOTICE); $defaultLanguage = new Language((int)(Configuration::get('PS_LANG_DEFAULT'))); $languages = Language::getLanguages(); $lang_id = $defaultLanguage->id; $id_product = "8349"; $sql = 'UPDATE '._DB_PREFIX_.'stock_available SET out_of_stock = 0 WHERE id_product ='.$id_product.''; $set_up = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); } I use it for specific product targeting and it can be accessed through another function that selects for example all the products from a specific manufacturer or supplier or... you name it. $id_product = array(); $sql = 'SELECT id_product FROM '._DB_PREFIX_.'product WHERE id_supplier = 1 and id_manufacturer = 3'; $id_product = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); if ($id_product) { foreach ($id_product as $key => $value) { deny_order($value['id_product']); } } In that case of course, the "deny_order" function will have the $id_product parameter commented inside the function and given as a key: function deny_order($id_product). I know this is straight forward for most people reading this but I mention it for beginners mainly (as myself).
  10. Hi guys. I wouldn't use mysql modifying because the PS tables are complicated and they have various links. You can easily use the classes PS already has. For example, you can use a query to give you the products with certain amount of stock, like: $sql = 'SELECT id_product FROM '._DB_PREFIX_.'product WHERE quantity = 0'; $id_product = (int)Db::getInstance()->getValue($sql); This will give you the array $id_product array, then simply use a foreach to go through it and update the products as needed. Disabling product it's a bad practice because you will lose your links and Google will penalize you. Better to make the product not visible (but keep the link active) and also, you can hide or show the price. I go like this: function update($single_product_id){ $product = new Product($single_product_id); $product->available_for_order = 0; $product->visibility = none; $product->show_price = 0; $product->save(); } This will also get indexed in Prestashop so you will not be affected by cache or search indexation. It is quick and painless and you can play with it as you see fit.
  11. Hy there. I managed to do a script that creates combinations for my products, with attributes and stuff. It goes like this: function combination($id_product, $arr, $lang_id){ $id_product_attribute = Combination::getIdByReference($id_product, $arr['code']); $comb = new Combination($id_product_attribute); if($id_product_attribute){ StockAvailable::setQuantity($id_product, $id_product_attribute, $arr['quantity']); } else { $id_atribute = array(); if($arr['size_group_id']){ $id_attribute_size = attribute_id($arr['size_group_id'], $arr['sizes'], $lang_id); $id_attribute[] = $id_attribute_size; } if($arr['color_group_id']){ $id_attribute_color = attribute_id($arr['color_group_id'], $arr['color'], $lang_id); $id_attribute[] = $id_attribute_color; } if(count($id_attribute)){ $comb->quantity = $arr['quantity']; $comb->id_product = $id_product; $comb->reference = $arr['code']; $comb->add(); $comb->setAttributes($id_attribute); } if (isset($arr['supplyer']) && $arr['supplyer'] == 'Supplyer') { $id_product_attribute = Combination::getIdByReference($id_product, $arr['code']); $comb = new Combination($id_product_attribute); if ($arr['combination_image'] != '') { $combination_image = $arr['combination_image'][0]; product_img($id_product, $combination_image); } if($id_product_attribute){ StockAvailable::setQuantity($id_product, $id_product_attribute, $arr['quantity']); $comb->default_on = 1; $comb->update(); } } } } The lang_id can be set like this: $defaultLanguage = new Language((int)(Configuration::get('PS_LANG_DEFAULT'))); $languages = Language::getLanguages(); $lang_id = $defaultLanguage->id; Hope this helps.
  12. Thank you! This module helped me finish up a project. Keep up the good work! PS: tested in PS 1.6.1.6
  13. Hi all. The steps for using this module are: 1. In modules/ loyalty [...] you need to select the desired option for the loyalty points validation. In my case I use the "Delivered" status as a point validator. 2. After you changed the client's order status to delivered, he will have the option to convert the points into a voucher which can be used in the cart. 3. If you have merchandise return active, the voucher will not activate until that amount of time has passed. 4. After that period of time, the voucher will appear in the cart, as long as the customer is signed in and he will be able to simply click the voucher he will want to use. Simple as 1-2-3 ... ah... and 4
×
×
  • Create New...