Jump to content

chillermiller

Members
  • Posts

    5
  • Joined

  • Last visited

Profile Information

  • First Name
    Christian
  • Last Name
    Last

chillermiller's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hello everybody, I want to add a custom variable to my product, which is modifieable in product-list.tpl and product.tpl. Later in the shopping cart and invoice, it will be added to the description as well. As far as I know, i have to do this by overwriting this function in ajax-cart.js: ajaxCart.add($('#product_page_product_id').val(), $('#idCombination').val(), true, null, $('#quantity_wanted').val(), null, 'white'); How do I display for example my variable 'white' in my shopping-cart.tpl? Any hints how to accomplish this?
  2. Hello everybody, i have a product with two attributes 'color' and 'size'. The client ist able to choose between 200 colors so I implemented a custom colorpicker. When the user clicks "add to cart" I want to pass the choosed color as an attribute to the product object itselt. {if ($group.group_type == 'select')} <select name="{$groupName}" id="group_{$id_attribute_group|intval}" class="form-control attribute_select no-print"> {foreach from=$group.attributes key=id_attribute item=group_attribute} <option value="{$id_attribute|intval}"{if (isset($smarty.get.$groupName) && $smarty.get.$groupName|intval == $id_attribute) || $group.default == $id_attribute} selected="selected"{/if} title="{$group_attribute|escape:'html':'UTF-8'}">{$group_attribute|escape:'html':'UTF-8'}</option> {/foreach} </select> {hook h='CustomHook'} At the moment, I got my variables in jQuery in the "CustomHook". Hoch can i make overwrite the procedure from prestashop provided?
  3. Hello everybody, i wrote a little module, which makes it easier to pick a certain color in an extra window (fancybox). The module creates and displays a button via my files customcolorpick.php -> customcolorpick.tpl. The file customcolorpick.tpl in turn opens a dialog.php via fancybox where i need to access my current product id, from which the form was started. This is my little code example: customcolorpick.php public function hookCustomHook($params) { // Does not work $product = $this->context->controller->getProduct(); $this->context->controller->addCSS($this->_path.'css/product.css', 'all'); $this->context->smarty->assign( array( 'module_color' => Configuration::get('MODUL_COLOR'), 'module_window_link' => $this->context->link->getModuleLink('customcolorpick', 'display') ) ); return $this->display(__FILE__, 'customcolorpick.tpl'); } customcolorpick.tpl: <a class="iframe" id="wishlist_button_nopop" href="{$module_window_link}">Farbton wählen</a> Any ideas?
  4. Hello everyone, i openend the shop xml files typing in my browser http://localhost/api/. I can access the customers section, but i cannot access the products or categories section. When i activate the debug mode in config/defines.inc.php the following error message comes up: Fatal error: Uncaught Error: Function name must be a string in C:\xampp\htdocs\classes\webservice\WebserviceOutputBuilder.php:542 Stack trace: #0 C:\xampp\htdocs\classes\webservice\WebserviceOutputBuilder.php(481): WebserviceOutputBuilderCore->renderField(Object(Product), Array, 'id_default_imag...', Array, 0) #1 C:\xampp\htdocs\classes\webservice\WebserviceOutputBuilder.php(385): WebserviceOutputBuilderCore->renderEntity(Object(Product), 0) #2 C:\xampp\htdocs\classes\webservice\WebserviceRequest.php(1694): WebserviceOutputBuilderCore->getContent(Array, NULL, 'full', 0, 2) #3 C:\xampp\htdocs\classes\webservice\WebserviceRequest.php(560): WebserviceRequestCore->returnOutput() #4 C:\xampp\htdocs\webservice\dispatcher.php(87): WebserviceRequestCore->fetch('E1UP4CKKTLKNZ2N...', 'GET', 'products/2', Array, false, NULL) #5 {main} thrown in C:\xampp\htdocs\classes\webservice\WebserviceOutputBuilder.php on line 542 I admit that i just changed the supported versions on line 49 in PSWebServiceLibrary.php to const psCompatibleVersionsMax = '1.6.1.4'; because that is my current version. Some tries accessing the webservice with a token in php resulted in the same error code. How can I fix this problem? May I downgrade to 1.6.1.3? Kind regards, Chris
×
×
  • Create New...