In prestashop at which file cash on delivery module is calling - prestashop

I need to know the location of file from where cash on delivery module is calling inside the choose your payment method checkout page.

You can find the template display on payment choices page of the module "cash on delivery" here : /modules/cashondelivery/views/templates/hook/payment.tpl
If you user older version of PrestaShop, this template is here : /modules/cashondelivery/payment.tpl
NB: If you want to modify this template for your theme is better to overwrite it by put it directly in the "modules" folder of your theme.

Related

How to enable module in another module in Prestashop 1.7?

I try to display some additional information on the top of website, if is logged user not only an ordinary customer, but also a seller (we use the module "marketplace" by Webkul).
The module "ps_customersignin" shows only a name of logged user and the button for log out on the website. But I want to display more information (link to a seller's special menu, if is the user also a seller, if not, just display user's name and the log out button).
vs.
I tried add this code in ps_customersigning.tpl, but without a result:
{if $is_seller == 1}Display additional info + name and log out button{else}Display only user's name and the log out button
{/if}
Do you have a tip how call information from the module "marketplace" to the module "ps_customersigning" for check, if the user is also the seller and than display the additional information?
You can have an instance of the marketplace module inside the ps_customersignin module by using
$marketplace = Module::getInstanceByName('marketplace');
inside ps_customersignin main module PHP code.
Then you can access the required $marketplace method / properties, assign $is_seller variable with $smarty->assign, and display your content inside the ps_customersigning.tpl

How to change name of Payment Module that shows up in VirtoCommerce storefront

Trying to change the name of the payment module that shows up in the storefront UI: "Authorize.Net payment gateway" - We would like it to simply say "Use credit card."
I have changed the module.manifest file, and I have changed the "Name" in the authorizeNetPaymentMethodFactory. The new module is properly installed but the end user UI does not change. Please provide step-by-step insight on how to change the string that shows up when a user is selecting payment method on checkout, or post-order payment screen.
We have installed the new module. Done restarts of both the admin appPool and the storeFront AppPool. We've done uninstalls, restart, upload new module to modules directory, new module shows up, new version #, etc. but end user text never changes.
Best way to override display name, use Storefront Resource File and paymentMethod.code as part of the key.
For example
'checkout.payment_method.AuthorizeNet.display_name' : 'Use credit card'.
And slightly change the code when you display Payment method name
https://github.com/VirtoCommerce/vc-theme-default/blob/521f9e073301f63bab368e16f913a51a40d194ff/assets/js/common-components/paymentMethods.tpl.liquid#L11

What causes the cart module to not show up on the front-office?

Recently I was doing some integrations on a non-standard/non-official prestashop 1.6 theme.
I found out after some manipulation on the Back-Office that the cart module doesn't appear on the Front-Office.
The cart module is enabled and is hooked to the displayNav and displayTop hooks.
It seems that cart module doesn't render any of its view code even when the "Disable module ovverides" is disabled.
The last and the only thing I've manipulated on the BO config is activating and then deactivating the "Force update friendly url".
Note that the current theme in based on an old theme and was made by an intern that didn't respect the official doc at all. What I mean by that is that you can find inline CSS and Javascript isnide a tpl file with no repsect of the smarty template engine syntax.
The current theme doesn't support many of the hooks that the default and basic prestashop theme offers.
I envisionned the following solution :
Read the 1.6 PS doc and make corrections on the theme. If the number of bugs, problems and mis-uses is not huge.
Rewrite the theme from groung zero in the worst case
After one day of lookin up answers on the web I found out that the catalog mode was off which makes the cart block disapears on the front-office.

How to edit prestashop back office product listing page

I want to change the layout of prestashop back office product page.
So can anyone tell me which file to change so that I can modify this existing layout?
I don't know which page you want to edit exactly, but when you go to that page in your backoffice, like:
http://www.example.com/admin123/index.php?tab=AdminAttributesGroups
The admin123 is variable to your installation, but the ?tab=AdminAttributesGroups referes to the backoffice page you are on. These pages are located in /var/www/admin123/tabs in this case it's /var/www/admin123/tabs/AdminAttributesGroups.php
I found the solution.... Here is what I did
Added content.tpl in under adminxxyy/theme/theme_name/template/controller/products
Which showed me content of my content.tpl
Create a new module, register the hook and send that info via hook to content.tpl.
Use hook name in content.tpl like {hook h='displayProductMyWay' mod='blockcustom'}.

Shopify "test" template page

Is there any way to publish a test template page? For example, if I have a template file called "cart-test.liquid," is there anything I can modify so I can navigate to "http://shopname.com/cart-test" in order to test it out?
I'm currently developing an widget that'll be included on Shopify cart pages, and one of my clients wants to test it out before it's published on their real cart page.
The best way to test a theme without editing the live theme is to duplicate the current theme and use the preview function.
From within the Shopify admin (using Shopify Admin 2) goto the "Themes" section. Here you can "duplicate" the published main theme. It will create a copy of the theme within the "Unpublished themes" section. Here you can edit it and also get a preview of this theme (click on the link preview).