Rectangle 27 1

The usual way to escape string content to prevent it from CSV parsing is put it into quotation marks. In your case it will be like this:

"ASPECT: Colors": White

Note: as there is no CSV standard exists, reading part may fail to recognize particular escaping techniques.

It already seems to be non-standard to me as it uses colons ":" instead of comma "," separators, as file name implies.

I have already tryed this method and prestashop add a new Caraterisitc named : "ASPECT with value : Colors"

Quick look at source code suggests to me that they have a proper CSV parser, which delimits entries with ";" and supports string escape with double quotes. Where did you get your odd syntax?

Yes I use this prestashop well (1.6). In the prestashop documentation for the CSV import, the characteristics must be in the form: Characteristic (Name: Value: Position: Custom). And in my value "Name" contains character ":" which does not escape. I have alredy tryed the following test : "ASPECT : Colors":white and ASPECT ":" Colors:white but don't work. I obtain odd value into the backoffice characteristic

@DevLoots As you have PrestaShop PHP code deployed on your server already, why not you just change that part which deals with import and replace ":" with some other character.

Import CSV - Escape of the characteristics colon - Stack Overflow

csv import escaping prestashop prestashop-1.6
Rectangle 27 0

Site Management

Manage a site easily using PrestaShop. Business owners can enjoy editing content, managing product displays, and changing languages all through the back office. PrestaShop has a one-click upgrade to keep a store running at the latest version.

'prestashop' tag wiki - Stack Overflow

prestashop
Rectangle 27 0

There are two problems I see with your code.

1) you have not put {} brackets around $mysmartyvariable2. This will assign 'undefined' to height2 as smarty will not process this variable at all, and the javascript variable named $mysmartyvariable2 is not defined.

2) you need to use {literal} {/literal} tags anytime you are embedding javascript which uses { } characters, so that smarty does not try to interpret the javascript {} characters as smarty syntax.

In this case you can start the {literal} tag after the height2 declaration/assignment, as the previous lines SHOULD be interpreted by smarty, but the following lines should NOT be interpreted by smarty.

var height2 = {$mysmartyvariable2};
{literal}
if (title == 'index') 
  { //code here 
  }

// other code
{/literal}
</script>

Thanks, I corrected the bracket for mysmartyvariable2, that's wasn't present in my final code. Tried and that's don't work ... You suggested me to use "height2 = {mysmartyvariable2};" ? that's not "var height2 = {mysmartyvariable2};" ?

