Jump to content

Mian Waqas

Members
  • Posts

    230
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Mian Waqas

  1. i guess, clear your cookies, regenerate .htaccess file . this one is related to friendly url/url_rewrite stuff. just play with it around
  2. im Prestashop gibt es keine direkte Möglichkeit, eine Mietverwaltung zu integrieren, die automatisch eine Kaution berechnet und diese von der Mehrwertsteuer befreit. Es gibt jedoch verschiedene Addons, die die Möglichkeit bieten, Produkte mit einem Abonnement-Modell zu verkaufen. Einige dieser Addons haben auch Funktionen zur Verwaltung von Kautionen und wiederkehrenden Zahlungen. Beispiele für solche Addons sind "Advanced Subscription with automatic recurring payments" von Presto-Changeo oder "Subscriptions and Recurring Payments" von PrestaShop. Diese Addons bieten verschiedene Optionen zur Verwaltung von Abonnements, einschließlich der Möglichkeit, Produkte mit einer Kaution und/oder wiederkehrenden Zahlungen zu verkaufen. Allerdings empfehle ich Ihnen, sich vor dem Kauf eines Addons sorgfältig zu informieren, ob es Ihren Anforderungen entspricht und ob es mit Ihrer Prestashop-Version kompatibel ist. Ich hoffe, das hilft Ihnen weiter!
  3. To avoid duplicate image URLs, you can add a DISTINCT clause to your GROUP_CONCAT function. Here's an updated version of your query with the DISTINCT clause added: SELECT p.active 'Active', m.name 'Manufacturer', p.id_product 'Product number', p.reference 'Reference', pl.name 'Product name', GROUP_CONCAT(DISTINCT al.name SEPARATOR ", ") AS 'Combination', s.quantity 'Quantity', p.price 'Price w/o VAT', pa.price 'Combination price', p.wholesale_price 'Wholesale price', GROUP_CONCAT(DISTINCT cl.name SEPARATOR ",") AS 'Product groups', p.weight 'Weight', p.id_tax_rules_group 'TAX group', pa.reference 'Combination reference', pl.description_short 'Short description', pl.description 'Long description', pl.meta_title 'Meta Title', pl.meta_keywords 'Meta Keywords', pl.meta_description 'Meta Description', pl.link_rewrite 'Link', pl.available_now 'In stock text', pl.available_later 'Coming text', p.available_for_order 'Orderable text', p.date_add 'Added', p.show_price 'Show price', p.online_only 'Only online', GROUP_CONCAT(DISTINCT "http://", su.domain, su.physical_uri , IF(pai.id_image IS NOT NULL,pai.id_image,im.id_image), "/", REPLACE(REPLACE(REPLACE(pl.name," ","_"),"\"",""),"#",""), ".jpg") as "Image URL" FROM w5kn_product p LEFT JOIN w5kn_product_lang pl ON (p.id_product = pl.id_product and pl.id_lang=2) LEFT JOIN w5kn_manufacturer m ON (p.id_manufacturer = m.id_manufacturer) LEFT JOIN w5kn_category_product cp ON (p.id_product = cp.id_product) LEFT JOIN w5kn_category c ON (cp.id_category = c.id_category) LEFT JOIN w5kn_category_lang cl ON (cp.id_category = cl.id_category and cl.id_lang=2) LEFT JOIN w5kn_product_attribute pa ON (p.id_product = pa.id_product) LEFT JOIN w5kn_stock_available s ON (p.id_product = s.id_product and (pa.id_product_attribute=s.id_product_attribute or pa.id_product_attribute is null)) LEFT JOIN w5kn_product_tag pt ON (p.id_product = pt.id_product) LEFT JOIN w5kn_product_attribute_combination pac ON (pac.id_product_attribute = pa.id_product_attribute) LEFT JOIN w5kn_attribute_lang al ON (al.id_attribute = pac.id_attribute and al.id_lang=2) LEFT JOIN w5kn_shop sh ON p.id_shop_default = sh.id_shop LEFT JOIN w5kn_shop_url su ON su.id_shop = sh.id_shop AND su.main = 1 LEFT JOIN w5kn_image im ON (p.id_product = im.id_product) LEFT JOIN w5kn_product_attribute_image pai ON (pai.id_product_attribute = s.id_product_attribute) GROUP BY p.id_product,pac.id_product_attribute ORDER BY p.id_product Note the DISTINCT clause added to the GROUP_CONCAT functions for al.name and "http://", su.domain, su.physical_uri , IF(pai.id_image IS NOT NULL,pai.id_image,im.id_image), "/", REPLACE(REPLACE(REPLACE(pl.name," ","_"),"\"",""),"#",""), ".jpg" to remove duplicate values.
  4. In Prestashop 1.6.1.18, you can create a cart rule that excludes products on sale by using a specific condition. Here are the steps to achieve this: 1. Go to the "Price Rules" section in the back office of your shop. 2. Click on "Cart Rules" and then click on "Add new cart rule". 3. Fill in the basic information for your cart rule (name, description, etc.). 4. Scroll down to the "Conditions" section and click on the "+" button to add a new condition. 5. From the drop-down list, select "Products selection" and click on "Add". 6. In the "Products" tab, select "Add a product" and search for the product you want to exclude from the discount. 7. Click on the product to add it to the list of selected products. 8. In the "Conditions" tab, select "Exclude on sale products" from the drop-down list. 9 .Save your cart rule and test it. Alternatively, you can create a specific customer group that excludes products on sale. Here are the steps: 1. Go to the "Customers" section in the back office of your shop. 2. Click on "Groups" and then click on "Add new group". 3. Fill in the basic information for your group (name, description, etc.). 4. Scroll down to the "Discounts" section and click on the "+" button to add a new discount. 5. Select "Discount on price (without taxes)" and fill in the percentage value you want to apply (in your case, 15%). 6. In the "Conditions" tab, select "Exclude on sale products" from the drop-down list. 7. Save your group and test it by assigning a customer to it. I hope this helps!
  5. To display the total number of products found in a search result on the search page, you can modify the SearchController.php file of Prestashop. Here are the steps: 1. Make a backup of the SearchController.php file located in the controllers/front folder of your Prestashop installation. 2. Open the SearchController.php file and find the initContent() method. 3. Inside the initContent() method, you'll find the code that sets up the search result data. You can add the total number of products found in the search result to the $params array that's passed to the template. 4. To get the total number of products found in the search result, you can use the following code: $totalProducts = Product::searchTotalByName($query); Where $query is the search query entered by the user. 5. Add $totalProducts to the $params array, like this: $params['total_products'] = $totalProducts; 6. Save the modified SearchController.php file. 7. Open the themes/mytheme/templates/catalog/search.tpl file and find the <h1> tag where you want to display the total number of products found. 8. Add the following code inside the <h1> tag: {if isset($total_products) && $total_products > 0} ({$total_products}) {/if} This code checks if the $total_products variable is set and greater than zero, and displays it in parentheses. 9. Save the modified search.tpl file. After these steps, the total number of products found in the search result will be displayed in the specified <h1> tag on the search page.
  6. To start each shop with the main category page of the respective multishop, you can modify the Dispatcher.php file of Prestashop. Here are the steps: Make a backup of the Dispatcher.php file located in the classes folder of your Prestashop installation. Open the Dispatcher.php file and find the dispatch() method. Inside the dispatch() method, you'll find the code that determines which page to display based on the URL. You can modify this code to redirect to the main category page of the respective multishop. To redirect to the main category page of a multishop, you can use the following code: Tools::redirect('index.php?controller=category&id_category=' . (int) Configuration::get('PS_HOME_CATEGORY'), null, null, 'http://' . $domain . __PS_BASE_URI__); Replace $domain with the domain name of the respective shop. This code will redirect to the main category page of the multishop. Repeat step 4 for each shop, replacing $domain with the domain name of each shop. Save the modified Dispatcher.php file. Clear the Prestashop cache. After these steps, when a user visits the homepage of any shop, they will be redirected to the main category page of the respective multishop.
  7. {assign var="flag" value=false} {foreach from=$cart.products item="product"} {if $product.price_amount eq "$ 0"} {assign var="flag" value=true} {/if} {/foreach} {if $flag} abc {else} xyz {/if} Here is how you can achieve this, in case any one needs this in future. This code sets the flag variable to false at the beginning. Then it loops through each product in the cart and checks if the product price is $0. If it is, then the flag variable is set to true. After the loop, the code checks the value of the flag variable. If it is true, then it displays "abc". Otherwise, it displays "xyz".
  8. `{assign var="tax_amount" value=Context::getContext()->currentLocale- >formatPrice($product.price_tax_exc, $currency.iso_code)} {if {$tax_amount} == {$product.price}} abc {else} xyz {/if}` Here is the Answer how to achieve this.
  9. error is basically after this line nothing loads on the front. like on this line everything stops
  10. Nop, i think this line, which is giving error {assign var='tax_amount' value=$tax_calculator->getTaxAmount($product.price, $product.tax_rate)} need correction
  11. i can get $product.price but cannot get $product.tax_rate i belive if somehow i can get the tax_rate which will be 0 for some products there i can achieve my goal as follow. {if $product.tax_rate eq "$ 0"} <span> abc </span> {else} <span> xyz</span> {/if}
  12. Thank you for the reply, however i have tried to test these codes but not getting succeed. this i am doing on product-prices.tpl
  13. I needed the code for this, but thanks anyways. i can get the code from this module. thanks for pointing this out. Kind Regards
  14. Blocklayered is outdated for PS 1.7+ and it does not have this setting which i am asking, please read the initial message again and try to understand what i want to achive. Thanks
  15. @AddWeb Solution well i know about this, but as i said in initial message the out of stock products shall always remain at the end, irrespective of any sorting order. please try to understand my question first.
  16. Thanks for the reply But i am sorry AddWeb, This not i had asked for, please read my message again. Regards
  17. hi, On category List page i want to show out of stock products at very end irrespective of the sorting on category page. so that in any case the out of stock products shall always show at the end at the pagination. Regards
  18. Hello, On product page if the TAX amount for a product is 0 , how i can write IF statement for it , so that if the tax amount is 0 the tax label shall be ABC, and if the tax amount is more then 0 then the label shall be XYZ. i know the tax labeling configs etc on back office, but i am specifically asking about this how to get the tax amount value in IF/Else statment. Thanks
  19. Hi, If i have 2 or more products in cart, and one of them have 0 price and i want to create/remove a button if any of the product price in cart is 0. how i can write the if/else statement? this wont work in ajax shopping cart or cart page {if $cart.product.price_amount eq "$ 0"} because it get the value from product page and not from the cart page. Regards
  20. Hi , what if i have 2 or more products in cart, and one of them have 0 price and i want to create/remove a button if any of the product price in cart is 0. how i can write the statement? regards
  21. Hi, Many thanks for this @klifort , i will test this and will update you what happens. Regards
  22. thanks for the reply, there are no logs in my scenario! any guess on this issue https://github.com/PrestaShop/PrestaShop/issues/29921 ? regards
×
×
  • Create New...