Product page - by ycs7a - on WordPress WooCommerce support

This topic has 9 replies, 3 voices, and was last updated 7 years, 2 months ago ago by Eva Kemp

  • Avatar: ycs7a
    ycs7a
    Participant
    December 30, 2016 at 15:19

    Hi,

    I have several questions regarding the product page.

    1. Is it possible to set a certain variation (for instance, the size 17 ¾ for ‘Ringmaat’) for the variable products? See e.g. https://www.dropbox.com/s/90l2tvrdzzi7e4r/Schermafbeelding%202016-12-30%20om%2014.07.35.png?dl=0.

    The reason for this is because, when, there is no variation chosen, then the customer cannot buy the item. Please see https://www.dropbox.com/s/90l2tvrdzzi7e4r/Schermafbeelding%202016-12-30%20om%2014.07.35.png?dl=0. The items that are sold already are in a certain size (in this case ring size 17 ¾), so it would be good if the product variation is automatically set for that ring size (and colour).

    Is this possible?

    2. The variation option creates a distance between the Variation button and the Cart button. Please see https://www.dropbox.com/s/dlwdt4dlalevoch/Schermafbeelding%202016-12-30%20om%2014.10.30.jpg?dl=0. Can this distance be narrowed?

    3. How do I change the color of the ‘New’ button?

    4. What does the Extra field on the single product page exactly do? Please see https://www.dropbox.com/s/wlirrw8597974qc/Test%20content.png?dl=0.

    Thank you

    8 Answers
    Avatar: ycs7a
    ycs7a
    Participant
    December 30, 2016 at 15:26

    ‘1. https://www.dropbox.com/s/dsosd0n54acjxn1/Schermafbeelding%202016-12-30%20om%2014.10.30.psd?dl=0

    ‘4. https://www.dropbox.com/s/333cpmj0dgxp1ex/Test%20content%202.jpg?dl=0

    5. When a product becomes a varied product, then the ‘Add to cart’ button changes to ‘Opties kiezen’. Can this be re-altered to ‘In winkelmand’? Please see: https://www.dropbox.com/s/rl2tyobe1ktoq6q/Opties%20selecteren.png?dl=0

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    December 30, 2016 at 19:04

    Hello,

    1. You can set default variations in product editor http://prnt.sc/dpsbgy .

    2. Add this code in Global Custom CSS:

    .single_variation_wrap {
       margin-top: -20px;
    }

    3. Use this css code:

    .type-label-1 {
        background: yellow;
    }

    Change color to yours.

    4. It adds custom tab on single product page.

    5. Add this code in functions.php file:

    add_filter( 'woocommerce_product_add_to_cart_text' , 'custom_woocommerce_product_add_to_cart_text' );
    /**
     * custom_woocommerce_template_loop_add_to_cart
    */
    function custom_woocommerce_product_add_to_cart_text() {
    	global $product;
    	
    	$product_type = $product->product_type;
    	
    	switch ( $product_type ) {
    		case 'variable':
    			return __( 'Select options', 'woocommerce' );
    		break;
    	}
    	
    }

    Change “Select options” to the text you need.

    Best regards,
    Jack Richardson.

    Avatar: ycs7a
    ycs7a
    Participant
    December 31, 2016 at 11:11

    ‘1-3. Thank you. Can I also change the colour of the New icon to an RGB code?

    ‘4. I would like to add custom tabs to single product page, but it is unclear why this doesn’t work. Please find WP admin login codes in Private Content.

    ‘5. I have put the code in the functions.php of my test website (see Private Content), and the result is that every button that says ‘IN WINKELMAND’ is gone, and the button ‘OPTIES KIEZEN’ is the only remaining button. Please see https://www.dropbox.com/s/9fusllxqs0fkoha/IN%20WINKELMAND.png?dl=0.

    6. I have added a Static block on the single product page of my site, e.g. this product.

    On the mobile view this status blocks looks compressed. Please see https://www.dropbox.com/s/y0caoep1lebf9l3/mobile%20view.png?dl=0. Can I change it to the stretched row look as on the desktop?

    7. Where can I delete the word ‘PRODUCTBESCHRIJVING’ that is automatically beneath every tab ‘Beschrijving’ on the single product page? I could translate this word in Poedit, but I wish to delete it altogether since I want to write the title of the product for every product instead of ‘Product Description’.

    Many thanks.

    Please, contact administrator
    for this information.
    Avatar: Eva
    Eva Kemp
    Support staff
    January 3, 2017 at 10:44

    Hello,

    3. Yes, you can use RGB color.

    4. Have you added custom tab as described here https://docs.woocommerce.com/document/editing-product-data-tabs/ (section “Add a custom tab”) ?

    5. I’ve edited the code to this in your test site:

    add_filter( 'woocommerce_product_add_to_cart_text' , 'custom_woocommerce_product_add_to_cart_text' );
    /**
     * custom_woocommerce_template_loop_add_to_cart
    */
    function custom_woocommerce_product_add_to_cart_text() {
    	global $product;
    	
    	$product_type = $product->product_type;
    	
    	switch ( $product_type ) {
    		case 'variable':
    			return __( 'Select options', 'woocommerce' );
    		break;
    	}
             
            switch ( $product_type ) {
    		case 'simple':
    			return __( 'IN WINKELMAND', 'woocommerce' );
    		break;
    	}
    	
    }

    Please check.

    6. I’ve divided a row into 4 columns and added Text blocks in your Static Block. Please check it on mobile now.

    7. You need edit the file in the direcotry wp-content/plugins/woocommerce. Please read here http://eliteeternity.com/remove-product-description-headingtitle-woocommerce/

    Regards,
    Eva Kemp.

    Avatar: ycs7a
    ycs7a
    Participant
    January 3, 2017 at 15:48

    ‘3. What code should I use so that I can add an RGB code?

    3b. Can I rename the button ‘New’ to ‘Nieuw’?

    ‘4. If I add a custom tab, then it creates a custom global product tab which will be placed on every single product page.

    I would like to use the ‘Extra field’ on the single product page in order to create a tab for certain single product pages only.

    ‘5. Thank you.

    ‘6. Thank you. Can I add the grey background to the 4 columns just as it was when I used the ‘Call to Action’ button?

    ‘7. This worked, thank you.

    8. How do I change the Search Engine function to the plugin SearchIQ? I want customers to write their search query directly on the page without the pop up box.

    9. I have installed the Demo Ecommerce Theme, but I cannot use the same contact form that is on the Home page of the Lawyer One Page. Please see this page. How do I incorporate the contact form on pages?

    Avatar: Eva
    Eva Kemp
    Support staff
    January 3, 2017 at 16:31

    Hello,

    3. Use this code:

    .type-label-1 {
        background: yellow;
    }

    Replace “yellow” with your RGB code. You can find it here http://www.rapidtables.com/web/color/RGB_Color.htm .

    3b. Translate it in .po file in wp-content/themes/royal/languages directory.

    4. In this case you have to use some plugin to add custom tab for specific products only.

    6. You need edit your static block row and set color in the settings http://storage3.static.itmages.com/i/17/0103/h_1483456918_7542936_5ab3f2cc2b.jpeg .

    8. Sorry, but this requires additional customization which is beyond our basic support scope. You can contact customization service https://www.8theme.com/customization-services/ to get additional assistance.

    9. Have you edited “shortcodes” directory in the theme folder?

    Regards,
    Eva Kemp.

    Avatar: ycs7a
    ycs7a
    Participant
    January 3, 2017 at 17:06

    ‘3-3b. Great, thank you.

    ‘4. Okay I will look for one:) Thanks

    ‘6. Thanks

    ‘8. Thank you

    ‘9. I have edited the shortcodes directory by translating the words (e.g. ‘Name’ to ‘Naam’) in line 424.

    Other than that I have not edited the directory. What should I change?

    Avatar: Eva
    Eva Kemp
    Support staff
    January 4, 2017 at 13:41

    Hello,

    9. Some plugin is causing the issue.
    When I disabled all 3rd-party plugins, contact form got working.
    Now I’ve activated them back. You can deactivate them one by one to find the needed plugin which is breaking contact form shortcode.

    Regards,
    Eva Kemp.

  • Viewing 9 results - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.