About the {literal} I tried by added them before the first { of my code, so juste afiter my var lines, and the closing {/literal} before the script tag, but without success

Sorry I missed the $ in the example. I will fix the example. However the {literal} and {/literal} are absolutely required whenever you have { } characters in your template file that need to be rendered to your output html. Please post the text of your attempt so that we can help debug it.

also, please post the actual error you're getting - you never mention the details of the error other than to say "but generate an error"

The error was the fact all javascript was unload in my page. After your correction I adapted the code and that's ok :) Thanks for your precious help.

javascript - Prestashop, in .tpl, how to use smarty variable in javascript smarty prestashop

Rectangle 27 0

{if $lang_iso == en } 

    english text 
    {else}

    Other language
   {/if}

Prestashop how to add static contents in different language in tpl fil...

prestashop
Rectangle 27 0

AH, I found it. For any who may also be looking for this, you can edit this directly like this:

Find the 'modules/blockpermanantlinks/ directory and edit the blockpermanentlinks-header.tpl file. You will need to set up target pages manually too. I just pointed to information CMS pages I made earlier.

I have a question, I've been trying to do the same, but NOTHING happens on the site either when I edit the tpl files in the module directory or when I move the modules directory to the theme dir. wtf? :<

content management system - Prestashop - Header links - Stack Overflow

content-management-system prestashop
Rectangle 27 0

do this from your ssl client: yum install php-mcrypt

php - Prestashop CMS configuration - Stack Overflow

php content-management-system prestashop
Rectangle 27 0

Your main problem is the way you're traversing to find the right .infos divs. jQuery has pretty elegant traversal methods that can make this a lot simpler.

// Cache your jQuery selector... you don't need to find it over and over again
var $portefolio = $('#portefolio');

// Hide / close all containers
$portefolio.find('.infos').hide(); 

// Add a single event to the container for better performance
$portefolio.on('click', 'li', function (event) {

    var $this = $(event.currentTarget);

    if ($this.hasClass('active')) {

        // Deactivate
        $this.removeClass('active');
        $this.find('.infos').slideUp();

    } else {

        // Activate
        $this.addClass('active');
        $this.find('.infos').slideDown();
    }
});

content management system - Using jQuery in Prestashop CMS page - Stac...

jquery content-management-system prestashop
Rectangle 27 0

To set something in the cookie :

In a controller :

$this->context->cookie->__set($key,$value);
$context = Context::getContext();
$context->cookie->__set($finger_print,$result);

You can access to your value with :

In a controller

$this->context->cookie->key
$context = Context::getContext();
$context->cookie->key;

Custom Cookie variable + Prestashop - Stack Overflow

prestashop
Rectangle 27 0

You should delete manually the file from override folder. Than you should delete the contents of the cache folder.

Now you can reinstall your module that does the override.

How to remove override , when uninstalling the module in prestashop? -...

module override prestashop
Rectangle 27 0

I've just inspected the element and you're right, but when I just see the code I actually see it, fancybox seems to be removing the form tags????? See here i.imgur.com/CV8tV.png I'm 100% sure the form tag is there in the original code.

This is actually a correct answer so +1 and thanks, I accpted @ShadowScripter's answer simply because he pointed out that it was a form inside a form and that lead me to find the problem thanks!!!

javascript - Form doesn't work inside fancybox - Stack Overflow

javascript jquery forms fancybox prestashop
Rectangle 27 0

$("input[type='submit']").click(function(){
    $.ajax: {
        type     : "POST",
        cache    : false,
        url      : "http://danielvi.com/send_mail.php",
        success: function(data) {
            $.fancybox({
                'width': 400,
                'height': 400,
                'enableEscapeButton' : false,
                'overlayShow' : true,
                'overlayOpacity' : 0,
                'hideOnOverlayClick' : false,
                'content' : data
            });
        }
    }
});

javascript - Form doesn't work inside fancybox - Stack Overflow

javascript jquery forms fancybox prestashop
Rectangle 27 0

create controllers/admin/AdminPageController.php with the follwing content:

class AdminPageController extends AdminController
    {
        public function initContent()
        {
            parent::initContent();
            $smarty = $this->context->smarty;

            $smarty->assign('test', 'test1');

        }
    }
zzz{$test}zzz
Name: Page
Class: AdminPage
Parent: Catalog

Click the [Save] button and the menu item should appear at the "Catalog" menu.

Thanks a lot.. It gives me an page to show content. exactly what I am looking for.. really helpful for me.. Thanks Again !!!

please, this works for me, but how do i delete the same page from the menus ??

i created the page successfully using this tutorial, please how do i remove it completely from the admin page and menu

Delete the 2 created files, and remove it from BackOffice -> Administration -> Menus

can this version work with the current 1.6 version?

php - How to create a new page in prestashop admin panel? - Stack Over...

php admin prestashop prestashop-1.5
Rectangle 27 0

You can't edit any files of prestashop at admin. So to edit css files, and .tpl file you have to do it in an editor like DreamWeaver or notepad++ directly. Open the file and edit your required contents in the editor.

php - Prestashop - How to edit views - Stack Overflow

php css sql prestashop prestashop-1.5
Rectangle 27 0

And replace the content of hookActionCartSave by your redirect.

I Can't able to find hookActionCartSave. I just want to redirect if the cart count is not null, in FrontController.php

hookActionCartSave is a method of the module. It's called when product is added to the cart. Then you add your logic about products count.

I'm totally confused, I know how to redirecting from FrontController.php But i'm not familar with creating new module. Can you give me the right code to redirect if the Cart Count is not null (mainly how to get the cart count value)

Please read carefully the answer I redirected you, you have all the code to do what you want. Look at the hookActionCartSave method, the current Cart object is in $params['cart'], it's a Cart class object from /classes/Cart.php.

authentication - how to redirect after clicking Add to Cart in Prestas...

authentication redirect controller prestashop cart
Rectangle 27 0

Easyest way I can think of is to access the data via cookies since cart data is stored in them.

You can get cookies data like this:

$context = Context::getContext();
    echo '<pre>',print_r($context->cookie, true).'</pre>';

Prestashop Context is a registry for PHP variables that were previously accessed as globals. It aims to standardize the way these variables are accessed, and to make the code more robust by getting rid of global vars.

And our echo is just for example to show what info you can get from cookies.

When costumer adds something to the shopping-cart it automatically gives it a cart id (id_cart) and from there it's fairly easy to access to access that value to get all the info.

To get a cart id ( assuming you already got context ) use this

$Cart = $context->cart;

This returns you a ID of a current cart.

Now you want to return the current products in the cart ( with all the information it includes ). For that you have to use the public function located in prestashop_main_folder/classes/cart.php

So to return all the current products just use the following line

$Cart->getProducts($refresh = false, $id_product = false, $id_country = null)

And then it returns you a array with all the variables what you can easily then access.

prestashop - How to show product quantity in the cart on custom page -...

prestashop prestashop-1.5
Rectangle 27 0

This is kind of what the Advanced Custom Fields Flexible Content system does, and the way you've styled your examples looks very like Smarty, a templating system that used to be very popular, and which is still used by a few systems like Prestashop.

In my experience, this removing the middleman kind of idea doesn't work. You either need a very extensive - and therefore bloated - initial theming system to flex to different projects, or you need a basic one which a developer will customise later - in which case the best you can achieve is moving the developer's role to a different phase of the project.

Worth noting that this is a kind of discussion-catalysing question, rather than one with a definite answer, so it might be best aimed at a developer forum, rather than StackExchange

Thank you for your answer, what I am trying to achieve is that content is completely separated from the php logic that fetches the data or filters that need to be applied. While also having parts of the content safely tucked away in custom posts so the client can provide new content without breaking the theme. Thinking of Twig if that can render fast enough. This way instead of copy and pasting functions and html I can copy and paste class files when re using code. The actual html would look simple enough for a non programmer to maintain.

Having seen code that was produced by designers that learn a bit more code I fear that that solution isn't going to fly. Trying to maintain such a site is in my experience very hard (asp.net sites)

WordPress technical theme design - Stack Overflow

wordpress design wordpress-theming
Rectangle 27 0

You can change the src of the image dynamically.

<img data-src="{$product.cover.bySize.large_default.url}" src="loading.gif" />

Loop on each image and update the source:

$('img[data-src]').each(function(){
 var src = $(this).data('src');
 $(this).attr('src',src');
})

javascript - Load dynamic content using jquery - Stack Overflow

javascript php jquery prestashop
Rectangle 27 0

I Just got the same issue with my Symfony 3.2 app, i was upgrading my web server from php 5.5.12 to php 5.6.31 when it happened. After upgrading again to php 7.0.23 everything go back to normal.

apache - "Failed to start the session: already started by PHP" error u...

php apache symfony content-management-system prestashop
Rectangle 27 0

You should take a look at the Cart class, located in classes/Cart.php. There's a method called getProducts().

/**  
 * Return cart products  
 *  
 * @result array Products  
 */  
 public function getProducts($refresh = false, $id_product = false)  
 {  
   // code...  
 }

How get cart content ? (prestashop) - Stack Overflow

cart prestashop